<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - llc assertion with attribute -sse2 and arch x86-64"
   href="http://llvm.org/bugs/show_bug.cgi?id=17598">17598</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>llc assertion with attribute -sse2 and arch x86-64
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>gm4cheng@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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
}</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>