AArch64: use xzr/wzr for constant 0 in GlobalISel.
authorTim Northover <tnorthover@apple.com>
Tue, 6 Aug 2019 09:18:41 +0000 (09:18 +0000)
committerTim Northover <tnorthover@apple.com>
Tue, 6 Aug 2019 09:18:41 +0000 (09:18 +0000)
commitde98e92bc2b691248fd6557cea1c03237e21adb2
treead7fe0d0d71c2b7f601c8a90341efc40b6f8fca7
parenta7b6a7c851ebad0b626b05618d271ac24c17e0e8
AArch64: use xzr/wzr for constant 0 in GlobalISel.

COPYs from xzr and wzr can often be folded away entirely during register
allocation, unlike a movz.

llvm-svn: 368003
llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp
llvm/test/CodeGen/AArch64/GlobalISel/fold-select.mir
llvm/test/CodeGen/AArch64/GlobalISel/opt-fold-compare.mir
llvm/test/CodeGen/AArch64/GlobalISel/select-cmpxchg.mir
llvm/test/CodeGen/AArch64/GlobalISel/select-jump-table-brjt.mir
llvm/test/CodeGen/AArch64/GlobalISel/swifterror.ll