OSDN Git Service

[AArch64][GlobalISel] Enable extending loads combines post-legalization.
authorAmara Emerson <aemerson@apple.com>
Fri, 22 May 2020 21:21:50 +0000 (14:21 -0700)
committerAmara Emerson <aemerson@apple.com>
Fri, 29 May 2020 05:48:20 +0000 (22:48 -0700)
commita0c90b5b2ad6a81e8aded5ad59cc25ff58464bcf
tree9a39732acdcede52c333def40c2de252c0da5a0b
parent3ea38b5b4e6b0684b352a79191b55472aac09f13
[AArch64][GlobalISel] Enable extending loads combines post-legalization.

During legalization we can end up with extends of loads, which in the case of
zexts causes us to not hit tablegen imported patterns.

The caveat here is that we don't want anyext load forming, since some variants
are illegal. This change also prevents the combine from creating any illegal
loads.

Differential Revision: https://reviews.llvm.org/D80458
llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
llvm/lib/Target/AArch64/AArch64Combine.td
llvm/lib/Target/AArch64/AArch64PostLegalizerCombiner.cpp
llvm/test/CodeGen/AArch64/GlobalISel/postlegalizercombiner-extending-loads.mir [new file with mode: 0644]