[llvm] [AMDGPU] Select v_lshl_add_u32 instead of v_mul_lo_u32 by constant (PR #71035)
    Matt Arsenault via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Nov  2 01:28:28 PDT 2023
    
    
  
================
@@ -4080,6 +4080,17 @@ SDValue AMDGPUTargetLowering::performMulCombine(SDNode *N,
   SDValue N0 = N->getOperand(0);
   SDValue N1 = N->getOperand(1);
 
+  // FIXME: Probably should only be done for gfx9 and onward.
+  if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(N1)) {
+    APInt CVal = C->getAPIntValue();
----------------
arsenm wrote:
Don't bother with the APInt, can just go to int64 
https://github.com/llvm/llvm-project/pull/71035
    
    
More information about the llvm-commits
mailing list