[AArch64][GlobalISel] Make G_SEXT_INREG legal and add selection support.
authorAmara Emerson <aemerson@apple.com>
Wed, 17 Jun 2020 05:11:41 +0000 (22:11 -0700)
committerAmara Emerson <aemerson@apple.com>
Fri, 19 Jun 2020 20:20:41 +0000 (13:20 -0700)
commit1feeecf224c6f5a62c284e1547866712f643a976
tree1fd079e01280b716b5024173ff339add5bb0985f
parent05e1612c4345353680752bad23eb52eba3ab51a3
[AArch64][GlobalISel] Make G_SEXT_INREG legal and add selection support.

We were defaulting to the lower action for this, resulting in SHL+ASHR
sequences. On AArch64 we can do this in one instruction for an arbitrary
extension using SBFM as we do for G_SEXT.

Differential Revision: https://reviews.llvm.org/D81992
llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
llvm/test/CodeGen/AArch64/GlobalISel/legalize-div.mir
llvm/test/CodeGen/AArch64/GlobalISel/legalize-ext.mir
llvm/test/CodeGen/AArch64/GlobalISel/legalize-itofp.mir
llvm/test/CodeGen/AArch64/GlobalISel/legalize-ptr-add.mir
llvm/test/CodeGen/AArch64/GlobalISel/legalize-rem.mir
llvm/test/CodeGen/AArch64/GlobalISel/legalize-sext.mir
llvm/test/CodeGen/AArch64/GlobalISel/legalize-shift.mir
llvm/test/CodeGen/AArch64/GlobalISel/legalize-undef.mir