aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-loop.c
diff options
context:
space:
mode:
authorJames Greenhalgh <james.greenhalgh@arm.com>2017-06-22 08:39:04 +0000
committerJames Greenhalgh <jgreenhalgh@gcc.gnu.org>2017-06-22 08:39:04 +0000
commit71f82be94fad1597696b14c325eed203b75dde70 (patch)
tree22777f9ae20fbb5df987fa57c59a17698606807b /gcc/tree-vect-loop.c
parenta78f698034a2ab7fabd0d6ca3d35e688670b6d2f (diff)
downloadgcc-71f82be94fad1597696b14c325eed203b75dde70.zip
gcc-71f82be94fad1597696b14c325eed203b75dde70.tar.gz
gcc-71f82be94fad1597696b14c325eed203b75dde70.tar.bz2
[Patch match.pd] Fold (A / (1 << B)) to (A >> B)
For the testcase in the patch: unsigned long f2 (unsigned long a, int b) { unsigned long x = 1UL << b; return a / x; } We currently generate an unsigned division and a left shift, where we could instead generate a right shift. gcc/ 2017-06-21 James Greenhalgh <james.greenhalgh@arm.com> * match.pd (A / (1 << B) -> A >> B): New. * generic-match-head.c: Include optabs-tree.h. * gimple-match-head.c: Likewise. * optabs-tree.h (target_supports_op_p): New. * optabs-tree.c (target_supports_op_p): New. gcc/testsuite/ 2017-06-21 James Greenhalgh <james.greenhalgh@arm.com> * gcc.dg/tree-ssa/forwprop-37.c: New. From-SVN: r249502
Diffstat (limited to 'gcc/tree-vect-loop.c')
0 files changed, 0 insertions, 0 deletions