[LLVMbugs] [Bug 10085] New: cannot select unknown target node #197 (long double)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Jun 5 14:31:16 PDT 2011


           Summary: cannot select unknown target node #197 (long double)
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: nlewycky at google.com
                CC: llvmbugs at cs.uiuc.edu

This straight-line C code crashes clang:

  int signbitl (long double x) {
    __extension__ union { long double l; int i[3]; } u;
    u.l = x;
    return (u.i[2] & 0x8000) != 0;

when targeting x86-64 and under -O2:

fatal error: error in backend: Cannot select: 0x58c8d20: i32 = <<Unknown Target
Node #197>> 0x58c30b0, 0x58c8c20 [ID=7]
  0x58c30b0: f80,ch = load 0x58893b8, 0x58c2eb0,
0x58c2fb0<LD10[FixedStack-1](align=16)> [ORD=1] [ID=6]
    0x58c2eb0: i64 = FrameIndex<-1> [ORD=1] [ID=1]
    0x58c2fb0: i64 = undef [ORD=1] [ID=2]
  0x58c8c20: i32 = Constant<1> [ID=5]

For reference the LLVM IR is:

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

define i32 @signbitl(x86_fp80 %x) nounwind uwtable readnone {
  %tmp4 = bitcast x86_fp80 %x to i80
  %tmp4.lobit = lshr i80 %tmp4, 79
  %tmp = trunc i80 %tmp4.lobit to i32
  ret i32 %tmp

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