AArch64: fix 128-bit shifts
authorTim Northover <tnorthover@apple.com>
Wed, 2 Dec 2015 00:33:54 +0000 (00:33 +0000)
committerTim Northover <tnorthover@apple.com>
Wed, 2 Dec 2015 00:33:54 +0000 (00:33 +0000)
commit6837bcf91183ed877d02ecd1d78a4a56c957a1f9
tree7f8204f96630827f042e5ec239ceecd4a07a6333
parentc322221121b04c570046a4c7c5f9100b163cef06
AArch64: fix 128-bit shifts

We mustn't introduce a shift of exactly 64-bits for any inputs, since that's an
UNDEF value (and worse, it's not what you want with the natural Arch64
implementation).

The generated code is pretty horrific, but I couldn't come up with an obviously
better alternative (if the amount is constant EXTR could help). Turns out
128-bit shifts are just nasty.

rdar://22491037

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254475 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64ISelLowering.cpp
test/CodeGen/AArch64/arm64-long-shift.ll