gcc/testsuite/gcc.target/riscv/rvv/autovec/pr123940.c
raw| 1 | /* { dg-do run } */ |
| 2 | /* { dg-options "-O3 -march=rv64gcv -mabi=lp64d -std=gnu99 -fdump-tree-widening_mul" } */ |
| 3 | |
| 4 | long a; |
| 5 | long long b; |
| 6 | _Bool c[16]; |
| 7 | char d[16]; |
| 8 | char e = 0; |
| 9 | int f = 1; |
| 10 | |
| 11 | int main () |
| 12 | { |
| 13 | for (long i = 0; i < 16; ++i) |
| 14 | c[i] = 40; |
| 15 | for (int j = 0; j < 16; j++) |
| 16 | { |
| 17 | e = (c[j] ? j : d[j]) + d[j]; |
| 18 | a = f * c[j] ?: ~0; |
| 19 | } |
| 20 | b = (int) e; |
| 21 | if (b != 15) |
| 22 | __builtin_abort (); |
| 23 | } |
| 24 | |
| 25 | /* { dg-final { scan-tree-dump-not "FMA" "widening_mul" } } */ |