Debian Codegraph @

gcc/testsuite/gcc.target/powerpc/direct-move-float3.c

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