[LLVMbugs] [Bug 8469] New: optimizer InstCombineCompares problem with optimizing vector ICmpInst

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Oct 26 11:13:27 PDT 2010


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

           Summary: optimizer InstCombineCompares problem with optimizing
                    vector ICmpInst
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: bixia.zheng at amd.com
                CC: llvmbugs at cs.uiuc.edu


Here is a command line and error message; test case is attached.
Problem also exists in trunk, though I am not using trunk here.

>opt -O1 vectorIcmp.bc -o output.bc

IC: Visiting:   %cmp = icmp ult <4 x i32> %tmp11, <i32 4, i32 4, i32 4, i32 4>
; <<4 x i1>> [#uses=1]
Assertion failed: New->getType() == getType() && "replaceAllUses of value with
n
ew value of different type!", file ..\..\..\compiler\llvm\lib\VMCore\Value.cpp,
line 317


The optimizer is trying to replace a vector of boolean with a simple boolean
value as in code:

Instruction *InstCombiner::visitICmpInst(ICmpInst &I) {
...
    case ICmpInst::ICMP_ULT:
      if (Op0Max.ult(Op1Min))          // A <u B -> true if max(A) < min(B)
        return ReplaceInstUsesWith(I, ConstantInt::getTrue(I.getContext()));


There are other similar problems in this routine as well.

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