[LLVMbugs] [Bug 9473] New: sitofp isel failed for x86 AVX backend.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Mar 12 23:39:25 PST 2011


           Summary: sitofp isel failed for x86 AVX backend.
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: syoyofujita at gmail.com
                CC: llvmbugs at cs.uiuc.edu

OS: Linux 64bit
Target-triple: x86_64-unknown-linux-gnu
LLVM revision: r127562

In the following int-to-double cast expression, x86 AVX backend reports "Cannot
select" error.

// test.c
    double x;

    int i;
    x = i;

$ clang -c -emit-llvm test.c
$ llvm -mattr=+avx test.o 
fatal error: error in backend: Cannot select: 0x3cd30e0: f64 = sint_to_fp
      0x3cd2fe0 [ORD=3] [ID=8]
  0x3cd2fe0: i32,ch = load 0x3cd2de0, 0x3cd2ee0, 0x3cd2ce0<LD4[%i]> [ORD=2]
    0x3cd2ee0: i64 = FrameIndex<2> [ORD=2] [ID=4]
    0x3cd2ce0: i64 = undef [ORD=1] [ID=3]

// llvm-dis test.o
; ModuleID = 'test.o'
target datalayout =
target triple = "x86_64-unknown-linux-gnu"

define i32 @main() nounwind {
  %retval = alloca i32, align 4
  %x = alloca double, align 8
  %i = alloca i32, align 4
  store i32 0, i32* %retval
  %tmp = load i32* %i, align 4
  %conv = sitofp i32 %tmp to double
  store double %conv, double* %x, align 8
  %0 = load i32* %retval
  ret i32 %0

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