2017-06-08 Tamar Christina <tamar.christina@arm.com>
commitb3a8d9f18a5f3fd9cee2eac8a36b6d0fd4661325
authortnfchris <tnfchris@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 8 Jun 2017 07:38:42 +0000 (8 07:38 +0000)
committertnfchris <tnfchris@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 8 Jun 2017 07:38:42 +0000 (8 07:38 +0000)
tree01e590119900d4a8b6df6a832bb5456d8a7fd03c
parentfe117e95ac2e39921ea13be860cf6bb8ffa69ba5
2017-06-08  Tamar Christina  <tamar.christina@arm.com>

PR middle-end/77925
PR middle-end/77926
PR middle-end/66462

* gcc/builtins.c (fold_builtin_fpclassify): Remove.
(fold_builtin_interclass_mathfn): Remove.
(expand_builtin): Add builtins to lowering list.
(fold_builtin_n): Remove fold_builtin_varargs.
(fold_builtin_varargs): Remove.
* gcc/builtins.def (BUILT_IN_ISZERO, BUILT_IN_ISSUBNORMAL): New.
* gcc/real.h (get_min_float): New.
(real_format): Add is_ieee_compatible field.
* gcc/real.c (get_min_float): New.
(ieee_single_format): Set is_ieee_compatible flag.
* gcc/gimple-low.c (lower_stm): Define BUILT_IN_FPCLASSIFY,
CASE_FLT_FN (BUILT_IN_ISINF), BUILT_IN_ISINFD32, BUILT_IN_ISINFD64,
BUILT_IN_ISINFD128, BUILT_IN_ISNAND32, BUILT_IN_ISNAND64,
BUILT_IN_ISNAND128, BUILT_IN_ISNAN, BUILT_IN_ISNORMAL, BUILT_IN_ISZERO,
BUILT_IN_ISSUBNORMAL, CASE_FLT_FN (BUILT_IN_FINITE), BUILT_IN_FINITED32
BUILT_IN_FINITED64, BUILT_IN_FINITED128, BUILT_IN_ISFINITE.
(lower_builtin_fpclassify, is_nan, is_normal, is_infinity): New.
(is_zero, is_subnormal, is_finite, use_ieee_int_mode): Likewise.
(lower_builtin_isnan, lower_builtin_isinfinite): Likewise.
(lower_builtin_isnormal, lower_builtin_iszero): Likewise.
(lower_builtin_issubnormal, lower_builtin_isfinite): Likewise.
(emit_tree_cond, get_num_as_int, emit_tree_and_return_var): New.
(mips_single_format): Likewise.
(motorola_single_format): Likewise.
(spu_single_format): Likewise.
(ieee_double_format): Likewise.
(mips_double_format): Likewise.
(motorola_double_format): Likewise.
(ieee_extended_motorola_format): Likewise.
(ieee_extended_intel_128_format): Likewise.
(ieee_extended_intel_96_round_53_format): Likewise.
(ibm_extended_format): Likewise.
(mips_extended_format): Likewise.
(ieee_quad_format): Likewise.
(mips_quad_format): Likewise.
(vax_f_format): Likewise.
(vax_d_format): Likewise.
(vax_g_format): Likewise.
(decimal_single_format): Likewise.
(decimal_quad_format): Likewise.
(iee_half_format): Likewise.
(mips_single_format): Likewise.
(arm_half_format): Likewise.
(real_internal_format): Likewise.
* gcc/doc/extend.texi: Add documentation for built-ins.
* gcc/c/c-typeck.c (convert_arguments): Add BUILT_IN_ISZERO
and BUILT_IN_ISSUBNORMAL.

gcc/testsuite/
2017-06-08  Tamar Christina  <tamar.christina@arm.com>

* gcc.target/aarch64/builtin-fpclassify.c: New codegen test.
* gcc.dg/fold-notunord.c: Removed.
* gcc.dg/torture/floatn-tg-4.h: Add tests for iszero and issubnormal.
* gcc.dg/torture/float128-tg-4.c: Likewise.
* gcc.dg/torture/float128x-tg-4: Likewise.
* gcc.dg/torture/float16-tg-4.c: Likewise.
* gcc.dg/torture/float32-tg-4.c: Likewise.
* gcc.dg/torture/float32x-tg-4.c: Likewise.
* gcc.dg/torture/float64-tg-4.c: Likewise.
* gcc.dg/torture/float64x-tg-4.c: Likewise.
* gcc.dg/pr28796-1.c: Add -O2.
* gcc.dg/builtins-43.c: Check lower instead of gimple.
* gcc.dg/tg-tests.h: Add iszero and issubnormal.
* gcc.dg/pr77925.c: Add to test safe cases.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@249005 138bc75d-0d04-0410-961f-82ee72b054a4
23 files changed:
gcc/ChangeLog
gcc/builtins.c
gcc/builtins.def
gcc/c/c-typeck.c
gcc/doc/extend.texi
gcc/gimple-low.c
gcc/real.c
gcc/real.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/builtins-43.c
gcc/testsuite/gcc.dg/fold-notunord.c [deleted file]
gcc/testsuite/gcc.dg/pr28796-1.c
gcc/testsuite/gcc.dg/pr77925.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tg-tests.h
gcc/testsuite/gcc.dg/torture/float128-tg-4.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/torture/float128x-tg-4.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/torture/float16-tg-4.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/torture/float32-tg-4.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/torture/float32x-tg-4.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/torture/float64-tg-4.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/torture/float64x-tg-4.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/torture/floatn-tg-4.h [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/builtin-fpclassify.c [new file with mode: 0644]