Closed llvmbot closed 2 years ago
mentioned in issue llvm/llvm-project#1251
Yep, we don't support the X87 FP stack yet. There should be a -D option you can build with to avoid these asms (-DNO_MATH_INLINES ?)
-Chris
This bug has been marked as a duplicate of 879
Extended Description
The following is simplified from the x86 atan2 code in glibc's mathinline.h:
double atan (double x) { register double value; __asm ("fld1; fpatan" : "=t" (value) : "0" (x) : "st(1)"); return value; }
A quite recent llvm-gcc4 barfs on it:
$ gcc -c atan.c cc1: llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:364: void llvm::ScheduleDAG::AddOperand(llvm::MachineInstr, llvm::SDOperand, unsigned int, const llvm::TargetInstrDescriptor, llvm::DenseMap<llvm::SDNode*, unsigned int>&): Assertion `RegMap->getRegClass(VReg) == RC && "Register class of operand and regclass of use don't agree!"' failed. atan.c:6: internal compiler error: Aborted Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://llvm.org/bugs> for instructions.