Debian Codegraph @

gcc/testsuite/gcc.dg/vect/vect-div-bitmask-3.c

raw
1 /* { dg-require-effective-target vect_int } */
2 /* { dg-additional-options "-fno-vect-cost-model" { target aarch64*-*-* } } */
3
4 #include <stdint.h>
5 #include "tree-vect.h"
6
7 #define N 50
8 #define TYPE uint32_t
9
10 __attribute__((noipa, noinline, optimize("O1")))
11 void fun1(TYPE* restrict pixel, TYPE level, int n)
12 {
13 for (int i = 0; i < n; i+=1)
14 pixel[i] = (pixel[i] * (uint64_t)level) / 0xffffffffUL;
15 }
16
17 __attribute__((noipa, noinline, optimize("O3")))
18 void fun2(TYPE* restrict pixel, TYPE level, int n)
19 {
20 for (int i = 0; i < n; i+=1)
21 pixel[i] = (pixel[i] * (uint64_t)level) / 0xffffffffUL;
22 }
23
24 #include "vect-div-bitmask.h"
25
26 /* { dg-final { scan-tree-dump-not "vect_recog_divmod_pattern: detected" "vect" { target aarch64*-*-* } } } */