diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/mips/timode-1.c')
-rw-r--r-- | gcc/testsuite/gcc.target/mips/timode-1.c | 45 |
1 files changed, 43 insertions, 2 deletions
diff --git a/gcc/testsuite/gcc.target/mips/timode-1.c b/gcc/testsuite/gcc.target/mips/timode-1.c index fc087ee1c35..606fee0cb1a 100644 --- a/gcc/testsuite/gcc.target/mips/timode-1.c +++ b/gcc/testsuite/gcc.target/mips/timode-1.c @@ -1,4 +1,5 @@ /* { dg-options "-mgp64" } */ +/* { dg-skip-if "we deliberately use calls when optimizing for size" { *-*-* } { "-Os" } { "" } } */ typedef int int128_t __attribute__((mode(TI))); typedef unsigned int uint128_t __attribute__((mode(TI))); @@ -22,44 +23,84 @@ volatile int amount = 4; volatile uint128_t result; int -main (void) +test1 (void) { result = a * b; if (result != c) return 1; + return 0; +} +int +test2 (void) +{ result = c + d; if (result != e) return 1; + return 0; +} +int +test3 (void) +{ result = e - d; if (result != c) return 1; + return 0; +} +int +test4 (void) +{ result = d & e; if (result != f) return 1; + return 0; +} +int +test5 (void) +{ result = d ^ e; if (result != g) return 1; + return 0; +} +int +test6 (void) +{ result = d | e; if (result != h) return 1; + return 0; +} +int +test7 (void) +{ result = g << amount; if (result != i) return 1; + return 0; +} +int +test8 (void) +{ result = g >> amount; if (result != j) return 1; + return 0; +} +int +test9 (void) +{ result = (int128_t) g >> amount; if (result != k) return 1; - return 0; } + /* { dg-final { scan-assembler-not "\tjal" } } */ |