]> granicus.if.org Git - llvm/commitdiff
[X86][AVX2] Hide VPBLENDD instructions behind AVX2 predicate
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 19 Feb 2019 17:23:55 +0000 (17:23 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 19 Feb 2019 17:23:55 +0000 (17:23 +0000)
This was the cause of the regression in D57888 - the commuted load pattern wasn't hidden by the predicate so once we enabled v4i32 blends on SSE41+ targets then isel was incorrectly matched against AVX2+ instructions.

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

lib/Target/X86/X86InstrSSE.td

index a55b1489e9e53252d010bb326c0b35f4a287a8bd..c37f12274384a199d01bcce578446963769106f2 100644 (file)
@@ -7753,12 +7753,14 @@ multiclass AVX2_blend_rmi<bits<8> opc, string OpcodeStr, SDNode OpNode,
                                             (commuteXForm imm:$src3))>;
 }
 
+let Predicates = [HasAVX2] in {
 defm VPBLENDD : AVX2_blend_rmi<0x02, "vpblendd", X86Blendi, v4i32,
                                SchedWriteBlend.XMM, VR128, i128mem,
                                BlendCommuteImm4>;
 defm VPBLENDDY : AVX2_blend_rmi<0x02, "vpblendd", X86Blendi, v8i32,
                                 SchedWriteBlend.YMM, VR256, i256mem,
                                 BlendCommuteImm8>, VEX_L;
+}
 
 // For insertion into the zero index (low half) of a 256-bit vector, it is
 // more efficient to generate a blend with immediate instead of an insert*128.