[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


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

           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 =
"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
target triple = "x86_64-unknown-linux-gnu"

define i32 @signbitl(x86_fp80 %x) nounwind uwtable readnone {
entry:
  %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