From: Craig Topper Date: Thu, 26 Nov 2015 20:02:01 +0000 (+0000) Subject: [X86] Merge X86VPermt2Fp and X86VPermt2Int back together by weakening them just enoug... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1c01e6cc5c12c7825beca242818d3893807a60d8;p=oota-llvm.git [X86] Merge X86VPermt2Fp and X86VPermt2Int back together by weakening them just enough. The SDTCisSameSizeAs introduced in r254138 helps here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254176 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86InstrAVX512.td b/lib/Target/X86/X86InstrAVX512.td index e0a6eebcd4b..8e3aca71257 100644 --- a/lib/Target/X86/X86InstrAVX512.td +++ b/lib/Target/X86/X86InstrAVX512.td @@ -1266,15 +1266,15 @@ multiclass avx512_perm_t_sizes_w opc, string OpcodeStr, } } -defm VPERMT2D : avx512_perm_t_sizes<0x7E, "vpermt2d", X86VPermt2Int, +defm VPERMT2D : avx512_perm_t_sizes<0x7E, "vpermt2d", X86VPermt2, avx512vl_i32_info, avx512vl_i32_info>, EVEX_CD8<32, CD8VF>; -defm VPERMT2Q : avx512_perm_t_sizes<0x7E, "vpermt2q", X86VPermt2Int, +defm VPERMT2Q : avx512_perm_t_sizes<0x7E, "vpermt2q", X86VPermt2, avx512vl_i64_info, avx512vl_i64_info>, VEX_W, EVEX_CD8<64, CD8VF>; -defm VPERMT2W : avx512_perm_t_sizes_w<0x7D, "vpermt2w", X86VPermt2Int, +defm VPERMT2W : avx512_perm_t_sizes_w<0x7D, "vpermt2w", X86VPermt2, avx512vl_i16_info, avx512vl_i16_info>, VEX_W, EVEX_CD8<16, CD8VF>; -defm VPERMT2PS : avx512_perm_t_sizes<0x7F, "vpermt2ps", X86VPermt2Fp, +defm VPERMT2PS : avx512_perm_t_sizes<0x7F, "vpermt2ps", X86VPermt2, avx512vl_f32_info, avx512vl_i32_info>, EVEX_CD8<32, CD8VF>; -defm VPERMT2PD : avx512_perm_t_sizes<0x7F, "vpermt2pd", X86VPermt2Fp, +defm VPERMT2PD : avx512_perm_t_sizes<0x7F, "vpermt2pd", X86VPermt2, avx512vl_f64_info, avx512vl_i64_info>, VEX_W, EVEX_CD8<64, CD8VF>; //===----------------------------------------------------------------------===// diff --git a/lib/Target/X86/X86InstrFragmentsSIMD.td b/lib/Target/X86/X86InstrFragmentsSIMD.td index bb7471ac6e6..30ca3b470fc 100644 --- a/lib/Target/X86/X86InstrFragmentsSIMD.td +++ b/lib/Target/X86/X86InstrFragmentsSIMD.td @@ -378,16 +378,12 @@ def X86VPermilpv : SDNode<"X86ISD::VPERMILPV", SDTShuff2OpM>; def X86VPermilpi : SDNode<"X86ISD::VPERMILPI", SDTShuff2OpI>; def X86VPermv : SDNode<"X86ISD::VPERMV", SDTShuff2Op>; def X86VPermi : SDNode<"X86ISD::VPERMI", SDTShuff2OpI>; -def X86VPermt2Fp : SDNode<"X86ISD::VPERMV3", - SDTypeProfile<1, 3, [SDTCisVec<0>, SDTCisFP<0>, +def X86VPermt2 : SDNode<"X86ISD::VPERMV3", + SDTypeProfile<1, 3, [SDTCisVec<0>, SDTCisSameAs<0,1>, SDTCisInt<2>, SDTCisVec<2>, SDTCisSameNumEltsAs<0, 2>, SDTCisSameSizeAs<0,2>, SDTCisSameAs<0,3>]>, []>; -def X86VPermt2Int : SDNode<"X86ISD::VPERMV3", - SDTypeProfile<1, 3, [SDTCisVec<0>, SDTCisInt<0>, - SDTCisSameAs<0,1>, SDTCisSameAs<0,2>, - SDTCisSameAs<0,3>]>, []>; def X86VPermi2X : SDNode<"X86ISD::VPERMIV3", SDTShuff3Op>; def X86vpternlog : SDNode<"X86ISD::VPTERNLOG", SDTTernlog>;