tree-optimization/112282 - wrong-code with ifcvt hoisting
commit5cb8610d3a8f8849a4bb6a0f81a2934484d6a15a
authorRichard Biener <rguenther@suse.de>
Wed, 15 Nov 2023 11:24:46 +0000 (15 12:24 +0100)
committerRichard Biener <rguenther@suse.de>
Wed, 15 Nov 2023 12:09:03 +0000 (15 13:09 +0100)
tree736cffc7be5688f3a99a4458eafa0936f9f36e05
parentbcef48b59e4b4f86595929b490a8303da1239ac0
tree-optimization/112282 - wrong-code with ifcvt hoisting

The following avoids hoisting of invariants from conditionally
executed parts of an if-converted loop.  That now makes a difference
since we perform bitfield lowering even when we do not actually
if-convert the loop.  if-conversion deals with resetting flow-sensitive
info when necessary already.

PR tree-optimization/112282
* tree-if-conv.cc (ifcvt_hoist_invariants): Only hoist from
the loop header.

* gcc.dg/torture/pr112282.c: New testcase.
gcc/testsuite/gcc.dg/torture/pr112282.c [new file with mode: 0644]
gcc/tree-if-conv.cc