[llvm] SystemZ: Stop casting fp typed atomic loads in the IR (PR #90768)
Ulrich Weigand via llvm-commits
llvm-commits at lists.llvm.org
Thu May 2 08:19:23 PDT 2024
================
@@ -6249,6 +6249,22 @@ SDValue SystemZTargetLowering::LowerOperation(SDValue Op,
}
}
+// Manually lower a bitcast to avoid introducing illegal types after type
+// legalization.
+static SDValue expandBitCastI128ToF128(SelectionDAG &DAG, SDValue Src,
+ SDValue Chain, const SDLoc &SL) {
+ SDValue Hi =
+ DAG.getTargetExtractSubreg(SystemZ::subreg_h64, SL, MVT::i64, Src);
+ SDValue Lo =
+ DAG.getTargetExtractSubreg(SystemZ::subreg_l64, SL, MVT::i64, Src);
+
+ Hi = DAG.getBitcast(MVT::f64, Hi);
+ Lo = DAG.getBitcast(MVT::f64, Lo);
+
+ SDNode *Pair = DAG.getMachineNode(SystemZ::PAIR128, SL, MVT::f128, Hi, Lo);
----------------
uweigand wrote:
I'm assuming this pre-reqs https://github.com/llvm/llvm-project/pull/90640 (otherwise emitPair128 would hard-code GR128 temporaries)? However, even so PAIR128 still hard-codes GR128 here:
```
def PAIR128 : Pseudo<(outs GR128:$dst), (ins GR64:$hi, GR64:$lo), []>;
```
so this presumably would fail with the verifier?
https://github.com/llvm/llvm-project/pull/90768
More information about the llvm-commits
mailing list