aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeff Law <jeffreyalaw@gmail.com>2021-07-08 17:09:36 -0400
committerJeff Law <jeffreyalaw@gmail.com>2021-07-08 17:09:36 -0400
commitb14ac7b29c9a05c94f62fe065c219bbaa83653db (patch)
tree47d9f0836b43b9cbfd405b98d4666429d136efac /gcc
parent763121ccd908f52bc666f277ea2cf42110b3aad9 (diff)
downloadgcc-b14ac7b29c9a05c94f62fe065c219bbaa83653db.zip
gcc-b14ac7b29c9a05c94f62fe065c219bbaa83653db.tar.gz
gcc-b14ac7b29c9a05c94f62fe065c219bbaa83653db.tar.bz2
Further improvements to H8 variable shift patterns
gcc/ * config/h8300/shiftrotate.md (variable shifts): Expose condition code handling for the test before the loop.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/h8300/shiftrotate.md14
1 files changed, 9 insertions, 5 deletions
diff --git a/gcc/config/h8300/shiftrotate.md b/gcc/config/h8300/shiftrotate.md
index 485303c..d3aa6be 100644
--- a/gcc/config/h8300/shiftrotate.md
+++ b/gcc/config/h8300/shiftrotate.md
@@ -377,8 +377,10 @@
(clobber (reg:CC CC_REG))]
"epilogue_completed
&& find_regno_note (insn, REG_DEAD, REGNO (operands[1]))"
- [(set (pc)
- (if_then_else (le (match_dup 1) (const_int 0))
+ [(set (reg:CCZN CC_REG)
+ (compare:CCZN (match_dup 1) (const_int 0)))
+ (set (pc)
+ (if_then_else (le (reg:CCZN CC_REG) (const_int 0))
(label_ref (match_dup 5))
(pc)))
(match_dup 4)
@@ -411,10 +413,12 @@
(clobber (reg:CC CC_REG))]
"epilogue_completed
&& !find_regno_note (insn, REG_DEAD, REGNO (operands[1]))"
- [(set (match_dup 3)
- (match_dup 1))
+ [(parallel
+ [(set (reg:CCZN CC_REG)
+ (compare:CCZN (match_dup 1) (const_int 0)))
+ (set (match_dup 3) (match_dup 1))])
(set (pc)
- (if_then_else (le (match_dup 3) (const_int 0))
+ (if_then_else (le (reg:CCZN CC_REG) (const_int 0))
(label_ref (match_dup 5))
(pc)))
(match_dup 4)