forked from OSchip/llvm-project
AVX : Fix ISA disabling in case AVX512VL , some instructions should be disabled only if AVX512BW and AVX512VL present.
Tests added. Differential Revision: http://reviews.llvm.org/D11414 llvm-svn: 242987
This commit is contained in:
parent
7d99966e91
commit
87e6397fb1
|
@ -771,6 +771,7 @@ def NoBWI : Predicate<"!Subtarget->hasBWI()">;
|
|||
def HasVLX : Predicate<"Subtarget->hasVLX()">,
|
||||
AssemblerPredicate<"FeatureVLX", "AVX-512 VL ISA">;
|
||||
def NoVLX : Predicate<"!Subtarget->hasVLX()">;
|
||||
def NoVLX_Or_NoBWI : Predicate<"!Subtarget->hasVLX() || !Subtarget->hasBWI()">;
|
||||
|
||||
def HasPOPCNT : Predicate<"Subtarget->hasPOPCNT()">;
|
||||
def HasAES : Predicate<"Subtarget->hasAES()">;
|
||||
|
|
|
@ -4014,39 +4014,39 @@ multiclass PDI_binop_rm2<bits<8> opc, string OpcodeStr, SDNode OpNode,
|
|||
} // ExeDomain = SSEPackedInt
|
||||
|
||||
defm PADDB : PDI_binop_all<0xFC, "paddb", add, v16i8, v32i8,
|
||||
SSE_INTALU_ITINS_P, 1, NoBWI>;
|
||||
SSE_INTALU_ITINS_P, 1, NoVLX_Or_NoBWI>;
|
||||
defm PADDW : PDI_binop_all<0xFD, "paddw", add, v8i16, v16i16,
|
||||
SSE_INTALU_ITINS_P, 1, NoBWI>;
|
||||
SSE_INTALU_ITINS_P, 1, NoVLX_Or_NoBWI>;
|
||||
defm PADDD : PDI_binop_all<0xFE, "paddd", add, v4i32, v8i32,
|
||||
SSE_INTALU_ITINS_P, 1, NoVLX>;
|
||||
defm PADDQ : PDI_binop_all<0xD4, "paddq", add, v2i64, v4i64,
|
||||
SSE_INTALUQ_ITINS_P, 1, NoVLX>;
|
||||
defm PMULLW : PDI_binop_all<0xD5, "pmullw", mul, v8i16, v16i16,
|
||||
SSE_INTMUL_ITINS_P, 1, NoBWI>;
|
||||
SSE_INTMUL_ITINS_P, 1, NoVLX_Or_NoBWI>;
|
||||
defm PMULHUW : PDI_binop_all<0xE4, "pmulhuw", mulhu, v8i16, v16i16,
|
||||
SSE_INTMUL_ITINS_P, 1, NoBWI>;
|
||||
SSE_INTMUL_ITINS_P, 1, NoVLX_Or_NoBWI>;
|
||||
defm PMULHW : PDI_binop_all<0xE5, "pmulhw", mulhs, v8i16, v16i16,
|
||||
SSE_INTMUL_ITINS_P, 1, NoBWI>;
|
||||
SSE_INTMUL_ITINS_P, 1, NoVLX_Or_NoBWI>;
|
||||
defm PSUBB : PDI_binop_all<0xF8, "psubb", sub, v16i8, v32i8,
|
||||
SSE_INTALU_ITINS_P, 0, NoBWI>;
|
||||
SSE_INTALU_ITINS_P, 0, NoVLX_Or_NoBWI>;
|
||||
defm PSUBW : PDI_binop_all<0xF9, "psubw", sub, v8i16, v16i16,
|
||||
SSE_INTALU_ITINS_P, 0, NoBWI>;
|
||||
SSE_INTALU_ITINS_P, 0, NoVLX_Or_NoBWI>;
|
||||
defm PSUBD : PDI_binop_all<0xFA, "psubd", sub, v4i32, v8i32,
|
||||
SSE_INTALU_ITINS_P, 0, NoVLX>;
|
||||
defm PSUBQ : PDI_binop_all<0xFB, "psubq", sub, v2i64, v4i64,
|
||||
SSE_INTALUQ_ITINS_P, 0, NoVLX>;
|
||||
defm PSUBUSB : PDI_binop_all<0xD8, "psubusb", X86subus, v16i8, v32i8,
|
||||
SSE_INTALU_ITINS_P, 0, NoBWI>;
|
||||
SSE_INTALU_ITINS_P, 0, NoVLX_Or_NoBWI>;
|
||||
defm PSUBUSW : PDI_binop_all<0xD9, "psubusw", X86subus, v8i16, v16i16,
|
||||
SSE_INTALU_ITINS_P, 0, NoBWI>;
|
||||
SSE_INTALU_ITINS_P, 0, NoVLX_Or_NoBWI>;
|
||||
defm PMINUB : PDI_binop_all<0xDA, "pminub", umin, v16i8, v32i8,
|
||||
SSE_INTALU_ITINS_P, 1, NoBWI>;
|
||||
SSE_INTALU_ITINS_P, 1, NoVLX_Or_NoBWI>;
|
||||
defm PMINSW : PDI_binop_all<0xEA, "pminsw", smin, v8i16, v16i16,
|
||||
SSE_INTALU_ITINS_P, 1, NoBWI>;
|
||||
SSE_INTALU_ITINS_P, 1, NoVLX_Or_NoBWI>;
|
||||
defm PMAXUB : PDI_binop_all<0xDE, "pmaxub", umax, v16i8, v32i8,
|
||||
SSE_INTALU_ITINS_P, 1, NoBWI>;
|
||||
SSE_INTALU_ITINS_P, 1, NoVLX_Or_NoBWI>;
|
||||
defm PMAXSW : PDI_binop_all<0xEE, "pmaxsw", smax, v8i16, v16i16,
|
||||
SSE_INTALU_ITINS_P, 1, NoBWI>;
|
||||
SSE_INTALU_ITINS_P, 1, NoVLX_Or_NoBWI>;
|
||||
|
||||
// Intrinsic forms
|
||||
defm PSUBSB : PDI_binop_all_int<0xE8, "psubsb", int_x86_sse2_psubs_b,
|
||||
|
@ -4243,15 +4243,15 @@ let ExeDomain = SSEPackedInt, SchedRW = [WriteVecShift], hasSideEffects = 0 in {
|
|||
//===---------------------------------------------------------------------===//
|
||||
|
||||
defm PCMPEQB : PDI_binop_all<0x74, "pcmpeqb", X86pcmpeq, v16i8, v32i8,
|
||||
SSE_INTALU_ITINS_P, 1, NoBWI>;
|
||||
SSE_INTALU_ITINS_P, 1, NoVLX_Or_NoBWI>;
|
||||
defm PCMPEQW : PDI_binop_all<0x75, "pcmpeqw", X86pcmpeq, v8i16, v16i16,
|
||||
SSE_INTALU_ITINS_P, 1, NoBWI>;
|
||||
SSE_INTALU_ITINS_P, 1, NoVLX_Or_NoBWI>;
|
||||
defm PCMPEQD : PDI_binop_all<0x76, "pcmpeqd", X86pcmpeq, v4i32, v8i32,
|
||||
SSE_INTALU_ITINS_P, 1, NoVLX>;
|
||||
defm PCMPGTB : PDI_binop_all<0x64, "pcmpgtb", X86pcmpgt, v16i8, v32i8,
|
||||
SSE_INTALU_ITINS_P, 0, NoBWI>;
|
||||
SSE_INTALU_ITINS_P, 0, NoVLX_Or_NoBWI>;
|
||||
defm PCMPGTW : PDI_binop_all<0x65, "pcmpgtw", X86pcmpgt, v8i16, v16i16,
|
||||
SSE_INTALU_ITINS_P, 0, NoBWI>;
|
||||
SSE_INTALU_ITINS_P, 0, NoVLX_Or_NoBWI>;
|
||||
defm PCMPGTD : PDI_binop_all<0x66, "pcmpgtd", X86pcmpgt, v4i32, v8i32,
|
||||
SSE_INTALU_ITINS_P, 0, NoVLX>;
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
; RUN: llc < %s -mtriple=x86_64-apple-darwin -show-mc-encoding -mcpu=core-avx2 -mattr=+avx2 -o /dev/null
|
||||
; RUN: llc < %s -mtriple=x86_64-apple-darwin -show-mc-encoding -mcpu=knl -o /dev/null
|
||||
; RUN: llc < %s -mtriple=x86_64-apple-darwin -show-mc-encoding -mcpu=knl -mattr=+avx512vl -o /dev/null
|
||||
; RUN: llc < %s -mtriple=x86_64-apple-darwin -show-mc-encoding -mcpu=knl -mattr=+avx512bw -o /dev/null
|
||||
; RUN: llc < %s -mtriple=x86_64-apple-darwin -show-mc-encoding -mcpu=knl -mattr=+avx512vl -mattr=+avx512bw -o /dev/null
|
||||
; RUN: llc < %s -mtriple=x86_64-apple-darwin -show-mc-encoding -mcpu=skx -o /dev/null
|
||||
|
||||
|
|
Loading…
Reference in New Issue