]> git.ipfire.org Git - people/ms/gcc.git/commit
rewrite undefined overflow to defined in ifcombine
authorRichard Biener <rguenther@suse.de>
Mon, 4 Apr 2022 09:29:14 +0000 (11:29 +0200)
committerRichard Biener <rguenther@suse.de>
Thu, 5 May 2022 08:46:02 +0000 (10:46 +0200)
commitc2a0d2e6f636c6ad7da44256b6bea7470d895100
tree332644fbf86b4fa915ccfac745c8703c0961b1f6
parent000f4480005035d0811e009a7cb25b42721f0a6e
rewrite undefined overflow to defined in ifcombine

When we make stmts to execute unconditionally in ifcombine we have
to make sure to rewrite stmts that can invoke undefined behavior
on overflow into a form with defined overflow.  That's possible
for all but signed division for which we have to avoid the transform.

2022-04-04  Richard Biener  <rguenther@suse.de>

* tree-ssa-ifcombine.cc (bb_no_side_effects_p): Avoid executing
divisions with undefined overflow unconditionally.
(pass_tree_ifcombine::execute): Rewrite stmts with undefined
overflow to defined.
gcc/tree-ssa-ifcombine.cc