[llvm] [GlobalIsel][NFC] Refactor ext of trunc (PR #92533)
Thorsten Schütt via llvm-commits
llvm-commits at lists.llvm.org
Fri May 17 08:17:24 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),
----------------
tschuett wrote:
No tests failed, but it is not NFC. The copy optimization does not hit anymore, which includes G_ASSERT_ZEXT.
https://github.com/llvm/llvm-project/pull/92533
More information about the llvm-commits
mailing list