[llvm] [AMDGPU] Select v_lshl_add_u32 instead of v_mul_lo_u32 by constant (PR #71035)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 3 04:24:46 PDT 2023
================
@@ -612,6 +622,10 @@ def : ThreeOp_i32_Pats<and, or, V_AND_OR_B32_e64>;
def : ThreeOp_i32_Pats<or, or, V_OR3_B32_e64>;
def : ThreeOp_i32_Pats<xor, add, V_XAD_U32_e64>;
+def : GCNPat<
+ (mul i32:$src0, IsPow2_32:$src1),
----------------
jayfoad wrote:
As a general rule we should not select VALU instructions for uniform operations, so this should use `DivergentBinFrag<mul>`.
https://github.com/llvm/llvm-project/pull/71035
More information about the llvm-commits
mailing list