[Bug c++/60729] Compiler failure for combination of -ftrapv and -O3: compiler error: in prepare_cmp_insn
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Apr 1 14:35:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60729
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2014-04-01
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed. The issue is that we vectorize the abs() but fail to provide
a negv_optab for V2DFmode and the fallback expansion fails as well
(this path isn't able to handle the vector case at all).
Issue with expand_abs_nojump which uses absv_optab for FP modes.
Index: gcc/optabs.c
===================================================================
--- gcc/optabs.c (revision 208988)
+++ gcc/optabs.c (working copy)
@@ -3384,7 +3384,8 @@ expand_abs_nojump (enum machine_mode mod
{
rtx temp;
- if (! flag_trapv)
+ if (GET_MODE_CLASS (mode) != MODE_INT
+ || ! flag_trapv)
result_unsignedp = 1;
/* First try to do it with a special abs instruction. */
@@ -3407,7 +3408,8 @@ expand_abs_nojump (enum machine_mode mod
{
rtx last = get_last_insn ();
- temp = expand_unop (mode, neg_optab, op0, NULL_RTX, 0);
+ temp = expand_unop (mode, result_unsignedp ? neg_optab : negv_optab,
+ op0, NULL_RTX, 0);
if (temp != 0)
temp = expand_binop (mode, smax_optab, op0, temp, target, 0,
OPTAB_WIDEN);
@@ -3449,7 +3451,8 @@ expand_abs (enum machine_mode mode, rtx
{
rtx temp, op1;
- if (! flag_trapv)
+ if (GET_MODE_CLASS (mode) != MODE_INT
+ || ! flag_trapv)
result_unsignedp = 1;
temp = expand_abs_nojump (mode, op0, target, result_unsignedp);
More information about the Gcc-bugs
mailing list