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

via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 12 00:16:16 PDT 2024


================
@@ -1,8 +1,18 @@
-; RUN: llc -march=mips -mattr=single-float  < %s | FileCheck %s
+; RUN: llc -march=mips -mcpu=mips32 -mattr=single-float -O2 < %s | FileCheck %s
+; RUN: llc -march=mips -mcpu=mips32r2 -mattr=single-float -O2 < %s | FileCheck %s
 
 define double @dofloat(double %a, double %b) nounwind {
----------------
yingopq wrote:

Because we have defined 32r2-32max support custom `ISD::BITCAST`:
```
if (Subtarget.hasMips32r2() && !Subtarget.useSoftFloat() &&
      !Subtarget.hasMips64()) {
    setOperationAction(ISD::BITCAST, MVT::i64, Custom);
  }
```

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


More information about the llvm-commits mailing list