Commit fa685231 by Richard Biener Committed by Richard Biener

re PR tree-optimization/86159 (g++ ICE at -O1 and above on valid code: incorrect…

re PR tree-optimization/86159 (g++ ICE at -O1 and above on valid code: incorrect type of vector CONSTRUCTOR elements)

2018-06-15  Richard Biener  <rguenther@suse.de>

	PR middle-end/86159
	* tree-cfg.c (gimplify_build3): Do not strip sign conversions,
	leave useless conversion stripping to force_gimple_operand_gsi.
	(gimplify_build2): Likewise.
	(gimplify_build1): Likewise.

	* g++.dg/pr86159.C: New testcase.

From-SVN: r261622
parent 5b32ec10
2018-06-15 Richard Biener <rguenther@suse.de>
PR middle-end/86159
* tree-cfg.c (gimplify_build3): Do not strip sign conversions,
leave useless conversion stripping to force_gimple_operand_gsi.
(gimplify_build2): Likewise.
(gimplify_build1): Likewise.
2018-06-15 Richard Biener <rguenther@suse.de>
PR middle-end/86076
* tree-cfg.c (move_stmt_op): unshare invariant addresses
before adjusting their block.
......
2018-06-15 Richard Biener <rguenther@suse.de>
PR middle-end/86159
* g++.dg/pr86159.C: New testcase.
2018-06-15 Richard Biener <rguenther@suse.de>
PR middle-end/86076
* gcc.dg/pr86076.c: New testcase.
......
// { dg-do compile }
// { dg-options "-O -w -Wno-psabi" }
typedef int vec __attribute__((vector_size(32)));
vec fn1()
{
vec x, zero{};
vec one = zero + 1;
return x < zero ? one : zero;
}
......@@ -8976,8 +8976,6 @@ gimplify_build3 (gimple_stmt_iterator *gsi, enum tree_code code,
location_t loc = gimple_location (gsi_stmt (*gsi));
ret = fold_build3_loc (loc, code, type, a, b, c);
STRIP_NOPS (ret);
return force_gimple_operand_gsi (gsi, ret, true, NULL, true,
GSI_SAME_STMT);
}
......@@ -8992,8 +8990,6 @@ gimplify_build2 (gimple_stmt_iterator *gsi, enum tree_code code,
tree ret;
ret = fold_build2_loc (gimple_location (gsi_stmt (*gsi)), code, type, a, b);
STRIP_NOPS (ret);
return force_gimple_operand_gsi (gsi, ret, true, NULL, true,
GSI_SAME_STMT);
}
......@@ -9008,8 +9004,6 @@ gimplify_build1 (gimple_stmt_iterator *gsi, enum tree_code code, tree type,
tree ret;
ret = fold_build1_loc (gimple_location (gsi_stmt (*gsi)), code, type, a);
STRIP_NOPS (ret);
return force_gimple_operand_gsi (gsi, ret, true, NULL, true,
GSI_SAME_STMT);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment