diff options
author | Andrew Stubbs <ams@codesourcery.com> | 2018-10-22 14:23:37 +0000 |
---|---|---|
committer | Andrew Stubbs <ams@gcc.gnu.org> | 2018-10-22 14:23:37 +0000 |
commit | dbe7895c9df1b82a764f076aab75b54afd375271 (patch) | |
tree | 4ee7d0adc73737b64c868a7ecf0097a9fa860893 /gcc/tree-ssa-threadedge.c | |
parent | b333d8b6d0deca1126f1e206f6ba2678deec437a (diff) | |
download | gcc-dbe7895c9df1b82a764f076aab75b54afd375271.zip gcc-dbe7895c9df1b82a764f076aab75b54afd375271.tar.gz gcc-dbe7895c9df1b82a764f076aab75b54afd375271.tar.bz2 |
Don't double-count early-clobber matches.
Given a pattern with a number of operands:
(match_operand 0 "" "=&v")
(match_operand 1 "" " v0")
(match_operand 2 "" " v0")
(match_operand 3 "" " v0")
GCC will currently increment "reject" once, for operand 0, and then decrement
it once for each of the other operands, ending with reject == -2 and an
assertion failure. If there's a conflict then it might try to decrement reject
yet again.
Incidentally, what these patterns are trying to achieve is an allocation in
which operand 0 may match one of the other operands, but may not partially
overlap any of them. Ideally there'd be a better way to do this.
In any case, it will affect any pattern in which multiple operands may (or
must) match an early-clobber operand.
The patch only allows a reject-- when one has not already occurred, for that
operand.
2018-10-22 Andrew Stubbs <ams@codesourcery.com>
gcc/
* lra-constraints.c (process_alt_operands): New local array,
matching_early_clobber. Check matching_early_clobber before
decrementing reject, and set matching_early_clobber after.
From-SVN: r265393
Diffstat (limited to 'gcc/tree-ssa-threadedge.c')
0 files changed, 0 insertions, 0 deletions