[llvm] [AMDGPU][SDAG] Legalise v2i32 or/xor/and instructions to make use of 64-bit wide instructions (PR #140694)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu May 22 06:08:35 PDT 2025


================
@@ -5929,6 +5944,36 @@ SDValue SITargetLowering::splitUnaryVectorOp(SDValue Op,
   return DAG.getNode(ISD::CONCAT_VECTORS, SDLoc(Op), VT, OpLo, OpHi);
 }
 
+// Enable lowering of ROTR for vxi32 types.
+SDValue SITargetLowering::lowerROTR(SDValue Op, SelectionDAG &DAG) const {
+  unsigned Opc = Op.getOpcode();
+  EVT VT = Op.getValueType();
+  assert(Opc == ISD::ROTR && "Expected ROTR Opcode for lowerROTR.");
+
+  assert((VT == MVT::v2i32 || VT == MVT::v4i32 || VT == MVT::v8i32 ||
+          VT == MVT::v16i32) &&
+         "Unexpected ValueType.");
+
+  unsigned VectorSize = VT.getVectorNumElements();
+  EVT ElementType = VT.getVectorElementType();
+  SDLoc SL(Op);
+  auto LHS = Op->getOperand(0);
+  auto RHS = Op->getOperand(1);
----------------
arsenm wrote:

no auto 

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


More information about the llvm-commits mailing list