diff options
author | Richard Biener <rguenther@suse.de> | 2014-11-07 20:57:01 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2014-11-07 20:57:01 +0000 |
commit | 382ad5ce1bb6ce92c276adc9a35c619c0a070aca (patch) | |
tree | 4c18edfc1ad7fd6c4247d8bfff634a731d255b4c /gcc/fold-const.c | |
parent | 64df297158621407b9a2204b661584c9a4d526e6 (diff) | |
download | gcc-382ad5ce1bb6ce92c276adc9a35c619c0a070aca.zip gcc-382ad5ce1bb6ce92c276adc9a35c619c0a070aca.tar.gz gcc-382ad5ce1bb6ce92c276adc9a35c619c0a070aca.tar.bz2 |
re PR tree-optimization/63605 (wrong code at -O3 on x86_64-linux-gnu)
2014-11-07 Richard Biener <rguenther@suse.de>
PR tree-optimization/63605
* fold-const.c (fold_binary_loc): Properly use element_precision
for types that may not be scalar.
* gcc.dg/vect/pr63605.c: New testcase.
From-SVN: r217238
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index cff9c10..c712213 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -12817,7 +12817,7 @@ fold_binary_loc (location_t loc, tree arg00 = TREE_OPERAND (arg0, 0); tree arg01 = TREE_OPERAND (arg0, 1); tree itype = TREE_TYPE (arg00); - if (wi::eq_p (arg01, TYPE_PRECISION (itype) - 1)) + if (wi::eq_p (arg01, element_precision (itype) - 1)) { if (TYPE_UNSIGNED (itype)) { |