ISel: Make VSELECT selection terminate in cases where the condition type has to
authorArnold Schwaighofer <aschwaighofer@apple.com>
Fri, 7 Mar 2014 23:25:55 +0000 (23:25 +0000)
committerArnold Schwaighofer <aschwaighofer@apple.com>
Fri, 7 Mar 2014 23:25:55 +0000 (23:25 +0000)
commitaa5b17b359fca123952666cd3cbff2c228042114
treee0a959db7c2dce6148deb5b5e45de7322473fcdb
parentbd86fbe0d721aaa949d9a7be25fa7ae4d89972b7
ISel: Make VSELECT selection terminate in cases where the condition type has to
be split and the result type widened.

When the condition of a vselect has to be split it makes no sense widening the
vselect and thereby widening the condition. We end up in an endless loop of
widening (vselect result type) and splitting (condition mask type) doing this.
Instead, split both the condition and the vselect and widen the result.

I ran this over the test suite with i686 and mattr=+sse and saw no regressions.

Fixes PR18036.

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