http://llvm.org/bugs/show_bug.cgi?id=16053

            Bug ID: 16053
           Summary: SROA fails to eliminate alloca
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

Created attachment 10535
  --> http://llvm.org/bugs/attachment.cgi?id=10535&action=edit
testcase .ll

SROA fails to eliminate the alloca in this function.  This is the IR produced
for a store to a bitfield of float type (allowed in Ada).  SROA should
understand that bits 0 .. 32 of %.0.load are just the bits of %f, and the other
bits are all undef.

define i64 @bf__w__2(i64 %x.0, float %f) {
entry:
  %0 = alloca i40, align 8
  %1 = trunc i64 %x.0 to i40
  %.0.cast3 = bitcast i40* %0 to float*
  store float %f, float* %.0.cast3, align 8
  %.0.load = load i40* %0, align 8
  %2 = shl i40 %.0.load, 2
  %3 = and i40 %2, 17179869180
  %4 = and i40 %1, -17179869181
  %5 = or i40 %3, %4
  %.0.insert.ext = zext i40 %5 to i64
  ret i64 %.0.insert.ext
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to