[SDAG] Don't widen VSETCC during type legalization for split operands
authorHal Finkel <hfinkel@anl.gov>
Mon, 23 Mar 2015 08:22:43 +0000 (08:22 +0000)
committerHal Finkel <hfinkel@anl.gov>
Mon, 23 Mar 2015 08:22:43 +0000 (08:22 +0000)
commite86dbbf0583dd256ee469160a598f848cadd03e5
tree2156bef3da29f0a41963fd281ba74636015f5dbc
parent858c62e51ee983e22915f748447ecef52b432851
[SDAG] Don't widen VSETCC during type legalization for split operands

Because the operands of a vector SETCC node can be of a different type from the
result (and often are), it can happen that even if we'd prefer to widen the
result type of the SETCC, the operands have been split instead. In this case,
the SETCC result also must be split. This mirrors what is done in
WidenVecRes_SELECT, and should be NFC elsewhere because if the operands are not
widened the following calls to GetWidenedVector will assert (which is what was
happening in the test case).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232935 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
test/CodeGen/PowerPC/qpx-split-vsetcc.ll [new file with mode: 0644]