]> granicus.if.org Git - llvm/commitdiff
[X86] Teach combineX86ShuffleChain that AllowIntDomain requires at least SSE2.
authorCraig Topper <craig.topper@intel.com>
Mon, 27 Nov 2017 18:15:14 +0000 (18:15 +0000)
committerCraig Topper <craig.topper@intel.com>
Mon, 27 Nov 2017 18:15:14 +0000 (18:15 +0000)
I don't have a good test case for this at the moment. I was playing around with a change in legalizing and triggered this code to produce a PSHUFD with sse1 only.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319066 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ISelLowering.cpp

index 7dd3e6380558092c73c9ba72e18299735489efb0..36e8388127018e44e9d3cabb2b38c5874f859264 100644 (file)
@@ -28343,7 +28343,7 @@ static SDValue combineX86ShuffleChain(ArrayRef<SDValue> Inputs, SDValue Root,
   // Which shuffle domains are permitted?
   // Permit domain crossing at higher combine depths.
   bool AllowFloatDomain = FloatDomain || (Depth > 3);
-  bool AllowIntDomain = (!FloatDomain || (Depth > 3)) &&
+  bool AllowIntDomain = (!FloatDomain || (Depth > 3)) && Subtarget.hasSSE2() &&
                         (!MaskVT.is256BitVector() || Subtarget.hasAVX2());
 
   // Determine zeroable mask elements.