[llvm] [AMDGPU] Do not replace SALU floating point multiply with VALU-only ldexp (PR #145048)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 20 08:29:23 PDT 2025


================
@@ -2,19 +2,34 @@
 ; RUN: llc -global-isel=0 -mtriple=amdgcn -mcpu=gfx1200 < %s | FileCheck -check-prefixes=GFX12,GFX12-SDAG %s
 ; RUN: llc -global-isel=1 -mtriple=amdgcn -mcpu=gfx1200 < %s | FileCheck -check-prefixes=GFX12,GFX12-GISEL %s
 
+; TODO: GlobalISel should avoid generating v_ldexp_f32.
----------------
jayfoad wrote:

I don't think it can be done in the same way, because GISel combines don't have access to UniformityInfo. The normal GISel way would be to do something in RegBankSelect based on the register banks of the operands, but I'm not sure how to make that work in this case. Maybe combine_fmul_with_select_to_fldexp should be moved to post-regbankselect?

Anyway it seemed like too much to put into the current patch.

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


More information about the llvm-commits mailing list