Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/copysign_4.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -march=armv8-a+sve" } */
3
4 float f1 (float x, float y)
5 {
6 return __builtin_copysignf (1.0, x) * __builtin_copysignf (1.0, y);
7 }
8
9 double f2 (double x, double y)
10 {
11 return __builtin_copysign (1.0, x) * __builtin_copysign (1.0, y);
12 }
13
14 /* { dg-final { scan-assembler-times "movi\t" 1 } } */
15 /* { dg-final { scan-assembler-times "mov\tz" 1 } } */
16 /* { dg-final { scan-assembler-not "copysign\tw" } } */
17 /* { dg-final { scan-assembler-not "dup\tw" } } */