Commit 712a93d6 by Richard Biener Committed by Richard Biener

re PR tree-optimization/68961 (Test case gcc.target/powerpc/pr60203.c fails since r231674)

2016-07-12  Richard Biener  <rguenther@suse.de>

	PR rtl-optimization/68961
	* fwprop.c (propagate_rtx): Allow SUBREGs of VEC_CONCAT and CONCAT
	to simplify to a non-constant.

	* gcc.target/i386/pr68961.c: New testcase.

From-SVN: r238238
parent 7c61b47f
2016-07-12 Richard Biener <rguenther@suse.de>
PR rtl-optimization/68961
* fwprop.c (propagate_rtx): Allow SUBREGs of VEC_CONCAT and CONCAT
to simplify to a non-constant.
2016-07-11 Jakub Jelinek <jakub@redhat.com> 2016-07-11 Jakub Jelinek <jakub@redhat.com>
PR middle-end/71758 PR middle-end/71758
......
...@@ -619,6 +619,15 @@ propagate_rtx_1 (rtx *px, rtx old_rtx, rtx new_rtx, int flags) ...@@ -619,6 +619,15 @@ propagate_rtx_1 (rtx *px, rtx old_rtx, rtx new_rtx, int flags)
*px = tem; *px = tem;
/* Allow replacements that simplify operations on a vector or complex
value to a component. The most prominent case is
(subreg ([vec_]concat ...)). */
if (REG_P (tem) && !HARD_REGISTER_P (tem)
&& (VECTOR_MODE_P (GET_MODE (new_rtx))
|| COMPLEX_MODE_P (GET_MODE (new_rtx)))
&& GET_MODE (tem) == GET_MODE_INNER (GET_MODE (new_rtx)))
return true;
/* The replacement we made so far is valid, if all of the recursive /* The replacement we made so far is valid, if all of the recursive
replacements were valid, or we could simplify everything to replacements were valid, or we could simplify everything to
a constant. */ a constant. */
......
2016-07-12 Richard Biener <rguenther@suse.de>
PR rtl-optimization/68961
* gcc.target/i386/pr68961.c: New testcase.
2016-07-11 Jakub Jelinek <jakub@redhat.com> 2016-07-11 Jakub Jelinek <jakub@redhat.com>
PR middle-end/71758 PR middle-end/71758
......
/* { dg-do compile { target lp64 } } */
/* { dg-options "-O3 -fno-vect-cost-model -fdump-tree-slp2-details" } */
struct x { double d[2]; };
struct x
pack (double a, double aa)
{
struct x u;
u.d[0] = a;
u.d[1] = aa;
return u;
}
/* The function should be optimized to just return as arguments and
result exactly overlap even when previously vectorized. */
/* { dg-final { scan-tree-dump "basic block vectorized" "slp2" } } */
/* { dg-final { scan-assembler-not "mov" } } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment