[llvm] [AMDGPU] Don't create mulhi_24 in CGP (PR #72983)

Pierre van Houtryve via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 28 04:02:52 PST 2023


================
@@ -862,6 +862,17 @@ def :  divergent_i64_BinOp <and, V_AND_B32_e64>;
 def :  divergent_i64_BinOp <or,  V_OR_B32_e64>;
 def :  divergent_i64_BinOp <xor, V_XOR_B32_e64>;
 
+// mul24 w/ 64 bit output.
+class mul24_64_Pat<SDPatternOperator Op, Instruction InstLo, Instruction InstHi> : GCNPat<
+  (i64 (Op i32:$src0, i32:$src1)),
----------------
Pierre-vh wrote:

The point of this patch is that patterns should only ever have to match `AMDGPUmul_i24` and not match the whole build_vector for the i64 case, so it's intentional that we're selecting the pattern instead of breaking it up in lowering

cc @jayfoad 

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


More information about the llvm-commits mailing list