diff options
author | bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-03-19 18:18:54 +0000 |
---|---|---|
committer | bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-03-19 18:18:54 +0000 |
commit | d09294c0fe5126ab80ad7e249cde989241e45441 (patch) | |
tree | ede6feafa04bf138a041b65d50a1d8c03a3989ec /gcc/ira-lives.c | |
parent | ce6dcb60f82fe72edfd018e6cd89e0cd9dc4aacb (diff) | |
download | gcc-d09294c0fe5126ab80ad7e249cde989241e45441.tar.gz |
gcc/
PR rtl-optimization/42258
* ira-lives.c (check_and_make_def_conflict): Ignore conflict for a
use that may match DEF.
testsuite/
PR rtl-optimization/42258
* gcc.target/arm/thumb1-mul-moves.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157581 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ira-lives.c')
-rw-r--r-- | gcc/ira-lives.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/ira-lives.c b/gcc/ira-lives.c index ac69e229b06..b88082a304b 100644 --- a/gcc/ira-lives.c +++ b/gcc/ira-lives.c @@ -499,6 +499,8 @@ check_and_make_def_conflict (int alt, int def, enum reg_class def_cl) for (use = 0; use < recog_data.n_operands; use++) { + int alt1; + if (use == def || recog_data.operand_type[use] == OP_OUT) continue; @@ -507,6 +509,22 @@ check_and_make_def_conflict (int alt, int def, enum reg_class def_cl) else use_cl = recog_op_alt[use][alt].cl; + /* If there's any alternative that allows USE to match DEF, do not + record a conflict. If that causes us to create an invalid + instruction due to the earlyclobber, reload must fix it up. */ + for (alt1 = 0; alt1 < recog_data.n_alternatives; alt1++) + if (recog_op_alt[use][alt1].matches == def + || (use < recog_data.n_operands - 1 + && recog_data.constraints[use][0] == '%' + && recog_op_alt[use + 1][alt1].matches == def) + || (use >= 1 + && recog_data.constraints[use - 1][0] == '%' + && recog_op_alt[use - 1][alt1].matches == def)) + break; + + if (alt1 < recog_data.n_alternatives) + continue; + advance_p = check_and_make_def_use_conflict (dreg, def_cl, use, use_cl, advance_p); |