[AArch64][GlobalISel] Widen G_PHI before clamping it during legalization
authorJessica Paquette <jpaquette@apple.com>
Wed, 4 Aug 2021 00:40:24 +0000 (17:40 -0700)
committerJessica Paquette <jpaquette@apple.com>
Wed, 4 Aug 2021 17:25:14 +0000 (10:25 -0700)
commitd9279843b1bafcfb1f540d3093b86023025b6717
tree33cede0a315a5268d285807d38baa1efb13ea4a0
parent7d97de60b3ecd52e2a427dff661cdd1ca99617e9
[AArch64][GlobalISel] Widen G_PHI before clamping it during legalization

This allows us to handle weird types like s88; we first widen to s128, then
clamp back down to s64.

https://godbolt.org/z/9xqbP46Mz

Also this makes it possible for GISel to legalize the case in pr48188.ll. It
now does the same thing as SDAG, although regalloc chooses different registers.

Differential Revision: https://reviews.llvm.org/D107417
llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
llvm/test/CodeGen/AArch64/GlobalISel/legalize-phi.mir
llvm/test/CodeGen/AArch64/pr48188.ll