+2022-09-27 Kwok Cheung Yeung <kcy@codesourcery.com>
+
+ * config/gcn/gcn-builtins.def (FABSV): New builtin.
+ * config/gcn/gcn.cc (gcn_expand_builtin_1): Generate
+ builtin for GCN_BUILTIN_FABSV.
+
2022-09-27 Kwok Cheung Yeung <kcy@codesourcery.com>
* config/gcn/gcn-valu.md (math_unop_insn): New attribute.
_A2 (GCN_BTI_V64SF, GCN_BTI_V64SF),
gcn_expand_builtin_1)
+DEF_BUILTIN (FABSV, 3 /*CODE_FOR_fabsv */,
+ "fabsv", B_INSN,
+ _A2 (GCN_BTI_V64DF, GCN_BTI_V64DF),
+ gcn_expand_builtin_1)
+
DEF_BUILTIN (LDEXPVF, 3 /*CODE_FOR_ldexpvf */,
"ldexpvf", B_INSN,
_A3 (GCN_BTI_V64SF, GCN_BTI_V64SF, GCN_BTI_V64SI),
(target, arg, gcn_gen_undef (V64SFmode), exec));
return target;
}
+ case GCN_BUILTIN_FABSV:
+ {
+ if (ignore)
+ return target;
+ rtx exec = gcn_full_exec_reg ();
+ rtx arg = force_reg (V64DFmode,
+ expand_expr (CALL_EXPR_ARG (exp, 0), NULL_RTX,
+ V64DFmode,
+ EXPAND_NORMAL));
+ emit_insn (gen_absv64df2_exec
+ (target, arg, gcn_gen_undef (V64DFmode), exec));
+ return target;
+ }
case GCN_BUILTIN_LDEXPVF:
{
if (ignore)