[llvm] [GlobalIsel][NFC] Refactor ext of trunc (PR #92533)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Fri May 17 06:30:25 PDT 2024
================
@@ -735,18 +735,20 @@ def redundant_sext_inreg: GICombineRule <
// the destination type.
def anyext_trunc_fold: GICombineRule <
(defs root:$root, register_matchinfo:$matchinfo),
- (match (wip_match_opcode G_ANYEXT):$root,
- [{ return Helper.matchCombineAnyExtTrunc(*${root}, ${matchinfo}); }]),
- (apply [{ Helper.replaceSingleDefInstWithReg(*${root}, ${matchinfo}); }])
+ (match (G_TRUNC $input, $x),
----------------
jayfoad wrote:
Does this still match if there is a G_ASSERT_ZEXT in between? If so, how? If not, why doesn't it regress the tests added in #74125?
https://github.com/llvm/llvm-project/pull/92533
More information about the llvm-commits
mailing list