From 585e9d9de3a60692b1d3b0e91dac9f9ec298e142 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 16 Mar 2011 20:04:40 +0000 Subject: [PATCH] Check TARGET_ROUND for BUILT_IN_{FLOOR,CEIL,TRUNC,RINT}{,F} builtins. 2011-03-16 H.J. Lu PR target/48154 * config/i386/i386.c (ix86_builtin_vectorized_function): Check TARGET_ROUND for BUILT_IN_{FLOOR,CEIL,TRUNC,RINT}{,F} builtins. From-SVN: r171069 --- gcc/ChangeLog | 6 ++++++ gcc/config/i386/i386.c | 16 ++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index faf65fc4eb9..10a154899b4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-03-16 H.J. Lu + + PR target/48154 + * config/i386/i386.c (ix86_builtin_vectorized_function): Check + TARGET_ROUND for BUILT_IN_{FLOOR,CEIL,TRUNC,RINT}{,F} builtins. + 2011-03-16 Jeff Law * tree-vrp.c (identify_jump_threads): Slightly simplify type diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 1a3c97fa948..a25ff7ed45b 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -27659,7 +27659,7 @@ ix86_builtin_vectorized_function (tree fndecl, tree type_out, case BUILT_IN_FLOOR: /* The round insn does not trap on denormals. */ - if (flag_trapping_math) + if (flag_trapping_math || !TARGET_ROUND) break; if (out_mode == DFmode && in_mode == DFmode) @@ -27673,7 +27673,7 @@ ix86_builtin_vectorized_function (tree fndecl, tree type_out, case BUILT_IN_FLOORF: /* The round insn does not trap on denormals. */ - if (flag_trapping_math) + if (flag_trapping_math || !TARGET_ROUND) break; if (out_mode == SFmode && in_mode == SFmode) @@ -27687,7 +27687,7 @@ ix86_builtin_vectorized_function (tree fndecl, tree type_out, case BUILT_IN_CEIL: /* The round insn does not trap on denormals. */ - if (flag_trapping_math) + if (flag_trapping_math || !TARGET_ROUND) break; if (out_mode == DFmode && in_mode == DFmode) @@ -27701,7 +27701,7 @@ ix86_builtin_vectorized_function (tree fndecl, tree type_out, case BUILT_IN_CEILF: /* The round insn does not trap on denormals. */ - if (flag_trapping_math) + if (flag_trapping_math || !TARGET_ROUND) break; if (out_mode == SFmode && in_mode == SFmode) @@ -27715,7 +27715,7 @@ ix86_builtin_vectorized_function (tree fndecl, tree type_out, case BUILT_IN_TRUNC: /* The round insn does not trap on denormals. */ - if (flag_trapping_math) + if (flag_trapping_math || !TARGET_ROUND) break; if (out_mode == DFmode && in_mode == DFmode) @@ -27729,7 +27729,7 @@ ix86_builtin_vectorized_function (tree fndecl, tree type_out, case BUILT_IN_TRUNCF: /* The round insn does not trap on denormals. */ - if (flag_trapping_math) + if (flag_trapping_math || !TARGET_ROUND) break; if (out_mode == SFmode && in_mode == SFmode) @@ -27743,7 +27743,7 @@ ix86_builtin_vectorized_function (tree fndecl, tree type_out, case BUILT_IN_RINT: /* The round insn does not trap on denormals. */ - if (flag_trapping_math) + if (flag_trapping_math || !TARGET_ROUND) break; if (out_mode == DFmode && in_mode == DFmode) @@ -27757,7 +27757,7 @@ ix86_builtin_vectorized_function (tree fndecl, tree type_out, case BUILT_IN_RINTF: /* The round insn does not trap on denormals. */ - if (flag_trapping_math) + if (flag_trapping_math || !TARGET_ROUND) break; if (out_mode == SFmode && in_mode == SFmode)