ph_shuffle.c
339 Bytes
////C: '-msoft-fp-half'
//A: '--has-fpack --has-fhalf'
//C: '-O2'
typedef half phalf __attribute__((ext_vector_type(2)));
int main(void)
{
half a,b;
phalf t;
volatile phalf o;
a = 1.2345h;
b = 34.567h;
o.x = 2.345h;
o.y = 7.897h;
o.x = a;
o.y = b;
t = o;
{ half p=t.x;t.x=t.y;t.y=p; }
o = t;
return 0;
}