Check SSSE3 instead of SSE4.1

- All shuffle insns required, especially PSHUB, are added in SSSE3.

llvm-svn: 166086
This commit is contained in:
Michael Liao 2012-10-17 03:59:18 +00:00
parent db8bc2e5dc
commit f5ea791113

View File

@ -15477,11 +15477,11 @@ static SDValue PerformLOADCombine(SDNode *N, SelectionDAG &DAG,
ISD::LoadExtType Ext = Ld->getExtensionType();
// If this is a vector EXT Load then attempt to optimize it using a
// shuffle. We need SSE4 for the shuffles.
// shuffle. We need SSSE3 shuffles.
// TODO: It is possible to support ZExt by zeroing the undef values
// during the shuffle phase or after the shuffle.
if (RegVT.isVector() && RegVT.isInteger() &&
Ext == ISD::EXTLOAD && Subtarget->hasSSE41()) {
Ext == ISD::EXTLOAD && Subtarget->hasSSSE3()) {
assert(MemVT != RegVT && "Cannot extend to the same type");
assert(MemVT.isVector() && "Must load a vector from memory");