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
603aeb87
Commit
603aeb87
authored
Jun 10, 2016
by
Alexander Monakov
Committed by
Alexander Monakov
Jun 10, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* match.pd (-1 / B < A): Use :c to avoid pattern duplication.
From-SVN: r237307
parent
7cfa10f3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
12 deletions
+6
-12
gcc/ChangeLog
+4
-0
gcc/match.pd
+2
-12
No files found.
gcc/ChangeLog
View file @
603aeb87
2016-06-10 Alexander Monakov <amonakov@ispras.ru>
* match.pd (-1 / B < A): Use :c to avoid pattern duplication.
2016-06-10 Maxim Ostapenko <m.ostapenko@samsung.com>
PR sanitizer/71480
...
...
gcc/match.pd
View file @
603aeb87
...
...
@@ -2626,22 +2626,12 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
&& types_match (TREE_TYPE (@0), TREE_TYPE (@1)))
(out (imagpart @2) { build_zero_cst (TREE_TYPE (@0)); }))))
/* For unsigned operands,
A > -1 / B
checks whether A * B would overflow.
/* For unsigned operands,
-1 / B < A
checks whether A * B would overflow.
Simplify it to __builtin_mul_overflow (A, B, <unused>). */
/* -1 / B < A */
(for cmp (lt ge)
out (ne eq)
(simplify
(cmp (trunc_div:s integer_all_onesp @1) @0)
(if (TYPE_UNSIGNED (TREE_TYPE (@0)) && !VECTOR_TYPE_P (TREE_TYPE (@0)))
(with { tree t = TREE_TYPE (@0), cpx = build_complex_type (t); }
(out (imagpart (IFN_MUL_OVERFLOW:cpx @0 @1)) { build_zero_cst (t); })))))
/* A > -1 / B */
(for cmp (gt le)
out (ne eq)
(simplify
(cmp @0 (trunc_div:s integer_all_onesp @1))
(cmp:c (trunc_div:s integer_all_onesp @1) @0)
(if (TYPE_UNSIGNED (TREE_TYPE (@0)) && !VECTOR_TYPE_P (TREE_TYPE (@0)))
(with { tree t = TREE_TYPE (@0), cpx = build_complex_type (t); }
(out (imagpart (IFN_MUL_OVERFLOW:cpx @0 @1)) { build_zero_cst (t); })))))
...
...
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