[llvm] [RISCV] Don't create BuildPairF64 or SplitF64 nodes without D or Zdinx. (PR #116159)
Sam Elliott via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 14 04:19:37 PST 2024
================
@@ -6422,7 +6423,8 @@ SDValue RISCVTargetLowering::LowerOperation(SDValue Op,
SDValue NewOp0 = DAG.getNode(ISD::ANY_EXTEND, DL, MVT::i64, Op0);
return DAG.getNode(RISCVISD::FMV_W_X_RV64, DL, MVT::f32, NewOp0);
}
- if (VT == MVT::f64 && Op0VT == MVT::i64 && XLenVT == MVT::i32) {
+ if (VT == MVT::f64 && Op0VT == MVT::i64 && XLenVT == MVT::i32 &&
+ Subtarget.hasStdExtDOrZdinx()) {
----------------
lenary wrote:
Just a readability suggestion:
```suggestion
if (VT == MVT::f64 && Op0VT == MVT::i64 && !Subtarget.is64Bit() &&
Subtarget.hasStdExtDOrZdinx()) {
```
Writing the conditions like this makes them match a lot more closely to the conditions on the relevant `setOperationAction(ISD::BITCAST, MVT::i64, Custom);` (on line 555 I believe)
I'll remove my similar change from the GPR Pairs PR, as it's no longer really relevant there.
https://github.com/llvm/llvm-project/pull/116159
More information about the llvm-commits
mailing list