https://bugs.llvm.org/show_bug.cgi?id=51184

            Bug ID: 51184
           Summary: Multiple evaluations of a GEP
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

Created attachment 25056
  --> https://bugs.llvm.org/attachment.cgi?id=25056&action=edit
test case

In the attached test case there is this instruction

  %h3 = getelementptr inbounds %struct.entry_t, %struct.entry_t* %2, i64
%idxprom, i32 0, i64 0, i32 0

and 12-13 more similar instructions like


   %h3.3 = getelementptr inbounds %struct.entry_t, %struct.entry_t* %2, i64
%idxprom, i32 0, i64 3, i32 0

which begin with the same part `getelementptr inbounds %struct.entry_t,
%struct.entry_t* %2, i64 %idxprom`


When the attached test case is compiled with

`opt  --passes="default<O3>" store.ll -S -o - | lcc`

the output assembly file still contains multiple evaluations of that part, e.g.


        mov     w15, #48
        madd    x15, x9, x15, x8

 ...
        mov     w13, #48
        madd    x13, x9, x13, x8

etc.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to