[llvm] [AArch64] Extend usage of `XAR` instruction for fixed-length operations (PR #139460)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 8 10:39:43 PDT 2025
================
@@ -4632,41 +4661,68 @@ bool AArch64DAGToDAGISel::trySelectXAR(SDNode *N) {
SDValue Imm = CurDAG->getTargetConstant(
ShAmt, DL, N0.getOperand(1).getValueType(), false);
- if (ShAmt + HsAmt != 64)
+ unsigned VTSizeInBits = VT.getScalarSizeInBits();
+ if (ShAmt + HsAmt != VTSizeInBits)
return false;
if (!IsXOROperand) {
SDValue Zero = CurDAG->getTargetConstant(0, DL, MVT::i64);
- SDNode *MOV =
- CurDAG->getMachineNode(AArch64::MOVIv2d_ns, DL, MVT::v2i64, Zero);
+ SDNode *MOV = CurDAG->getMachineNode(AArch64::MOVIv2d_ns, DL, SVT, Zero);
----------------
davemgreen wrote:
I believe this can be MVT::v2i64, which would better match the instruction that is being generated and should work with the extracts we now have.
https://github.com/llvm/llvm-project/pull/139460
More information about the llvm-commits
mailing list