x86: Don't return hard register when LRA is in progress
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 22 Jul 2021 12:17:27 +0000 (05:17 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 23 Jul 2021 13:10:39 +0000 (06:10 -0700)
commit085666673db03c2e53db368d699c47032c6c5f2e
treef21bd975de7212cca755327ddb4b99dd75f915e4
parent3ea62a2b2ed739209936e0ed27539965ae4c9840
x86: Don't return hard register when LRA is in progress

Don't return hard register in ix86_gen_scratch_sse_rtx when LRA is in
progress to avoid ICE when there are no available hard registers for
LRA.

gcc/

PR target/101504
* config/i386/i386.c (ix86_gen_scratch_sse_rtx): Don't return
hard register when LRA is in progress.

gcc/testsuite/

PR target/101504
* gcc.target/i386/pr101504.c: New test.
gcc/config/i386/i386.c
gcc/testsuite/gcc.target/i386/pr101504.c [new file with mode: 0644]