Index: include/llvm/IR/IntrinsicsSystemZ.td =================================================================== --- include/llvm/IR/IntrinsicsSystemZ.td +++ include/llvm/IR/IntrinsicsSystemZ.td @@ -43,23 +43,25 @@ class SystemZBinaryCC : SystemZBinaryConvCC; -class SystemZTernaryConv +class SystemZTernaryConv intr_properties = []> : GCCBuiltin<"__builtin_s390_" ## name>, - Intrinsic<[result], [arg, arg, result], [IntrNoMem]>; + Intrinsic<[result], [arg, arg, result], !listconcat([IntrNoMem], intr_properties)>; -class SystemZTernary - : SystemZTernaryConv; +class SystemZTernary intr_properties = []> + : SystemZTernaryConv; -class SystemZTernaryInt +class SystemZTernaryInt intr_properties = []> : GCCBuiltin<"__builtin_s390_" ## name>, - Intrinsic<[type], [type, type, llvm_i32_ty], [IntrNoMem]>; + Intrinsic<[type], [type, type, llvm_i32_ty], !listconcat([IntrNoMem], intr_properties)>; -class SystemZTernaryIntCC - : Intrinsic<[type, llvm_i32_ty], [type, type, llvm_i32_ty], [IntrNoMem]>; +class SystemZTernaryIntCC intr_properties = []> + : Intrinsic<[type, llvm_i32_ty], [type, type, llvm_i32_ty], !listconcat([IntrNoMem], intr_properties)>; -class SystemZQuaternaryInt +class SystemZQuaternaryInt intr_properties = []> : GCCBuiltin<"__builtin_s390_" ## name>, - Intrinsic<[type], [type, type, type, llvm_i32_ty], [IntrNoMem]>; + Intrinsic<[type], [type, type, type, llvm_i32_ty], + !listconcat([IntrNoMem], intr_properties)>; class SystemZQuaternaryIntCC : Intrinsic<[type, llvm_i32_ty], [type, type, type, llvm_i32_ty], @@ -161,10 +163,10 @@ def f : SystemZTernary; } -multiclass SystemZTernaryIntBHF { - def b : SystemZTernaryInt; - def h : SystemZTernaryInt; - def f : SystemZTernaryInt; +multiclass SystemZTernaryIntBHF intr_properties = []> { + def b : SystemZTernaryInt; + def h : SystemZTernaryInt; + def f : SystemZTernaryInt; } multiclass SystemZTernaryIntCCBHF { @@ -173,14 +175,16 @@ def fs : SystemZTernaryIntCC; } -multiclass SystemZQuaternaryIntBHF { - def b : SystemZQuaternaryInt; - def h : SystemZQuaternaryInt; - def f : SystemZQuaternaryInt; +multiclass SystemZQuaternaryIntBHF intr_properties = []> { + def b : SystemZQuaternaryInt; + def h : SystemZQuaternaryInt; + def f : SystemZQuaternaryInt; } -multiclass SystemZQuaternaryIntBHFG : SystemZQuaternaryIntBHF { - def g : SystemZQuaternaryInt; +multiclass SystemZQuaternaryIntBHFG intr_properties = []> : + SystemZQuaternaryIntBHF { + def g : SystemZQuaternaryInt; } multiclass SystemZQuaternaryIntCCBHF { @@ -231,11 +235,11 @@ let TargetPrefix = "s390" in { def int_s390_lcbb : GCCBuiltin<"__builtin_s390_lcbb">, Intrinsic<[llvm_i32_ty], [llvm_ptr_ty, llvm_i32_ty], - [IntrNoMem]>; + [IntrNoMem, ImmArg<1>]>; def int_s390_vlbb : GCCBuiltin<"__builtin_s390_vlbb">, Intrinsic<[llvm_v16i8_ty], [llvm_ptr_ty, llvm_i32_ty], - [IntrReadMem, IntrArgMemOnly]>; + [IntrReadMem, IntrArgMemOnly, ImmArg<1>]>; def int_s390_vll : GCCBuiltin<"__builtin_s390_vll">, Intrinsic<[llvm_v16i8_ty], [llvm_i32_ty, llvm_ptr_ty], @@ -244,7 +248,7 @@ def int_s390_vpdi : GCCBuiltin<"__builtin_s390_vpdi">, Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty, llvm_i32_ty], - [IntrNoMem]>; + [IntrNoMem, ImmArg<2>]>; def int_s390_vperm : GCCBuiltin<"__builtin_s390_vperm">, Intrinsic<[llvm_v16i8_ty], @@ -298,7 +302,7 @@ defm int_s390_verllv : SystemZBinaryBHFG<"verllv">; defm int_s390_verll : SystemZBinaryIntBHFG<"verll">; - defm int_s390_verim : SystemZQuaternaryIntBHFG<"verim">; + defm int_s390_verim : SystemZQuaternaryIntBHFG<"verim", [ImmArg<3>]>; def int_s390_vsl : SystemZBinary<"vsl", llvm_v16i8_ty>; def int_s390_vslb : SystemZBinary<"vslb", llvm_v16i8_ty>; @@ -310,7 +314,7 @@ def int_s390_vsldb : GCCBuiltin<"__builtin_s390_vsldb">, Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, llvm_i32_ty], - [IntrNoMem]>; + [IntrNoMem, ImmArg<2>]>; defm int_s390_vscbi : SystemZBinaryBHFG<"vscbi">; @@ -338,9 +342,9 @@ defm int_s390_vch : SystemZCompareBHFG<"vch">; defm int_s390_vchl : SystemZCompareBHFG<"vchl">; - defm int_s390_vfae : SystemZTernaryIntBHF<"vfae">; + defm int_s390_vfae : SystemZTernaryIntBHF<"vfae", [ImmArg<2>]>; defm int_s390_vfae : SystemZTernaryIntCCBHF; - defm int_s390_vfaez : SystemZTernaryIntBHF<"vfaez">; + defm int_s390_vfaez : SystemZTernaryIntBHF<"vfaez", [ImmArg<2>]>; defm int_s390_vfaez : SystemZTernaryIntCCBHF; defm int_s390_vfee : SystemZBinaryBHF<"vfee">; @@ -356,9 +360,9 @@ defm int_s390_vistr : SystemZUnaryBHF<"vistr">; defm int_s390_vistr : SystemZUnaryCCBHF; - defm int_s390_vstrc : SystemZQuaternaryIntBHF<"vstrc">; + defm int_s390_vstrc : SystemZQuaternaryIntBHF<"vstrc", [ImmArg<3>]>; defm int_s390_vstrc : SystemZQuaternaryIntCCBHF; - defm int_s390_vstrcz : SystemZQuaternaryIntBHF<"vstrcz">; + defm int_s390_vstrcz : SystemZQuaternaryIntBHF<"vstrcz", [ImmArg<3>]>; defm int_s390_vstrcz : SystemZQuaternaryIntCCBHF; def int_s390_vfcedbs : SystemZBinaryConvCC; @@ -378,7 +382,7 @@ def int_s390_vmslg : GCCBuiltin<"__builtin_s390_vmslg">, Intrinsic<[llvm_v16i8_ty], [llvm_v2i64_ty, llvm_v2i64_ty, llvm_v16i8_ty, - llvm_i32_ty], [IntrNoMem]>; + llvm_i32_ty], [IntrNoMem, ImmArg<3>]>; def int_s390_vfmaxdb : Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, llvm_i32_ty],