Index: llvm/trunk/lib/Target/X86/X86InstrAVX512.td =================================================================== --- llvm/trunk/lib/Target/X86/X86InstrAVX512.td +++ llvm/trunk/lib/Target/X86/X86InstrAVX512.td @@ -1221,11 +1221,12 @@ multiclass avx512_fp_broadcast_sd opc, string OpcodeStr, AVX512VLVectorVTInfo _> { - let Predicates = [HasAVX512] in + let Predicates = [HasAVX512] in { defm Z : avx512_broadcast_rm, avx512_broadcast_scalar, EVEX_V512; + } let Predicates = [HasVLX] in { defm Z256 : avx512_broadcast_rm opc, string OpcodeStr, AVX512VLVectorVTInfo _> { - let Predicates = [HasAVX512] in + let Predicates = [HasAVX512] in { defm Z : avx512_broadcast_rm, avx512_broadcast_scalar, EVEX_V512; + } let Predicates = [HasVLX] in { defm Z256 : avx512_broadcast_rm opc, string OpcodeStr, OpndItins itins, X86VectorVTInfo _, string SUFF, Intrinsic Intr> { let ExeDomain = _.ExeDomain in { - defm r_Int : AVX512_maskable_scalar, Sched<[itins.Sched]>; - defm m_Int : AVX512_maskable_scalar, - Sched<[itins.Sched.Folded, ReadAfterLd]>; - defm rb_Int : AVX512_maskable_scalar, + Sched<[itins.Sched.Folded, ReadAfterLd]>; + defm rb_Int : AVX512_maskable_scalar, EVEX_B, EVEX_RC, Sched<[itins.Sched]>; - let isCodeGenOnly = 1, hasSideEffects = 0 in { - def r : I, - Sched<[itins.Sched]>; - let mayLoad = 1 in - def m : I, - Sched<[itins.Sched.Folded, ReadAfterLd]>; - } + let isCodeGenOnly = 1, hasSideEffects = 0, Predicates=[HasAVX512] in { + def r : I, Sched<[itins.Sched]>; + let mayLoad = 1 in + def m : I, Sched<[itins.Sched.Folded, ReadAfterLd]>; + } } -let Predicates = [HasAVX512] in { - def : Pat<(_.EltVT (fsqrt _.FRC:$src)), - (!cast(NAME#SUFF#Zr) - (_.EltVT (IMPLICIT_DEF)), _.FRC:$src)>; + let Predicates = [HasAVX512] in { + def : Pat<(_.EltVT (fsqrt _.FRC:$src)), + (!cast(NAME#SUFF#Zr) + (_.EltVT (IMPLICIT_DEF)), _.FRC:$src)>; - def : Pat<(Intr VR128X:$src), - (!cast(NAME#SUFF#Zr_Int) VR128X:$src, + def : Pat<(Intr VR128X:$src), + (!cast(NAME#SUFF#Zr_Int) VR128X:$src, VR128X:$src)>; -} - -let Predicates = [HasAVX512, OptForSize] in { - def : Pat<(_.EltVT (fsqrt (load addr:$src))), - (!cast(NAME#SUFF#Zm) - (_.EltVT (IMPLICIT_DEF)), addr:$src)>; - - def : Pat<(Intr _.ScalarIntMemCPat:$src2), - (!cast(NAME#SUFF#Zm_Int) - (_.VT (IMPLICIT_DEF)), addr:$src2)>; -} + } + let Predicates = [HasAVX512, OptForSize] in { + def : Pat<(_.EltVT (fsqrt (load addr:$src))), + (!cast(NAME#SUFF#Zm) + (_.EltVT (IMPLICIT_DEF)), addr:$src)>; + + def : Pat<(Intr _.ScalarIntMemCPat:$src2), + (!cast(NAME#SUFF#Zm_Int) + (_.VT (IMPLICIT_DEF)), addr:$src2)>; + } } multiclass avx512_sqrt_scalar_all opc, string OpcodeStr> {