OSDN Git Service

AArch64: More correctly constrain target vector extend lowering.
authorJim Grosbach <grosbach@apple.com>
Thu, 28 Aug 2014 22:08:28 +0000 (22:08 +0000)
committerJim Grosbach <grosbach@apple.com>
Thu, 28 Aug 2014 22:08:28 +0000 (22:08 +0000)
commit0d34b1ed269e8609803ec5c3b3ea8ebc8e03d898
treede9b009d9c21c7191a46889dbdffe267ef8f4f39
parent179b5ee8a8ca96fc5991c6c0a0baed118bb06d61
AArch64: More correctly constrain target vector extend lowering.

The AArch64 target lowering for [zs]ext of vectors is set up to handle
input simple types and expects the generic SDag path to do something reasonable
with anything that's not a simple type. The code, however, was only
checking that the result type was a simple type and assuming that
implied that the source type would also be a simple type. That's not a
valid assumption, as operations like "zext <1 x i1> %0 to <1 x i32>"
demonstrate. The fix is to simply explicitly validate the source type
as well as the result type.

PR20791

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