[AArch64] Fix v2i8->i16 bitcast legalization.
authorAhmed Bougacha <ahmed.bougacha@gmail.com>
Mon, 1 Dec 2014 20:52:32 +0000 (20:52 +0000)
committerAhmed Bougacha <ahmed.bougacha@gmail.com>
Mon, 1 Dec 2014 20:52:32 +0000 (20:52 +0000)
commit879463206e16eb0a03dd86c14aeba792355dea47
treeab71373490e8abcfe313a4f5a7e9985acd3cae1d
parent7a64ec24d64f1f24906bce220ad6a6ff8b5812fe
[AArch64] Fix v2i8->i16 bitcast legalization.

r213378 improved f16 bitcasts, so that they go directly through subregs,
instead of through the stack.  That code now causes an assertion failure
for bitcasts from other 16-bits types (most importantly v2i8).

Correct that by doing the custom lowering for i16 bitcasts only when the
input is an f16.

Part of PR21549.

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

llvm-svn: 223074
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/test/CodeGen/AArch64/bitcast-v2i8.ll [new file with mode: 0644]