ir/tests/debug/dessa_002.irt

36 lines
526 B
Plaintext
Raw Permalink Normal View History

2022-04-21 23:11:34 +02:00
--TEST--
DESSA 002
2022-05-25 16:38:22 +02:00
--TARGET--
x86_64
2022-04-21 23:11:34 +02:00
--ARGS--
-S
--CODE--
{
uintptr_t c_1 = 0;
bool c_2 = 0;
bool c_3 = 1;
int32_t c_4 = 1;
2022-06-15 16:27:31 +02:00
l_1 = START(l_11);
2022-04-21 23:11:34 +02:00
int32_t d_2 = PARAM(l_1, "x", 0);
l_3 = END(l_1);
l_4 = LOOP_BEGIN(l_3, l_9);
int32_t d_5 = PHI(l_4, d_2, d_6);
int32_t d_6 = ADD(d_5, c_4);
l_7 = IF(l_4, d_6);
l_8 = IF_TRUE(l_7);
l_9 = LOOP_END(l_8);
2022-04-21 23:11:34 +02:00
l_10 = IF_FALSE(l_7);
2022-06-15 16:27:31 +02:00
l_11 = RETURN(l_10, d_5);
2022-04-21 23:11:34 +02:00
}
--EXPECT--
test:
.L1:
movl %edi, %eax
addl $1, %eax
2022-04-21 23:11:34 +02:00
je .L2
movl %eax, %edi
jmp .L1
.L2:
movl %edi, %eax
retq