[llvm] [AMDGPU][SDAG] Legalise v2i32 or/xor/and instructions to make use of 64-bit wide instructions (PR #140694)
Chris Jackson via llvm-commits
llvm-commits at lists.llvm.org
Wed May 21 01:39:45 PDT 2025
================
@@ -430,6 +430,14 @@ SITargetLowering::SITargetLowering(const TargetMachine &TM,
setOperationAction(ISD::VECTOR_SHUFFLE, {MVT::v2i32, MVT::v2f32}, Legal);
}
+ setOperationAction({ISD::AND, ISD::OR, ISD::XOR}, MVT::v2i32, Legal);
+ // Prevent SELECT from being implemented with the above bitwise ops and
+ // instead use cndmask.
+ setOperationAction(ISD::SELECT, MVT::v2i32, Custom);
----------------
chrisjbris wrote:
I set custom here so that SITargetLowering::LowerSELECT() could be applied.
https://github.com/llvm/llvm-project/pull/140694
More information about the llvm-commits
mailing list