tree-optimization/96514 - avoid if-converting control-altering calls
authorRichard Biener <rguenther@suse.de>
Fri, 7 Aug 2020 08:16:05 +0000 (10:16 +0200)
committerRichard Biener <rguenther@suse.de>
Fri, 7 Aug 2020 10:21:36 +0000 (12:21 +0200)
commitc3f94f5786a014515c09c7852db228c74adf51e5
tree1d201656f41289ed50030c457548b50f2d94449a
parente87c540fe43e29663140ed67b98ee437c25696bb
tree-optimization/96514 - avoid if-converting control-altering calls

This avoids if-converting when encountering control-altering calls.

2020-08-07  Richard Biener  <rguenther@suse.de>

PR tree-optimization/96514
* tree-if-conv.c (if_convertible_bb_p): If the last stmt
is a call that is control-altering, fail.

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