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
dcd25113
Commit
dcd25113
authored
Jun 01, 2005
by
Jakub Jelinek
Committed by
Jakub Jelinek
Jun 01, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* fold-const.c (fold_ternary): Optimize BIT_FIELD_REF of VECTOR_CST.
From-SVN: r100442
parent
a00cb0b9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
gcc/ChangeLog
+2
-0
gcc/fold-const.c
+23
-0
No files found.
gcc/ChangeLog
View file @
dcd25113
2005-06-01 Jakub Jelinek <jakub@redhat.com>
* fold-const.c (fold_ternary): Optimize BIT_FIELD_REF of VECTOR_CST.
* config/i386/xmmintrin.h (_mm_setzero_ps, _mm_set_ss, _mm_set1_ps,
_mm_set_ps, _mm_setr_ps): Add __extension__.
* config/i386/emmintrin.h (_mm_set_sd, _mm_set1_pd, _mm_set_pd,
...
...
gcc/fold-const.c
View file @
dcd25113
...
...
@@ -10284,6 +10284,29 @@ fold_ternary (enum tree_code code, tree type, tree op0, tree op1, tree op2)
}
return
NULL_TREE
;
case
BIT_FIELD_REF
:
if
(
TREE_CODE
(
arg0
)
==
VECTOR_CST
&&
type
==
TREE_TYPE
(
TREE_TYPE
(
arg0
))
&&
host_integerp
(
arg1
,
1
)
&&
host_integerp
(
op2
,
1
))
{
unsigned
HOST_WIDE_INT
width
=
tree_low_cst
(
arg1
,
1
);
unsigned
HOST_WIDE_INT
idx
=
tree_low_cst
(
op2
,
1
);
if
(
width
!=
0
&&
simple_cst_equal
(
arg1
,
TYPE_SIZE
(
type
))
==
1
&&
(
idx
%
width
)
==
0
&&
(
idx
=
idx
/
width
)
<
TYPE_VECTOR_SUBPARTS
(
TREE_TYPE
(
arg0
)))
{
tree
elements
=
TREE_VECTOR_CST_ELTS
(
arg0
);
while
(
idx
--
>
0
)
elements
=
TREE_CHAIN
(
elements
);
return
TREE_VALUE
(
elements
);
}
}
return
NULL_TREE
;
default
:
return
NULL_TREE
;
}
/* switch (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