1 /* Test specification of custom instructions via pragma in the presence
2 of LTO. This test case formerly failed due to PR60179. */
3
4 /* { dg-do link } */
5 /* { dg-require-effective-target lto } */
6 /* { dg-options "-O1 -flto -flto-partition=one -save-temps" } */
7
8 /* -O1 in the options is significant. Without it FP operations may not be
9 optimized to custom instructions. */
10
11 #include <stdio.h>
12 #include <math.h>
13
14 #pragma GCC target ("custom-fabss=224")
15
16 float
17 custom_fp (float operand_a)
18 {
19 return fabsf (operand_a);
20 }
21
22 int
23 main (int argc, char *argv[])
24 {
25 return custom_fp ((float)argc) > 1.0;
26 }
27
28 /* { dg-final { scan-lto-assembler "custom\\t224, " } } */