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
bc0776c6
Commit
bc0776c6
authored
Jul 05, 1993
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(subst, case PLUS): Simplify (plus (comp A B) -1), etc.
From-SVN: r4853
parent
05a0d5ea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletions
+16
-1
gcc/combine.c
+16
-1
No files found.
gcc/combine.c
View file @
bc0776c6
...
...
@@ -3394,7 +3394,22 @@ subst (x, from, to, in_dest, unique_copy)
goto
restart
;
}
/* If only the low-order bit of X is possible nonzero, (plus x -1)
/* (plus (comparison A B) C) can become (neg (rev-comp A B)) if
C is 1 and STORE_FLAG_VALUE is -1 or if C is -1 and STORE_FLAG_VALUE
is 1. This produces better code than the alternative immediately
below. */
if
(
GET_RTX_CLASS
(
GET_CODE
(
XEXP
(
x
,
0
)))
==
'<'
&&
reversible_comparison_p
(
XEXP
(
x
,
0
))
&&
((
STORE_FLAG_VALUE
==
-
1
&&
XEXP
(
x
,
1
)
==
const1_rtx
)
||
(
STORE_FLAG_VALUE
==
1
&&
XEXP
(
x
,
1
)
==
constm1_rtx
)))
{
x
=
gen_binary
(
reverse_condition
(
GET_CODE
(
XEXP
(
x
,
0
))),
mode
,
XEXP
(
XEXP
(
x
,
0
),
0
),
XEXP
(
XEXP
(
x
,
0
),
1
));
x
=
gen_unary
(
NEG
,
mode
,
x
);
goto
restart
;
}
/* If only the low-order bit of X is possibly nonzero, (plus x -1)
can become (ashiftrt (ashift (xor x 1) C) C) where C is
the bitsize of the mode - 1. This allows simplification of
"a = (b & 8) == 0;" */
...
...
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