[LLVMbugs] [Bug 9216] New: Endless loop in instcombine

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Feb 14 06:49:54 PST 2011


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

           Summary: Endless loop in instcombine
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Scalar Optimizations
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: nadav.rotem at intel.com
                CC: llvmbugs at cs.uiuc.edu


We hit an endless loop inside instcombine. 

Can be reproduces by running opt -instcombine on the following code:

target triple = "x86_64-unknown-linux-gnu"

declare <4 x float> @foo(i8*, i32, i32)
declare void @bar(i8*, i32, i32, <4 x float>)

define void @m_387(i8* noalias nocapture %A, i8* nocapture %B) nounwind {
entry:
  %load_call = call <4 x float> @foo(i8* %A, i32 3, i32 0) nounwind
  %0 = shufflevector <4 x float> %load_call, <4 x float> undef, <4 x i32> <i32
3, i32 3, i32 3, i32 3>
  %bitcast19 = bitcast <4 x float> %0 to <4 x i32>
  %1 = icmp ne <4 x i32> %bitcast19, zeroinitializer
  %movcsext20 = sext <4 x i1> %1 to <4 x i32>
  %tmp2389 = xor <4 x i32> %movcsext20, <i32 -1, i32 -1, i32 -1, i32 -1>
  %movcand25 = and <4 x i32> %tmp2389, <i32 undef, i32 undef, i32 undef, i32
-1>
  %movcor26 = or <4 x i32> %movcand25, zeroinitializer
  %2 = bitcast <4 x i32> %movcor26 to <4 x float>
  %3 = shufflevector <4 x float> zeroinitializer, <4 x float> %2, <4 x i32>
<i32 0, i32 1, i32 2, i32 7>
  call void @bar(i8* %A, i32 0, i32 3, <4 x float> %3) nounwind
  ret void
}

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list