Skip to content
Snippets Groups Projects
Commit 44e7e449 authored by Richard Biener's avatar Richard Biener
Browse files

tree-optimization/110243 - IVOPTs introducing undefined overflow

The following addresses IVOPTs rewriting expressions in its
strip_offset without caring for definedness of overflow.  Rather
than the earlier attempt of just using the proper
split_constant_offset from data-ref analysis the following adjusts
IVOPTs helper trying to minimize changes from this fix, possibly
easing backports.

	PR tree-optimization/110243
	PR tree-optimization/111336
	* tree-ssa-loop-ivopts.cc (strip_offset_1): Rewrite
	operations with undefined behavior on overflow to
	unsigned arithmetic.

	* gcc.dg/torture/pr110243.c: New testcase.
	* gcc.dg/torture/pr111336.c: Likewise.
parent d70575f5
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment