]> granicus.if.org Git - llvm/commit
[LegalizeTypes] Don't call PromoteTargetBoolean from SplitVecOp_VSETCC.
authorCraig Topper <craig.topper@intel.com>
Wed, 16 Oct 2019 02:50:04 +0000 (02:50 +0000)
committerCraig Topper <craig.topper@intel.com>
Wed, 16 Oct 2019 02:50:04 +0000 (02:50 +0000)
commit5ddd81415da4049b3018d619fc167f10fc2ce9c4
treeea1bb164cdc75e09e867263a5a3faf5140608fb7
parent404e52ddf4e0dd044a6d5a829bdc83edb441eba2
[LegalizeTypes] Don't call PromoteTargetBoolean from SplitVecOp_VSETCC.

PromoteTargetBoolean calls getSetccResultType to get the return
type. But we were passing it the setcc result type rather than the
setcc input type. This causes an issue on X86 with avx512vl where
the setcc result type for vXf16 vectors is vXi16 while the
result type for vXi16 vectors is vXi1.

There's really no guarantee that getSetccResultType is the type
we need here. So now we just grab the extend type from
getExtendForContent and extend to the original result VT of the
node we're splitting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374970 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
test/CodeGen/X86/avx512-vec-cmp.ll