]> granicus.if.org Git - llvm/commit
Merging r228518:
authorHans Wennborg <hans@hanshq.net>
Mon, 9 Feb 2015 02:38:04 +0000 (02:38 +0000)
committerHans Wennborg <hans@hanshq.net>
Mon, 9 Feb 2015 02:38:04 +0000 (02:38 +0000)
commita370ce2421aa739a448a4a0edd456e804ee23257
tree34e92678cb3df5476b028a1a26013c8fb117ff09
parent830a8c2e98caf608f974e6afd11b0161ad270cb3
Merging r228518:
------------------------------------------------------------------------
r228518 | tnorthover | 2015-02-07 16:50:47 -0800 (Sat, 07 Feb 2015) | 15 lines

ARM & AArch64: teach LowerVSETCC that output type size may differ from input.

While various DAG combines try to guarantee that a vector SETCC
operation will have the same output size as input, there's nothing
intrinsic to either creation or LegalizeTypes that actually guarantees
it, so the function needs to be ready to handle a mismatch.

Fortunately this is easy enough, just extend or truncate the naturally
compared result.

I couldn't reproduce the failure in other backends that I know have
SIMD, so it's probably only an issue for these two due to shared
heritage.

Should fix PR21645.
------------------------------------------------------------------------

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