1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

Expand ZERO_EXTEND operations for NEON vector types.

Testcase from Nick Lewycky.

llvm-svn: 111341
This commit is contained in:
Bob Wilson 2010-08-18 01:45:52 +00:00
parent b5ea21038d
commit 412be3eea6
2 changed files with 8 additions and 0 deletions

View File

@ -125,6 +125,7 @@ void ARMTargetLowering::addTypeForNEON(EVT VT, EVT PromotedLdStVT,
setOperationAction(ISD::EXTRACT_SUBVECTOR, VT.getSimpleVT(), Expand); setOperationAction(ISD::EXTRACT_SUBVECTOR, VT.getSimpleVT(), Expand);
setOperationAction(ISD::SELECT, VT.getSimpleVT(), Expand); setOperationAction(ISD::SELECT, VT.getSimpleVT(), Expand);
setOperationAction(ISD::SELECT_CC, VT.getSimpleVT(), Expand); setOperationAction(ISD::SELECT_CC, VT.getSimpleVT(), Expand);
setOperationAction(ISD::ZERO_EXTEND, VT.getSimpleVT(), Expand);
if (VT.isInteger()) { if (VT.isInteger()) {
setOperationAction(ISD::SHL, VT.getSimpleVT(), Custom); setOperationAction(ISD::SHL, VT.getSimpleVT(), Custom);
setOperationAction(ISD::SRA, VT.getSimpleVT(), Custom); setOperationAction(ISD::SRA, VT.getSimpleVT(), Custom);

View File

@ -0,0 +1,7 @@
; RUN: llc -march=arm -mattr=+neon -O2 -o /dev/null
; This used to crash.
define <4 x i32> @test1(<4 x i16> %a) {
%A = zext <4 x i16> %a to <4 x i32>
ret <4 x i32> %A
}