[llvm] [WIP] [AMDGPU] [GlobalIsel] Combine Fmul with Select into ldexp instruction. (PR #120104)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 19 22:38:39 PST 2024


================
@@ -125,14 +125,14 @@ def sign_extension_in_reg : GICombineRule<
   (apply [{ applyCombineSignExtendInReg(*${sign_inreg}, ${matchinfo}); }])>;
 
 // Do the following combines :
-// fmul x, select(y, A, B)   -> ldexp (x, select i32 (y, a, b))
-// fmul x, select(y, -A, -B) -> ldexp ((fneg x), select i32 (y, a, b))
-def combine_fmul_with_select_to_ldexp : GICombineRule<
+// fmul x, select(y, A, B)   -> fldexp (x, select i32 (y, a, b))
+// fmul x, select(y, -A, -B) -> fldexp ((fneg x), select i32 (y, a, b))
+def combine_fmul_with_select_to_fldexp : GICombineRule<
----------------
arsenm wrote:

We really should have complex patterns and constant xforms like selection patterns 

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


More information about the llvm-commits mailing list