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UV8HI_INT, BT_UV8HI, BT_UV8HI, BT_UV8HI, BT_UV8HI, BT_INT)
+DEF_FN_TYPE_4 (BT_FN_UV8HI_V4SF_V4SF_UINT_UINT, BT_UV8HI, BT_V4SF, BT_V4SF, BT_UINT, BT_UINT)
DEF_FN_TYPE_4 (BT_FN_VOID_UV2DI_UV2DI_ULONGLONGPTR_ULONGLONG, BT_VOID, BT_UV2DI, BT_UV2DI, BT_ULONGLONGPTR, BT_ULONGLONG)
DEF_FN_TYPE_4 (BT_FN_VOID_UV4SI_UV4SI_UINTPTR_ULONGLONG, BT_VOID, BT_UV4SI, BT_UV4SI, BT_UINTPTR, BT_ULONGLONG)
DEF_FN_TYPE_4 (BT_FN_VOID_V4SI_V4SI_INTPTR_ULONGLONG, BT_VOID, BT_V4SI, BT_V4SI, BT_INTPTR, BT_ULONGLONG)
@@ -3025,10 +3025,10 @@ B_DEF (s390_vstrszf, vstrszv4si, 0,
/* arch 14 builtins */
-B_DEF (s390_vclfnhs, vclfnhs_v8hi, 0, B_NNPA, O2_U4, BT_FN_V4SF_UV8HI_UINT)
-B_DEF (s390_vclfnls, vclfnls_v8hi, 0, B_NNPA, O2_U4, BT_FN_V4SF_UV8HI_UINT)
+B_DEF (s390_vclfnh, vclfnh_v8hi, 0, B_NNPA, O2_U4 | O3_U4, BT_FN_V4SF_UV8HI_UINT_UINT)
+B_DEF (s390_vclfnl, vclfnl_v8hi, 0, B_NNPA, O2_U4 | O3_U4, BT_FN_V4SF_UV8HI_UINT_UINT)
-B_DEF (s390_vcrnfs, vcrnfs_v8hi, 0, B_NNPA, O3_U4, BT_FN_UV8HI_V4SF_V4SF_UINT)
+B_DEF (s390_vcrnf, vcrnf_v8hi, 0, B_NNPA, O3_U4 | O4_U4, BT_FN_UV8HI_V4SF_V4SF_UINT_UINT)
B_DEF (s390_vcfn, vcfn_v8hi, 0, B_NNPA, O2_U4, BT_FN_UV8HI_UV8HI_UINT)
B_DEF (s390_vcnf, vcnf_v8hi, 0, B_NNPA, O2_U4, BT_FN_UV8HI_UV8HI_UINT)
@@ -241,9 +241,9 @@
UNSPEC_VEC_VFMIN
UNSPEC_VEC_VFMAX
- UNSPEC_NNPA_VCLFNHS_V8HI
- UNSPEC_NNPA_VCLFNLS_V8HI
- UNSPEC_NNPA_VCRNFS_V8HI
+ UNSPEC_NNPA_VCLFNH_V8HI
+ UNSPEC_NNPA_VCLFNL_V8HI
+ UNSPEC_NNPA_VCRNF_V8HI
UNSPEC_NNPA_VCFN_V8HI
UNSPEC_NNPA_VCNF_V8HI
@@ -174,9 +174,9 @@ __lcbb(const void *ptr, int bndry)
#define vec_vsterf_flt vec_vlerf_flt
#define vec_vsterg_dbl vec_vlerg_dbl
-#define vec_extend_to_fp32_hi __builtin_s390_vclfnhs
-#define vec_extend_to_fp32_lo __builtin_s390_vclfnls
-#define vec_round_from_fp32 __builtin_s390_vcrnfs
+#define vec_extend_to_fp32_hi(X, Y) __builtin_s390_vclfnh((X), 2, (Y))
+#define vec_extend_to_fp32_lo(X, Y) __builtin_s390_vclfnl((X), 2, (Y))
+#define vec_round_from_fp32(X, Y, Z) __builtin_s390_vcrnf((X), (Y), (Z), 2)
#define vec_convert_to_fp16 __builtin_s390_vcfn
#define vec_convert_from_fp16 __builtin_s390_vcnf
#define vec_gather_element __builtin_s390_vec_gather_element
@@ -2220,36 +2220,39 @@
;; NNPA Facility
;;
-(define_insn "vclfnhs_v8hi"
+(define_insn "vclfnh_v8hi"
[(set (match_operand:V4SF 0 "register_operand" "=v")
(unspec:V4SF [(vec_select:V4HI
(match_operand:V8HI 1 "register_operand" "v")
(parallel [(const_int 0) (const_int 1) (const_int 2) (const_int 3)]))
- (match_operand:QI 2 "const_mask_operand" "C")]
- UNSPEC_NNPA_VCLFNHS_V8HI))]
+ (match_operand:QI 2 "const_mask_operand" "C")
+ (match_operand:QI 3 "const_mask_operand" "C")]
+ UNSPEC_NNPA_VCLFNH_V8HI))]
"TARGET_NNPA"
- "vclfnh\t%v0,%v1,2,%2"
+ "vclfnh\t%v0,%v1,%2,%3"
[(set_attr "op_type" "VRR")])
-(define_insn "vclfnls_v8hi"
+(define_insn "vclfnl_v8hi"
[(set (match_operand:V4SF 0 "register_operand" "=v")
(unspec:V4SF [(vec_select:V4HI
(match_operand:V8HI 1 "register_operand" "v")
(parallel [(const_int 4) (const_int 5) (const_int 6) (const_int 7)]))
- (match_operand:QI 2 "const_mask_operand" "C")]
- UNSPEC_NNPA_VCLFNLS_V8HI))]
+ (match_operand:QI 2 "const_mask_operand" "C")
+ (match_operand:QI 3 "const_mask_operand" "C")]
+ UNSPEC_NNPA_VCLFNL_V8HI))]
"TARGET_NNPA"
- "vclfnl\t%v0,%v1,2,%2"
+ "vclfnl\t%v0,%v1,%2,%3"
[(set_attr "op_type" "VRR")])
-(define_insn "vcrnfs_v8hi"
+(define_insn "vcrnf_v8hi"
[(set (match_operand:V8HI 0 "register_operand" "=v")
(unspec:V8HI [(match_operand:V4SF 1 "register_operand" "v")
(match_operand:V4SF 2 "register_operand" "v")
- (match_operand:QI 3 "const_mask_operand" "C")]
- UNSPEC_NNPA_VCRNFS_V8HI))]
+ (match_operand:QI 3 "const_mask_operand" "C")
+ (match_operand:QI 4 "const_mask_operand" "C")]
+ UNSPEC_NNPA_VCRNF_V8HI))]
"TARGET_NNPA"
- "vcrnf\t%v0,%v1,%v2,%3,2"
+ "vcrnf\t%v0,%v1,%v2,%3,%4"
[(set_attr "op_type" "VRR")])
(define_insn "vcfn_v8hi"