When lowering vector shifts a check is performed to see if the value to shift by
authorLuke Cheeseman <luke.cheeseman@arm.com>
Fri, 24 Jul 2015 09:31:48 +0000 (09:31 +0000)
committerLuke Cheeseman <luke.cheeseman@arm.com>
Fri, 24 Jul 2015 09:31:48 +0000 (09:31 +0000)
commitca2a3eb2e71b782045a4e48f1a26e709b43db2ff
treeed6e35080f26c1176bd26cf806724d1443da71f8
parentfa7f7bd01705bb0eeae8a4b708e0022ddfb3391d
When lowering vector shifts a check is performed to see if the value to shift by
is an immediate, in this check the value is negated and stored in and int64_t.
The value can be -2^63 yet the result cannot be stored in an int64_t and this
gives some undefined behaviour causing failures. The negation is only necessary
when the values is within a certain range and so it should not need to negate
-2^63, this patch introduces this and also a regression test.

Differential Revision: http://reviews.llvm.org/D11408

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243100 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64ISelLowering.cpp
lib/Target/ARM/ARMISelLowering.cpp
test/CodeGen/ARM/neon_vshl_minint.ll [new file with mode: 0644]