diff options
author | ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-04-08 09:39:44 +0000 |
---|---|---|
committer | ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-04-08 09:39:44 +0000 |
commit | bec0c1e80c398b7283691f46b453b5ec8b6a9e40 (patch) | |
tree | eb144d97f0e4370882793d9dfeab03680e68ba79 /gcc/config/arm | |
parent | 87c791f52532b3d9cb8323c240a49484fb5cc80f (diff) | |
download | gcc-bec0c1e80c398b7283691f46b453b5ec8b6a9e40.tar.gz |
[ARM] PR target/70566 Check that condition register is dead in tst-imm -> lsls-imm Thumb2 peepholes
PR target/70566
* config/arm/thumb2.md (tst + branch-> lsls + branch
peephole below *orsi_not_shiftsi_si): Require that condition
register is dead after the peephole.
(second peephole after the above): Likewise.
* gcc.c-torture/execute/pr70566.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234825 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/arm')
-rw-r--r-- | gcc/config/arm/thumb2.md | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/config/arm/thumb2.md b/gcc/config/arm/thumb2.md index 992536593d6..ab08288413c 100644 --- a/gcc/config/arm/thumb2.md +++ b/gcc/config/arm/thumb2.md @@ -1550,7 +1550,8 @@ (match_operand 5 "" "") (match_operand 6 "" "")))] "TARGET_THUMB2 - && (INTVAL (operands[2]) >= 0 && INTVAL (operands[2]) < 32)" + && (INTVAL (operands[2]) >= 0 && INTVAL (operands[2]) < 32) + && peep2_reg_dead_p (2, operands[0])" [(parallel [(set (match_dup 0) (compare:CC_NOOV (ashift:SI (match_dup 1) (match_dup 2)) (const_int 0))) @@ -1578,7 +1579,8 @@ (match_operand 5 "" "") (match_operand 6 "" "")))] "TARGET_THUMB2 - && (INTVAL (operands[2]) > 0 && INTVAL (operands[2]) < 32)" + && (INTVAL (operands[2]) > 0 && INTVAL (operands[2]) < 32) + && peep2_reg_dead_p (2, operands[0])" [(parallel [(set (match_dup 0) (compare:CC_NOOV (ashift:SI (match_dup 1) (match_dup 2)) (const_int 0))) |