rs6000: Fix up flag_shrink_wrap handling in presence of -mrop-protect [PR101324]
authorMartin Liska <mliska@suse.cz>
Fri, 3 Dec 2021 17:58:25 +0000 (11:58 -0600)
committerPeter Bergner <bergner@linux.ibm.com>
Fri, 3 Dec 2021 20:32:13 +0000 (14:32 -0600)
commitcff7879a381d3f5ed6556206896e6a6229800167
tree0736f08bfea8273d9a95c984c66256b3397ed79c
parentd81722ee16e339af7c11b3d1bf51c17246557595
rs6000: Fix up flag_shrink_wrap handling in presence of -mrop-protect [PR101324]

PR101324 shows a problem in disabling shrink-wrapping when using -mrop-protect
when there is a attribute optimize/pragma.  The fix envolves moving the handling
of flag_shrink_wrap so it gets re-disbled when we change or add options.

2021-12-03  Martin Liska  <mliska@suse.cz>

gcc/
PR target/101324
* config/rs6000/rs6000.c (rs6000_option_override_internal): Move the
disabling of shrink-wrapping when using -mrop-protect from here...
(rs6000_override_options_after_change): ...to here.

2021-12-03  Peter Bergner  <bergner@linux.ibm.com>

gcc/testsuite/
PR target/101324
* gcc.target/powerpc/pr101324.c: New test.
gcc/config/rs6000/rs6000.c
gcc/testsuite/gcc.target/powerpc/pr101324.c [new file with mode: 0644]