<div dir="ltr">Hi,<div><br></div><div>I have an ir at the end of this email. Run it with:</div><div><br></div><div>llc -mcpu=i386 -march=x86-64 -mattr=-sse2<br></div><div><br></div><div>and get assertion below. Changing cpu does not help. </div>
<div><br></div><div>I am using llc from the latest svn repository.</div><div><br></div><div>Any suggestions to work around this? I need to disable sse2 instructions for x86-64.</div><div><br></div><div>Thanks,</div><div>
<br></div><div>-Peng</div><div><br></div><div>-----error message------</div><div><br></div><div><div><div>llc: X86FloatingPoint.cpp:332: unsigned int getFPReg(const llvm::MachineOperand &): Assertion `Reg >= X86::FP0 && Reg <= X86::FP6 && "Expected FP register!"' failed.</div>
<div>0 llc 0x0000000000f75942 llvm::sys::PrintStackTrace(_IO_FILE*) + 34</div><div>1 llc 0x0000000000f75ed8</div><div>2 libpthread.so.0 0x00007f23f8edef60</div><div>3 libc.so.6 0x00007f23f7fe9165 gsignal + 53</div>
<div>4 libc.so.6 0x00007f23f7febf70 abort + 384</div><div>5 libc.so.6 0x00007f23f7fe22b1 __assert_fail + 241</div><div>6 llc 0x00000000008cf260</div><div>7 llc 0x00000000008cbb3e</div>
<div>8 llc 0x00000000008cb443</div><div>9 llc 0x0000000000bbfaa7 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 55</div><div>10 llc 0x0000000000f149a6 llvm::FPPassManager::runOnFunction(llvm::Function&) + 310</div>
<div>11 llc 0x0000000000f14c1b llvm::FPPassManager::runOnModule(llvm::Module&) + 59</div><div>12 llc 0x0000000000f14eee llvm::MPPassManager::runOnModule(llvm::Module&) + 334</div><div>13 llc 0x0000000000f15515 llvm::PassManagerImpl::run(llvm::Module&) + 293</div>
<div>14 llc 0x0000000000f1569a llvm::PassManager::run(llvm::Module&) + 10</div><div>15 llc 0x00000000005193e8 main + 6232</div><div>16 libc.so.6 0x00007f23f7fd5c4d __libc_start_main + 253</div>
<div>17 llc 0x0000000000517ac9</div><div>Stack dump:</div><div>0.<span class="" style="white-space:pre"> </span>Program arguments: /local/pcheng/tmp/llvm_build/bin/llc -mcpu=i386 -march=x86-64 -mattr=-sse2 test.ll -o test.bc </div>
<div>1.<span class="" style="white-space:pre"> </span>Running pass 'Function Pass Manager' on module 'test.ll'.</div><div>2.<span class="" style="white-space:pre"> </span>Running pass 'X86 FP Stackifier' on function '@f3'</div>
<div>Abort</div></div></div><div><br></div><div><br></div><div>-------- ir ---------</div><div><div><div>; ModuleID = 'module_name'</div><div><br></div><div>declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind</div>
<div><br></div><div>define void @f3(double %a, [2 x double]*) {</div><div>entry:</div><div> %r1 = alloca [2 x double]</div><div> br label %1</div><div><br></div><div>; <label>:1 ; preds = %entry</div>
<div> %2 = getelementptr [2 x double]* %r1, i64 0, i64 0</div><div> store double %a, double* %2</div><div> br label %3</div><div><br></div><div>; <label>:3 ; preds = %1</div>
<div> %4 = getelementptr [2 x double]* %r1, i64 0, i64 1</div><div> store double %a, double* %4</div><div> br label %5</div><div><br></div><div>; <label>:5 ; preds = %3</div>
<div> %6 = bitcast [2 x double]* %0 to i8*</div><div> %7 = bitcast [2 x double]* %r1 to i8*</div><div> call void @llvm.memcpy.p0i8.p0i8.i64(i8* %6, i8* %7, i64 16, i32 4, i1 false)</div><div> ret void</div><div>}</div>
</div></div><div><br></div></div>