[LLVMbugs] [Bug 17598] New: llc assertion with attribute -sse2 and arch x86-64

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Oct 16 07:37:04 PDT 2013


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

            Bug ID: 17598
           Summary: llc assertion with attribute -sse2 and arch x86-64
           Product: new-bugs
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: gm4cheng at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

I have an ir at the end.  Run it with:

llc -mcpu=i386 -march=x86-64 -mattr=-sse2

and get assertion below.  Changing cpu does not help. 

I am using llc from the latest svn repository.

-----error message------

llc: X86FloatingPoint.cpp:332: unsigned int getFPReg(const llvm::MachineOperand
&): Assertion `Reg >= X86::FP0 && Reg <= X86::FP6 && "Expected FP register!"'
failed.
0  llc             0x0000000000f75942 llvm::sys::PrintStackTrace(_IO_FILE*) +
34
1  llc             0x0000000000f75ed8
2  libpthread.so.0 0x00007f23f8edef60
3  libc.so.6       0x00007f23f7fe9165 gsignal + 53
4  libc.so.6       0x00007f23f7febf70 abort + 384
5  libc.so.6       0x00007f23f7fe22b1 __assert_fail + 241
6  llc             0x00000000008cf260
7  llc             0x00000000008cbb3e
8  llc             0x00000000008cb443
9  llc             0x0000000000bbfaa7
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 55
10 llc             0x0000000000f149a6
llvm::FPPassManager::runOnFunction(llvm::Function&) + 310
11 llc             0x0000000000f14c1b
llvm::FPPassManager::runOnModule(llvm::Module&) + 59
12 llc             0x0000000000f14eee
llvm::MPPassManager::runOnModule(llvm::Module&) + 334
13 llc             0x0000000000f15515 llvm::PassManagerImpl::run(llvm::Module&)
+ 293
14 llc             0x0000000000f1569a llvm::PassManager::run(llvm::Module&) +
10
15 llc             0x00000000005193e8 main + 6232
16 libc.so.6       0x00007f23f7fd5c4d __libc_start_main + 253
17 llc             0x0000000000517ac9
Stack dump:
0.    Program arguments: /local/pcheng/tmp/llvm_build/bin/llc -mcpu=i386
-march=x86-64 -mattr=-sse2 test.ll -o test.bc 
1.    Running pass 'Function Pass Manager' on module 'test.ll'.
2.    Running pass 'X86 FP Stackifier' on function '@f3'
Abort


-------- ir ---------
; ModuleID = 'module_name'

declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32,
i1) nounwind

define void @f3(double %a, [2 x double]*) {
entry:
  %r1 = alloca [2 x double]
  br label %1

; <label>:1                                       ; preds = %entry
  %2 = getelementptr [2 x double]* %r1, i64 0, i64 0
  store double %a, double* %2
  br label %3

; <label>:3                                       ; preds = %1
  %4 = getelementptr [2 x double]* %r1, i64 0, i64 1
  store double %a, double* %4
  br label %5

; <label>:5                                       ; preds = %3
  %6 = bitcast [2 x double]* %0 to i8*
  %7 = bitcast [2 x double]* %r1 to i8*
  call void @llvm.memcpy.p0i8.p0i8.i64(i8* %6, i8* %7, i64 16, i32 4, i1 false)
  ret void
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20131016/cf3750e5/attachment.html>


More information about the llvm-bugs mailing list