[LLVMbugs] [Bug 3802] New: VMCore:Constants.cpp:2080 asserts on int vector shifting

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Fri Mar 13 17:23:57 PDT 2009


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

           Summary: VMCore:Constants.cpp:2080 asserts on int vector shifting
           Product: libraries
           Version: 2.4
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core LLVM classes
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: micah.villmow at amd.com
                CC: llvmbugs at cs.uiuc.edu


OpenCL requires vector based shifts with integers but the constants.cpp file in
vmcore currently asserts if the LHS type is not a scalar integer.

@@ -2074,11 +2074,11 @@
       break;
     case Instruction::Shl:
     case Instruction::LShr:
     case Instruction::AShr:
       assert(C1->getType() == C2->getType() && "Op types should be
identical!");
<      assert(C1->getType()->isInteger() &&
->     assert(C1->getType()->isIntOrIntVector() &&
              "Tried to create a shift operation on a non-integer type!");
       break;
     default:
       break;
     }


The fix is very simple, but I don't have any tests or enough knowledge about
this area of llvm to know if this is the only thing that needs to be changed.


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