| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-c -O2 -ftree-vectorize -fdump-tree-ifcvt-stats-blocks-details" { target *-*-* } } */ |
| 3 |
|
| 4 |
void |
| 5 |
dct_unquantize_h263_inter_c (short *block, int n, int qscale, int nCoeffs) |
| 6 |
{ |
| 7 |
int i, level, qmul, qadd; |
| 8 |
|
| 9 |
qadd = (qscale - 1) | 1; |
| 10 |
qmul = qscale << 1; |
| 11 |
|
| 12 |
for (i = 0; i <= nCoeffs; i++) |
| 13 |
{ |
| 14 |
level = block[i]; |
| 15 |
if (level < 0) |
| 16 |
level = level * qmul - qadd; |
| 17 |
else |
| 18 |
level = level * qmul + qadd; |
| 19 |
block[i] = level; |
| 20 |
} |
| 21 |
} |
| 22 |
|
| 23 |
/* { dg-final { scan-tree-dump-times "Applying if-conversion" 1 "ifcvt" } } */ |
| 24 |
|
| 25 |
/* We insert into code |
| 26 |
if (LOOP_VECTORIZED (...)) |
| 27 |
which is folded by vectorizer. Both outgoing edges must have probability |
| 28 |
100% so the resulting profile match after folding. */ |
| 29 |
/* { dg-final { scan-tree-dump-times "Invalid sum of outgoing probabilities 200.0" 1 "ifcvt" } } */ |
| 30 |
/* { dg-final { scan-tree-dump-times "Invalid sum of incoming counts" 1 "ifcvt" } } */ |