[LLVMbugs] [Bug 11342] New: Assertion `BestRC && "Couldn't find the register class"`

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Nov 8 13:50:33 PST 2011


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

             Bug #: 11342
           Summary: Assertion `BestRC && "Couldn't find the register
                    class"`
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: nlewycky at google.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


This testcase:

target datalayout =
"e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32-S128"
target triple = "i386-unknown-linux-gnu"

define void @test(i64 %arg) {
entry:
  br i1 undef, label %if.end, label %if.else

if.else:
  %sub44 = sub i64 %arg, 0
  %tmp = load i32* undef, align 4
  %conv45 = sext i32 %tmp to i64
  %div = udiv i64 %sub44, %conv45
  %add46 = add i64 %div, 1
  %conv47 = trunc i64 %add46 to i32
  %add.ptr.i = getelementptr inbounds i8* null, i32 %conv47
  %rem = urem i64 %sub44, %conv45
  %conv56 = trunc i64 %rem to i32
  %sub58 = sub nsw i32 %tmp, %conv56
  br label %if.end

if.end:
  %pn1 = phi i8* [ %add.ptr.i, %if.else ], [ undef, %entry ]
  %pn2 = phi i32 [ %sub58, %if.else ], [ 0, %entry ]
  unreachable
}

causes this assert:

nlewycky at ducttape:~$ llvm/Debug+Asserts/bin/llc b.ll
llc: TargetRegisterInfo.cpp:68: const llvm::TargetRegisterClass
*llvm::TargetRegisterInfo::getMinimalPhysRegClass(unsigned int, llvm::EVT)
const: Assertion `BestRC && "Couldn't find the register class"' 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