[llvm] [GISel] Convert zext nneg to sext if it is cheaper (PR #93856)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri May 31 02:49:31 PDT 2024


================
@@ -1780,6 +1780,8 @@ def fma_combines : GICombineGroup<[combine_fadd_fmul_to_fmad_or_fma,
 def constant_fold_binops : GICombineGroup<[constant_fold_binop,
                                            constant_fold_fp_binop]>;
 
+def prefer_sign_combines : GICombineGroup<[nneg_zext]>;
+
 def all_combines : GICombineGroup<[integer_reassoc_combines, trivial_combines,
----------------
arsenm wrote:

we probably should have a "mostly" target independent group, but that's another change 

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


More information about the llvm-commits mailing list