2016-12-21 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr53623.c
blobdbdfea323118a428417417abeef30db92245e0bb
1 /* { dg-do compile { target {! ia32 } } } */
2 /* { dg-options "-O2 -fdump-rtl-ree" } */
5 #include <stdint.h>
7 typedef int (*inst_t)(int64_t rdi, int64_t rsi, int64_t rdx);
9 int16_t code[256];
10 inst_t dispatch[256];
12 void an_inst(int64_t rdi, int64_t rsi, int64_t rdx) {
13 rdx = code[rdx];
14 uint8_t inst = (uint8_t) rdx;
15 rdx >>= 8;
16 dispatch[inst](rdi, rsi, rdx);
19 int main(void) {
20 return 0;
23 /* { dg-final { scan-rtl-dump "copy needed" "ree" } } */