Don't prevent a vselect of constants from becoming a single load (PR20648).
authorSanjay Patel <spatel@rotateright.com>
Wed, 20 Aug 2014 20:34:56 +0000 (20:34 +0000)
committerSanjay Patel <spatel@rotateright.com>
Wed, 20 Aug 2014 20:34:56 +0000 (20:34 +0000)
commit89305e534572e40862e2417af7b0bc37efab10ae
tree03c2dd9f4545dddde544e9e3408ec94c184a5ab6
parent4641d5dbdf0015bb82bb726fcaec7276b8f9fc77
Don't prevent a vselect of constants from becoming a single load (PR20648).

Fix for PR20648 - http://llvm.org/bugs/show_bug.cgi?id=20648

This patch checks the operands of a vselect to see if all values are constants.
If yes, bail out of any further attempts to create a blend or shuffle because
SelectionDAGLegalize knows how to turn this kind of vselect into a single load.

This already happens for machines without SSE4.1, so the added checks just send
more targets down that path.

Differential Revision: http://reviews.llvm.org/D4934

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216121 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/sse41-blend.ll