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