Debian Codegraph @

gcc/testsuite/gcc.c-torture/execute/mul-sext.c

raw
1 /* { dg-do run } */
2
3 typedef __INT64_TYPE__ int64_t;
4 typedef __INT32_TYPE__ int32_t;
5
6 /* f() was misoptimized to a single "mul.d" instruction on LA64. */
7 __attribute__((noipa, noinline)) int64_t
8 f(int64_t a, int64_t b)
9 {
10 return (int64_t)(int32_t)a * (int64_t)(int32_t)b;
11 }
12
13 int
14 main()
15 {
16 int64_t a = 0x1145140000000001;
17 int64_t b = 0x1919810000000001;
18 if (f(a, b) != 1)
19 __builtin_abort();
20 }