Debian Codegraph @

gcc/testsuite/gcc.dg/ipa/ipa-icf-21.c

raw
1 /* { dg-do compile { target i?86-*-* x86_64-*-* } } */
2 /* { dg-options "-O2 -msse2 -fdump-ipa-icf-optimized" } */
3
4 #include <xmmintrin.h>
5
6 __attribute__ ((noinline))
7 void foo()
8 {
9 float x = 1.2345f;
10 __m128 v =_mm_load1_ps(&x);
11 }
12
13 __attribute__ ((noinline))
14 void bar()
15 {
16 float x = 1.2345f;
17 __m128 v =_mm_load1_ps(&x);
18 }
19
20 int main()
21 {
22 return 2;
23 }
24
25 /* { dg-final { scan-ipa-dump "Semantic equality hit:foo/\[0-9+\]+->bar/\[0-9+\]+" "icf" } } */
26 /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */