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
This commit is contained in:
parent
43743d63b3
commit
2ff1689326
|
@ -1,3 +1,7 @@
|
|||
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>
|
||||
|
||||
* config/arm/arm.c (arm_sat_operator_match): New function.
|
||||
|
|
|
@ -1119,9 +1119,9 @@
|
|||
"VECTOR_MEM_VSX_P (<MODE>mode)"
|
||||
{
|
||||
if (INTVAL (operands[3]) == 0)
|
||||
return \"xxpermdi %x0,%x1,%x2,1\";
|
||||
return \"xxpermdi %x0,%x2,%x1,1\";
|
||||
else if (INTVAL (operands[3]) == 1)
|
||||
return \"xxpermdi %x0,%x2,%x1,0\";
|
||||
return \"xxpermdi %x0,%x1,%x2,0\";
|
||||
else
|
||||
gcc_unreachable ();
|
||||
}
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
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>
|
||||
|
||||
* gcc.target/arm/sat-1.c: New test.
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
/* { 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;
|
||||
}
|
Loading…
Reference in New Issue