[llvm] selecting v_sat_pk instruction, version 2 (PR #123297)
Pierre van Houtryve via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 17 00:11:28 PST 2025
================
@@ -865,6 +865,15 @@ SITargetLowering::SITargetLowering(const TargetMachine &TM,
setOperationAction({ISD::FMAXIMUM, ISD::FMINIMUM}, MVT::v2f16, Legal);
}
+ // special dealing for v_sat_pk instruction
+ if (AMDGPU::isGFX9(STI) || AMDGPU::isGFX11(STI) || AMDGPU::isGFX12(STI)) {
+ // In foldToSaturated during DAG combine
+ // 1. isOperationLegalOrCustom(Opc, SrcVT) getOperationAction(Op, SrcVT) == Custom
+ // 2. isTypeDesirableForOp checks regclass for v2i8 (hooked now checking DstVT == v2i8)
+ // In CustomLowerNode during legalizing, checks getOperationAction(Op, DstVT) == Custom
----------------
Pierre-vh wrote:
Leftover debug comments?
https://github.com/llvm/llvm-project/pull/123297
More information about the llvm-commits
mailing list