diff options
author | Sudakshina Das <sudi.das@arm.com> | 2017-11-07 12:23:38 +0000 |
---|---|---|
committer | Wilco Dijkstra <wilco@gcc.gnu.org> | 2017-11-07 12:23:38 +0000 |
commit | 4349b15f97fcbb6b7cdd96bb5bff0af1eb78e653 (patch) | |
tree | 42fa37718305129f4e755dba2412234ea69883f1 /gcc/gimplify.c | |
parent | e268a77b59cb788637d6db4829f0fd1ddf63f6f2 (diff) | |
download | gcc-4349b15f97fcbb6b7cdd96bb5bff0af1eb78e653.zip gcc-4349b15f97fcbb6b7cdd96bb5bff0af1eb78e653.tar.gz gcc-4349b15f97fcbb6b7cdd96bb5bff0af1eb78e653.tar.bz2 |
PR80131: Simplification of 1U << (31 - x)
Currently the code A << (B - C) is not simplified.
However at least a more specific case of 1U << (C -x) where
C = precision(type) - 1 can be simplified to (1 << C) >> x.
This is done by adding a new simplification rule in match.pd.
2017-11-07 Sudakshina Das <sudi.das@arm.com>
gcc/
PR middle-end/80131
* match.pd: Simplify 1 << (C - x) where C = precision (x) - 1.
testsuite/
PR middle-end/80131
* testsuite/gcc.dg/pr80131-1.c: New Test.
From-SVN: r254496
Diffstat (limited to 'gcc/gimplify.c')
0 files changed, 0 insertions, 0 deletions