[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
Tue May 20 07:30:51 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);
----------------
arsenm wrote:
Probably should fix whatever combiner logic is doing this. In the future we probably should make a similar change for select to better make use of s_cselect_b64
https://github.com/llvm/llvm-project/pull/140694
More information about the llvm-commits
mailing list