rs6000.md (insvsi_internal1): Subtract shift from the mask end.
* config/rs6000/rs6000.md (insvsi_internal1): Subtract shift from the mask end. * g++.dg/opt/20050511-1.C: New test. From-SVN: r99936
This commit is contained in:
parent
5bcd864416
commit
46e5b15ed4
4 changed files with 74 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2005-05-18 Devang Patel <dpatel@apple.com>
|
||||
|
||||
* config/rs6000/rs6000.md (insvsi_internal1): Subtract shift from
|
||||
the mask end.
|
||||
|
||||
2005-05-18 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* tree-ssa-forwprop.c (cfg_changed): New.
|
||||
|
|
|
@ -3014,7 +3014,7 @@
|
|||
int size = INTVAL (operands[1]) & 31;
|
||||
|
||||
operands[4] = GEN_INT (shift - start - size);
|
||||
operands[1] = GEN_INT (start + size - 1);
|
||||
operands[1] = GEN_INT (start + size - 1 - shift);
|
||||
return \"{rlimi|rlwimi} %0,%3,%h4,%h2,%h1\";
|
||||
}"
|
||||
[(set_attr "type" "insert_word")])
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2005-05-18 Devang Patel <dpatel@apple.com>
|
||||
|
||||
* g++.dg/opt/20050511-1.C: New test.
|
||||
|
||||
2005-05-18 Thomas Koenig <Thomas.Koenig@online.de>
|
||||
|
||||
PR libfortran/21127
|
||||
|
|
64
gcc/testsuite/g++.dg/opt/20050511-1.C
Normal file
64
gcc/testsuite/g++.dg/opt/20050511-1.C
Normal file
|
@ -0,0 +1,64 @@
|
|||
/* { dg-do run } */
|
||||
/* { dg-options "-O3" { target powerpc*-*-* } } */
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
typedef signed short SINT16 ;
|
||||
typedef unsigned long UINT32 ;
|
||||
typedef unsigned int UINT ;
|
||||
|
||||
class A
|
||||
{
|
||||
public:
|
||||
union
|
||||
{
|
||||
SINT16 xy[2];
|
||||
UINT32 abXY;
|
||||
};
|
||||
bool operator==(const A& other) const {return abXY == other.abXY;}
|
||||
bool operator!=(const A& other) const {return abXY != other.abXY;}
|
||||
};
|
||||
|
||||
template <int size> struct pArray { unsigned char u08[16*(((size*1)+15)/16)] __attribute__ ((aligned(16))); };
|
||||
|
||||
struct B
|
||||
{
|
||||
union {
|
||||
A mvL[2];
|
||||
pArray<1> xyz;
|
||||
};
|
||||
} ;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
UINT w;
|
||||
B b;
|
||||
|
||||
}C;
|
||||
|
||||
|
||||
UINT32 bar (const C * sPtr)
|
||||
{
|
||||
UINT w = sPtr->w;
|
||||
A a;
|
||||
|
||||
a.xy[0] = sPtr->b.mvL[w].xy[0]<<2;
|
||||
a.xy[1] = sPtr->b.mvL[w].xy[1]<<2;
|
||||
|
||||
if (a.xy[0] != ((SINT16) 0xffff << 2))
|
||||
abort ();
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
A a;
|
||||
C c;
|
||||
a.xy[0] = 0xffff;
|
||||
a.xy[1] = 0xffff;
|
||||
c.w=0;
|
||||
c.b.mvL[0].xy[0] = a.xy[0];
|
||||
c.b.mvL[0].xy[1] = a.xy[1];
|
||||
|
||||
bar (&c);
|
||||
}
|
||||
|
Loading…
Add table
Reference in a new issue