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)
commitd33e94295899364dfb7bbb0a130cab5fdfe26abc
treef09b84e731d99d904c09f0526e540020ec900b3c
parent790b4e527b8403d2e1e220a7a92ed032538b659b
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.

llvm-svn: 203311
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
llvm/test/CodeGen/X86/sse1.ll