Commit 2ff16893 by Peter Bergner Committed by Peter Bergner

vsx.md (vsx_set_<mode>): Reorder operands.

gcc/
	* config/rs6000/vsx.md (vsx_set_<mode>): Reorder operands.

gcc/testsuite/
	* gcc.target/powerpc/pr52457.c: New test.

From-SVN: r184811
parent 43743d63
2012-03-02 Peter Bergner <bergner@vnet.ibm.com>
* config/rs6000/vsx.md (vsx_set_<mode>): Reorder operands.
2012-03-02 Ulrich Weigand <ulrich.weigand@linaro.org> 2012-03-02 Ulrich Weigand <ulrich.weigand@linaro.org>
* config/arm/arm.c (arm_sat_operator_match): New function. * config/arm/arm.c (arm_sat_operator_match): New function.
......
...@@ -1119,9 +1119,9 @@ ...@@ -1119,9 +1119,9 @@
"VECTOR_MEM_VSX_P (<MODE>mode)" "VECTOR_MEM_VSX_P (<MODE>mode)"
{ {
if (INTVAL (operands[3]) == 0) if (INTVAL (operands[3]) == 0)
return \"xxpermdi %x0,%x1,%x2,1\"; return \"xxpermdi %x0,%x2,%x1,1\";
else if (INTVAL (operands[3]) == 1) else if (INTVAL (operands[3]) == 1)
return \"xxpermdi %x0,%x2,%x1,0\"; return \"xxpermdi %x0,%x1,%x2,0\";
else else
gcc_unreachable (); gcc_unreachable ();
} }
......
2012-03-02 Peter Bergner <bergner@vnet.ibm.com>
* gcc.target/powerpc/pr52457.c: New test.
2012-03-02 Ulrich Weigand <ulrich.weigand@linaro.org> 2012-03-02 Ulrich Weigand <ulrich.weigand@linaro.org>
* gcc.target/arm/sat-1.c: New test. * gcc.target/arm/sat-1.c: New test.
......
/* { dg-do run { target { powerpc*-*-linux* } } } */
/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
/* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
/* { dg-require-effective-target vsx_hw } */
/* { dg-options "-O1 -mcpu=power7" } */
extern void abort (void);
typedef long long T;
typedef T vl_t __attribute__((vector_size(2 * sizeof (T))));
vl_t
buggy_func (T x)
{
vl_t w;
T *p = (T *)&w;
p[0] = p[1] = x;
return w;
}
int
main(void)
{
vl_t rval;
T *pl;
pl = (T *) &rval;
rval = buggy_func (2);
if (pl[0] != 2 || pl[1] != 2)
abort ();
return 0;
}
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