Commit 3604480a by Richard Biener

tree-optimization/94163 constrain alignment set by PRE

This avoids HWI -> unsigned truncation to end up with zero alignment
which set_ptr_info_alignment ICEs on.

2020-03-13  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/94163
	* tree-ssa-pre.c (create_expression_by_pieces): Check
	whether alignment would be zero.
parent 98ff89d1
2020-03-13 Richard Biener <rguenther@suse.de>
PR tree-optimization/94163
* tree-ssa-pre.c (create_expression_by_pieces): Check
whether alignment would be zero.
2020-03-13 Martin Liska <mliska@suse.cz>
PR lto/94157
......
......@@ -2815,7 +2815,8 @@ create_expression_by_pieces (basic_block block, pre_expr expr,
unsigned HOST_WIDE_INT hmisalign
= args.length () == 3 ? tree_to_uhwi (args[2]) : 0;
if ((halign & (halign - 1)) == 0
&& (hmisalign & ~(halign - 1)) == 0)
&& (hmisalign & ~(halign - 1)) == 0
&& (unsigned int)halign != 0)
set_ptr_info_alignment (get_ptr_info (forcedname),
halign, hmisalign);
}
......
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