From 00e7f01dc47892361aa865714e84872745c691ec Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Mon, 27 May 2019 10:52:14 +0000 Subject: [PATCH] re PR tree-optimization/90610 (526.blender_r miscompared on znver1 with -Ofast -march=native since r271463) 2019-05-27 Richard Biener PR middle-end/90610 * match.pd (vec_perm): Avoid clobbering op0 when not generating a bit-insert. From-SVN: r271652 --- gcc/ChangeLog | 6 ++++++ gcc/match.pd | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 67e8333e3d6..ec30909166b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-05-27 Richard Biener + + PR middle-end/90610 + * match.pd (vec_perm): Avoid clobbering op0 when not generating + a bit-insert. + 2019-05-26 Uroš Bizjak * config/i386/i386.md (@leave_): New expander. diff --git a/gcc/match.pd b/gcc/match.pd index f9bc097c491..e1fa75cf5a0 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -5453,8 +5453,8 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) first vector we only can insert the first elt from the first vector. */ at = 0; - ins = fold_read_from_vector (cop0, 0); - op0 = op1; + if ((ins = fold_read_from_vector (cop0, 0))) + op0 = op1; } else { -- 2.30.2