blob: fe3b31db2bd45b83bfc5f9c2c1b1802f7766658b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
/* { dg-do compile { target lp64 } } */
/* { dg-skip-if "" { powerpc*-*-darwin* } } */
/* { dg-options "-mvsx -O2" } */
/* { dg-additional-options "-mdejagnu-cpu=power8" { target { ! has_arch_pwr8 } } } */
/* { dg-require-effective-target powerpc_vsx } */
/* Test that we generate XSCVDPSP instead of FRSP and XSCVDPSPN when we combine
a round from double to float and moving the float value to a GPR. */
union u {
float f;
unsigned int ui;
int si;
};
unsigned int
ui_d (double d)
{
union u x;
x.f = d;
return x.ui;
}
/* { dg-final { scan-assembler {\mmfvsrwz\M} } } */
/* { dg-final { scan-assembler {\mxscvdpsp\M} } } */
/* { dg-final { scan-assembler-not {\mmfvsrd\M} } } */
/* { dg-final { scan-assembler-not {\mmtvsrwz\M} } } */
/* { dg-final { scan-assembler-not {\mmtvsrd\M} } } */
/* { dg-final { scan-assembler-not {\mxscvdpspn\M} } } */
/* { dg-final { scan-assembler-not {\msrdi\M} } } */
|