[llvm] [GlobalIsel] Speedup select to integer min/max (PR #92378)
Thorsten Schütt via llvm-commits
llvm-commits at lists.llvm.org
Thu May 16 05:07:18 PDT 2024
================
@@ -1307,6 +1307,13 @@ def select_to_minmax: GICombineRule<
[{ return Helper.matchSimplifySelectToMinMax(*${root}, ${info}); }]),
(apply [{ Helper.applyBuildFn(*${root}, ${info}); }])>;
+def select_to_iminmax: GICombineRule<
+ (defs root:$root, build_fn_matchinfo:$info),
+ (match (G_ICMP $tst, $tst1, $x, $y),
+ (G_SELECT $root, $tst, $x, $y),
+ [{ return Helper.matchSelectIMinMax(${root}, ${info}); }]),
+ (apply [{ Helper.applyBuildFnMO(${root}, ${info}); }])>;
----------------
tschuett wrote:
When the pattern matches, the propability for a combine is higher and the pattern hits less often.
https://github.com/llvm/llvm-project/pull/92378
More information about the llvm-commits
mailing list