aboutsummaryrefslogtreecommitdiff
path: root/gcc/match.pd
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2021-04-08 17:39:11 +0100
committerRichard Sandiford <richard.sandiford@arm.com>2021-04-08 17:39:11 +0100
commit5240c5ca2e2b1f362670791df233c4103d87cf5b (patch)
tree2637536bf4b422067ce3a3c6b2150d79b300e631 /gcc/match.pd
parent9f74f9cf47ed9d65e65a06378041e9dd5698e49d (diff)
downloadgcc-5240c5ca2e2b1f362670791df233c4103d87cf5b.zip
gcc-5240c5ca2e2b1f362670791df233c4103d87cf5b.tar.gz
gcc-5240c5ca2e2b1f362670791df233c4103d87cf5b.tar.bz2
match.pd: Fix sve/vcond_3.c
The sve/vcond_3.c tests had started to fail after PR97690/99305, because we were generating: a = VEC_COND_EXPR <cond, { 0, ... }, { 1, ... }>; b = a << 15; instead of: a = VEC_COND_EXPR <cond, { 0, ... }, { 1<<15, ... }>; We already have a match.pd rule to handle this kind of thing, but it didn't handle shifts. gcc/ * match.pd: Extend vec_cond folds to handle shifts.
Diffstat (limited to 'gcc/match.pd')
-rw-r--r--gcc/match.pd2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/match.pd b/gcc/match.pd
index 036f92f..3ffd9a6 100644
--- a/gcc/match.pd
+++ b/gcc/match.pd
@@ -3646,7 +3646,7 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
/* Sink binary operation to branches, but only if we can fold it. */
(for op (tcc_comparison plus minus mult bit_and bit_ior bit_xor
- rdiv trunc_div ceil_div floor_div round_div
+ lshift rshift rdiv trunc_div ceil_div floor_div round_div
trunc_mod ceil_mod floor_mod round_mod min max)
/* (c ? a : b) op (c ? d : e) --> c ? (a op d) : (b op e) */
(simplify