[llvm] [GlobalISel] Combine G_MERGE_VALUES of x and undef (PR #113616)
Thorsten Schütt via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 25 10:57:26 PDT 2024
================
@@ -412,7 +412,7 @@ def binop_right_undef_to_undef: GICombineRule<
def unary_undef_to_zero: GICombineRule<
(defs root:$root),
- (match (wip_match_opcode G_ABS):$root,
+ (match (wip_match_opcode G_ABS, G_ZEXT):$root,
----------------
tschuett wrote:
One version of this PR combined into G_ZEXT. Here, we are combining G_ZEXT of undef into 0. It relies on the helper
```
Helper.replaceInstWithConstant(*${root}, 0);
```
https://github.com/llvm/llvm-project/pull/113616
More information about the llvm-commits
mailing list