Teach the AArch64 backend to materialize immediates using a pair of ORR-immediate
authorOwen Anderson <resistor@mac.com>
Wed, 4 Jan 2023 06:23:31 +0000 (23:23 -0700)
committerOwen Anderson <resistor@mac.com>
Sun, 5 Feb 2023 05:04:12 +0000 (23:04 -0600)
commitae51a828685d088aca5b5be9dbb3d0695312f2e1
tree413691c95c013c29a1c9065aca5628d4dc626c6e
parent80fe7721827cd52c621544afde0acd21bb7693f5
Teach the AArch64 backend to materialize immediates using a pair of ORR-immediate
instructions.

Credit to czwarich for figuring out the algorithm to test for this.

Re-applied with fix for ubsan error on out-of-range shift.

Reviewed By: dmgreen

Differential Revision: https://reviews.llvm.org/D140952
llvm/lib/Target/AArch64/AArch64ExpandImm.cpp
llvm/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp
llvm/test/CodeGen/AArch64/arm64-movi.ll