[llvm] [GlobalISel] Combine [S,U]SUBO (PR #116489)

Thorsten Schütt via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 18 11:33:27 PST 2024


================
@@ -1385,6 +1385,12 @@ def match_addos : GICombineRule<
         [{ return Helper.matchAddOverflow(*${root}, ${matchinfo}); }]),
   (apply [{ Helper.applyBuildFn(*${root}, ${matchinfo}); }])>;
 
+def match_subo_no_overflow : GICombineRule<
+  (defs root:$root, build_fn_matchinfo:$matchinfo),
+  (match (wip_match_opcode G_SSUBO, G_USUBO):$root,
----------------
tschuett wrote:

We real/only issue with `wip_match_opcode`is when the docstring says, e.g.  G_FNEG(G_BUILD_VECTOR), and the user is doing `wip_match_opcode` with G_FNEG. It looses precision.

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


More information about the llvm-commits mailing list