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
95edfef2
Commit
95edfef2
authored
Jul 27, 1992
by
Jim Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add DEFINE_SPLITs to optimize logic operation with
certain immediate values. From-SVN: r1694
parent
2abaee93
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
0 deletions
+56
-0
gcc/config/sparc/sparc.md
+56
-0
No files found.
gcc/config/sparc/sparc.md
View file @
95edfef2
...
...
@@ -1993,6 +1993,20 @@
""
"and %1,%2,%0")
(define_split
[
(set (match_operand:SI 0 "register_operand" "")
(and:SI (match_operand:SI 1 "register_operand" "")
(match_operand:SI 2 "" "")))]
"GET_CODE (operands
[
2
]
) == CONST_INT
&& !SMALL_INT (operands
[
2
]
)
&& (INTVAL (operands
[
2
]
) & 0x3ff) == 0x3ff"
[
(set (match_dup 0) (match_dup 3))
(set (match_dup 0) (and:SI (not:SI (match_dup 0)) (match_dup 1)))]
"
{
operands
[
3
]
= gen_rtx (CONST_INT, VOIDmode, ~INTVAL (operands
[
2
]
));
}")
(define_insn ""
[
(set (match_operand:DI 0 "register_operand" "=r")
(and:DI (not:DI (match_operand:DI 1 "register_operand" "r"))
...
...
@@ -2053,6 +2067,20 @@
""
"or %1,%2,%0")
(define_split
[
(set (match_operand:SI 0 "register_operand" "")
(ior:SI (match_operand:SI 1 "register_operand" "")
(match_operand:SI 2 "" "")))]
"GET_CODE (operands
[
2
]
) == CONST_INT
&& !SMALL_INT (operands
[
2
]
)
&& (INTVAL (operands
[
2
]
) & 0x3ff) == 0x3ff"
[
(set (match_dup 0) (match_dup 3))
(set (match_dup 0) (ior:SI (not:SI (match_dup 0)) (match_dup 1)))]
"
{
operands
[
3
]
= gen_rtx (CONST_INT, VOIDmode, ~INTVAL (operands
[
2
]
));
}")
(define_insn ""
[
(set (match_operand:DI 0 "register_operand" "=r")
(ior:DI (not:DI (match_operand:DI 1 "register_operand" "r"))
...
...
@@ -2113,6 +2141,34 @@
""
"xor %r1,%2,%0")
(define_split
[
(set (match_operand:SI 0 "register_operand" "")
(xor:SI (match_operand:SI 1 "register_operand" "")
(match_operand:SI 2 "" "")))]
"GET_CODE (operands
[
2
]
) == CONST_INT
&& !SMALL_INT (operands
[
2
]
)
&& (INTVAL (operands
[
2
]
) & 0x3ff) == 0x3ff"
[
(set (match_dup 0) (match_dup 3))
(set (match_dup 0) (not:SI (xor:SI (match_dup 0) (match_dup 1))))]
"
{
operands
[
3
]
= gen_rtx (CONST_INT, VOIDmode, ~INTVAL (operands
[
2
]
));
}")
(define_split
[
(set (match_operand:SI 0 "register_operand" "")
(not:SI (xor:SI (match_operand:SI 1 "register_operand" "")
(match_operand:SI 2 "" ""))))]
"GET_CODE (operands
[
2
]
) == CONST_INT
&& !SMALL_INT (operands
[
2
]
)
&& (INTVAL (operands
[
2
]
) & 0x3ff) == 0x3ff"
[
(set (match_dup 0) (match_dup 3))
(set (match_dup 0) (xor:SI (match_dup 0) (match_dup 1)))]
"
{
operands
[
3
]
= gen_rtx (CONST_INT, VOIDmode, ~INTVAL (operands
[
2
]
));
}")
;; xnor patterns. Note that (a ^ ~b) == (~a ^ b) == ~(a ^ b).
;; Combine now canonicalizes to the rightmost expression.
(define_insn ""
...
...
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