]> gcc.gnu.org Git - gcc.git/commit
modulo-sched: skip loops with strange register defs [PR100225]
authorRoman Zhuykov <zhroma@ispras.ru>
Thu, 6 May 2021 11:59:11 +0000 (14:59 +0300)
committerRoman Zhuykov <zhroma@ispras.ru>
Thu, 6 May 2021 11:59:11 +0000 (14:59 +0300)
commit9c4797e2b5dea101b28826dee8c30125764811e3
tree58dc8344e55b7f88ad597cf9df047064f8957deb
parentd218fed53d811212b015a08cd2e1214000813fbf
modulo-sched: skip loops with strange register defs [PR100225]

PR84878 fix adds an assertion which can fail, e.g. when stack pointer
is adjusted inside the loop.  We have to prevent it and search earlier
for any 'strange' instruction.  The solution is to skip the whole loop
if using 'note_stores' we found that one of hard registers is in
'df->regular_block_artificial_uses' set.

Also patch properly prohibit not single-set instruction in loop body.

gcc/ChangeLog:

PR rtl-optimization/100225
PR rtl-optimization/84878
* modulo-sched.c (sms_schedule): Use note_stores to skip loops
where we have an instruction which touches (writes) any hard
register from df->regular_block_artificial_uses set.
Allow not-single-set instruction only right before basic block
tail.

gcc/testsuite/ChangeLog:

PR rtl-optimization/100225
PR rtl-optimization/84878
* gcc.dg/pr100225.c: New test.

libgomp/ChangeLog:

* testsuite/libgomp.oacc-c-c++-common/atomic_capture-3.c: New test.

(cherry picked from commit 4cf3b10f27b1994cf4a9eb12079d85412ebc7cad)
gcc/modulo-sched.c
gcc/testsuite/gcc.dg/pr100225.c [new file with mode: 0644]
libgomp/testsuite/libgomp.oacc-c-c++-common/atomic_capture-3.c [new file with mode: 0644]
This page took 0.072009 seconds and 6 git commands to generate.