[llvm] [MIPS] Fix -msingle-float doesn't work with double on O32 (PR #107543)

via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 10 18:44:34 PDT 2024


yingopq wrote:

> No. This problem is about clang not llc. The `llvm/test/CodeGen/Mips/2008-07-06-fadd64.ll` is already OK. Please see the bug report.

The `lvm/test/CodeGen/Mips/2008-07-06-fadd64.ll` file was discovered when I was looking for test cases that covered this problem reported.

This fix can resolve the bug reported, and when configured `-mcpu=mips32r2 -mattr=single-float`, llc and clang have same error info, debug information and issue reason. So I chose to improve this test case.
```
$ sudo ./build/bin/llc -march=mips -mcpu=mips32r2 -mattr=single-float -O2 < llvm/test/CodeGen/Mips/2008-07-06-fadd64.ll
	.text
	.abicalls
	.option	pic0
	.section	.mdebug.abi32,"", at progbits
	.nan	legacy
	.text
	.file	"<stdin>"
SoftenFloatOperand Op #0: t46: i32 = MipsISD::ExtractElementF64 t13, Constant:i32<1>

LLVM ERROR: Do not know how to soften this operator's operand!
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.	Program arguments: ./build/bin/llc -march=mips -mcpu=mips32r2 -mattr=single-float -O2
1.	Running pass 'Function Pass Manager' on module '<stdin>'.
2.	Running pass 'MIPS DAG->DAG Pattern Instruction Selection' on function '@dofloat'
```



https://github.com/llvm/llvm-project/pull/107543


More information about the llvm-commits mailing list