Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/divmod-6-simode.c @ 118:fd00160c1b76
ifdef TARGET_64BIT
author | mir3636 |
---|---|
date | Tue, 27 Feb 2018 15:01:35 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
/* { dg-require-effective-target divmod_simode } */ /* { dg-options "-O2 -fdump-tree-widening_mul-details" } */ typedef int SImode __attribute__((mode(SI))); typedef unsigned USImode __attribute__((mode(SI))); extern int cond; void foo(void); #define FOO(smalltype, bigtype, no) \ bigtype f_##no(smalltype x, bigtype y) \ { \ bigtype q = x / y; \ bigtype r1 = 0, r2 = 0; \ if (cond) \ r1 = x % y; \ else \ r2 = x % y; \ return q + r1 + r2; \ } FOO(SImode, SImode, 1) FOO(SImode, USImode, 2) FOO(USImode, USImode, 3) /* { dg-final { scan-tree-dump-times "DIVMOD" 3 "widening_mul" } } */