[llvm] [GlobalISel] Combine [a, s, z]ext of undef into 0 or undef (PR #117439)
Thorsten Schütt via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 25 11:53:57 PST 2024
================
@@ -1857,6 +1857,27 @@ class integer_of_opcode<Instruction castOpcode> : GICombineRule <
def integer_of_truncate : integer_of_opcode<G_TRUNC>;
+def anyext_undef: GICombineRule<
+ (defs root:$root),
+ (match (G_IMPLICIT_DEF $undef),
+ (G_ANYEXT $root, $undef):$Aext,
+ [{ return Helper.isUndefLegalOrBeforeLegalizer(MRI.getType(${Aext}->getOperand(0).getReg())); }]),
+ (apply [{ Helper.replaceInstWithUndef(*${Aext}); }])>;
----------------
tschuett wrote:
> That's understandable since scalable vectors are not implemented at all.
That is not true. There are running GlobalISel tests with SVE every time you invoke `ninja check-llvm-codegen-aarch64`.
https://github.com/llvm/llvm-project/pull/117439
More information about the llvm-commits
mailing list