[llvm-branch-commits] [llvm] [AMDGPU] Fold 24 bit multiply with zero low bits (PR #224537)

Harrison Hao via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Sep 18 20:46:25 PDT 2026


================
@@ -4087,6 +4087,11 @@ static SDValue simplifyMul24(SDNode *Node24,
 
   APInt Demanded = APInt::getLowBitsSet(LHS.getValueSizeInBits(), 24);
 
+  // The 24 bit multiplies only read bits [23:0] of each source.
+  if (DAG.MaskedValueIsZero(LHS, Demanded) ||
----------------
harrisonGPU wrote:

I agree your point, I will try to explore it.

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


More information about the llvm-branch-commits mailing list