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
53d2fb4f
Commit
53d2fb4f
authored
Aug 26, 1992
by
Richard Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(fold): Do A op C1 ? A : C2 opt only for INTEGER_TYPEs.
From-SVN: r1965
parent
f95361c8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
gcc/fold-const.c
+4
-2
No files found.
gcc/fold-const.c
View file @
53d2fb4f
...
...
@@ -4110,9 +4110,11 @@ fold (expr)
/* If this is A op C1 ? A : C2 with C1 and C2 constant integers,
we might still be able to simplify this. For example,
if C1 is one less or one more than C2, this might have started
out as a MIN or MAX and been transformed by this function. */
out as a MIN or MAX and been transformed by this function.
Only good for INTEGER_TYPE, because we need TYPE_MAX_VALUE. */
if
(
TREE_CODE
(
TREE_OPERAND
(
arg0
,
1
))
==
INTEGER_CST
if
(
TREE_CODE
(
type
)
==
INTEGER_TYPE
&&
TREE_CODE
(
TREE_OPERAND
(
arg0
,
1
))
==
INTEGER_CST
&&
TREE_CODE
(
arg2
)
==
INTEGER_CST
)
switch
(
comp_code
)
{
...
...
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