[LLVMbugs] [Bug 2575] New: v4i32 vsetcc not legalizing correctly

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Jul 21 14:20:44 PDT 2008


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

           Summary: v4i32 vsetcc not legalizing correctly
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Common Code Generator Code
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: sdt at rapidmind.com
                CC: llvmbugs at cs.uiuc.edu


With llc -mcpu=pentium, the following code (courtesy of bugpoint) crashes llc:

===
define void @entry(i32 %m_task_id, i32 %start_x, i32 %end_x) {
        br i1 false, label %bb.nph, label %._crit_edge

bb.nph:         ; preds = %bb.nph, %0
        vicmp sgt <4 x i32> zeroinitializer, < i32 -128, i32 -128, i32 -128,
i32 -128 >         ; <<4 x i32>>:1 [#uses=1]
        extractelement <4 x i32> %1, i32 3              ; <i32>:2 [#uses=1]
        lshr i32 %2, 31         ; <i32>:3 [#uses=1]
        trunc i32 %3 to i1              ; <i1>:4 [#uses=1]
        select i1 %4, i32 -1, i32 0             ; <i32>:5 [#uses=1]
        insertelement <4 x i32> zeroinitializer, i32 %5, i32 3          ; <<4 x
i32>>:6 [#uses=1]
        and <4 x i32> zeroinitializer, %6               ; <<4 x i32>>:7
[#uses=1]
        bitcast <4 x i32> %7 to <4 x float>             ; <<4 x float>>:8
[#uses=1]
        mul <4 x float> zeroinitializer, %8             ; <<4 x float>>:9
[#uses=1]
        bitcast <4 x float> %9 to <4 x i32>             ; <<4 x i32>>:10
[#uses=1]
        or <4 x i32> %10, zeroinitializer               ; <<4 x i32>>:11
[#uses=1]
        bitcast <4 x i32> %11 to <4 x float>            ; <<4 x float>>:12
[#uses=1]
        mul <4 x float> %12, < float 1.000000e+02, float 1.000000e+02, float
1.000000e+02, float 1.000000e+02 >         ; <<4 x float>>:13 [#uses=1]
        sub <4 x float> %13, < float 1.000000e+02, float 1.000000e+02, float
1.000000e+02, float 1.000000e+02 >         ; <<4 x float>>:14 [#uses=1]
        extractelement <4 x float> %14, i32 3           ; <float>:15 [#uses=1]
        call float @fmaxf( float 0.000000e+00, float %15 )              ;
<float>:16 [#uses=0]
        br label %bb.nph

._crit_edge:            ; preds = %0
        ret void
}

declare float @fmaxf(float, float)
===

llc aborts with:

SplitVectorResult #0: 0x8b04484: v4i32 = vsetcc 0x8b04264, 0x8b04374, 0x8b043fc
llc: LegalizeVectorTypes.cpp:239: void
llvm::DAGTypeLegalizer::SplitVectorResult(llvm::SDNode*, unsigned int):
Assertion `0 && "Do not know how to split the result of this operator!"'
failed.


-- 
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