Debian Codegraph @

gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-recip.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -mlasx -fno-vect-cost-model" } */
3 /* { dg-final { scan-assembler "xvfrecip.s" } } */
4 /* { dg-final { scan-assembler "xvfrecip.d" } } */
5 /* { dg-final { scan-assembler-not "xvfdiv.s" } } */
6 /* { dg-final { scan-assembler-not "xvfdiv.d" } } */
7
8 float a[8], b[8];
9
10 void
11 foo1(void)
12 {
13 for (int i = 0; i < 8; i++)
14 a[i] = 1 / (b[i]);
15 }
16
17 double da[4], db[4];
18
19 void
20 foo2(void)
21 {
22 for (int i = 0; i < 4; i++)
23 da[i] = 1 / (db[i]);
24 }