Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
d3c40837
Commit
d3c40837
authored
Mar 04, 2004
by
Kazu Hirata
Committed by
Kazu Hirata
Mar 04, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* config/h8300/h8300.md: Add comments about peephole2's.
From-SVN: r78921
parent
eb3d7f9d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
9 deletions
+68
-9
gcc/ChangeLog
+4
-0
gcc/config/h8300/h8300.md
+64
-9
No files found.
gcc/ChangeLog
View file @
d3c40837
2004-03-04 Kazu Hirata <kazu@cs.umass.edu>
* config/h8300/h8300.md: Add comments about peephole2's.
2004-03-04 Steven Bosscher <stevenb@suse.de>
* i386.h (TARGET_CPU_DEFAULT_nocona): Fix value.
...
...
gcc/config/h8300/h8300.md
View file @
d3c40837
...
...
@@ -4373,8 +4373,15 @@
;;
;; ---- 65535 geu/ltu mov.w
;; For a small constant, it is cheaper to actually do the subtraction
;; and then test the register.
;; Transform
;;
;; cmp.l #1,er0
;; beq .L1
;;
;; into
;;
;; dec.l #1,er0
;; beq .L1
(define_peephole2
[
(set (cc0)
...
...
@@ -4399,6 +4406,16 @@
(pc)))]
"operands
[
4
]
= GEN_INT (- INTVAL (operands
[
1
]
));")
;; Transform
;;
;; cmp.l #65536,er0
;; beq .L1
;;
;; into
;;
;; dec.l #1,e0
;; beq .L1
(define_peephole2
[
(set (cc0)
(compare (match_operand:SI 0 "register_operand" "")
...
...
@@ -4425,9 +4442,16 @@
(pc)))]
"operands
[
4
]
= GEN_INT (- INTVAL (operands
[
1
]
));")
;; For certain (in)equality comparisons against a constant, we can
;; XOR the register with the constant, and test the register against
;; 0.
;; Transform
;;
;; cmp.l #100,er0
;; beq .L1
;;
;; into
;;
;; xor.b #100,er0
;; mov.l er0,er0
;; beq .L1
(define_peephole2
[
(set (cc0)
...
...
@@ -4456,6 +4480,17 @@
(pc)))]
"")
;; Transform
;;
;; cmp.l #-100,er0
;; beq .L1
;;
;; into
;;
;; xor.b #99,er0
;; not.l er0
;; beq .L1
(define_peephole2
[
(set (cc0)
(compare (match_operand:SI 0 "register_operand" "")
...
...
@@ -4484,6 +4519,17 @@
(pc)))]
"operands
[
4
]
= GEN_INT (INTVAL (operands
[
1
]
) ^ -1);")
;; Transform
;;
;; cmp.l #-2147483648,er0
;; beq .L1
;;
;; into
;;
;; rotl.l er0
;; dec.l #1,er0
;; beq .L1
(define_peephole2
[
(set (cc0)
(compare (match_operand:SI 0 "register_operand" "")
...
...
@@ -4829,10 +4875,19 @@
const0_rtx);
})
;; For constants like -1, -2, 1, 2, it is still cheaper to make a copy
;; of the register being tested, do the subtraction on the copy, and
;; then test the copy. We avoid this transformation if we see more
;; than one copy of the same compare insn.
;; Transform
;;
;; cmp.l #1,er0
;; beq .L1
;;
;; into
;;
;; mov.l er0,er1
;; dec.l #1,er1
;; beq .L1
;; We avoid this transformation if we see more than one copy of the
;; same compare insn.
(define_peephole2
[
(match_scratch:SI 4 "r")
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment