mirror of
https://github.com/danog/ir.git
synced 2024-11-30 04:39:43 +01:00
32 lines
485 B
Plaintext
32 lines
485 B
Plaintext
--TEST--
|
|
001: IF(_, ADD(_,_)) -> JCC
|
|
--TARGET--
|
|
x86
|
|
--ARGS--
|
|
-S
|
|
--CODE--
|
|
{
|
|
int32_t c1 = 0;
|
|
int32_t c2 = 1;
|
|
int32_t c3 = -1;
|
|
l_1 = START(l_8);
|
|
int32_t x = PARAM(l_1, "x", 1);
|
|
int32_t d_1 = ADD(x, c2);
|
|
l_2 = IF(l_1, d_1);
|
|
l_3 = IF_FALSE(l_2);
|
|
l_4 = END(l_3);
|
|
l_5 = IF_TRUE(l_2);
|
|
l_6 = END(l_5);
|
|
l_7 = MERGE(l_4, l_6);
|
|
int32_t ret = PHI(l_7, c3, d_1);
|
|
l_8 = RETURN(l_7, ret);
|
|
}
|
|
--EXPECT--
|
|
test:
|
|
movl 4(%esp), %eax
|
|
addl $1, %eax
|
|
jne .L1
|
|
movl $0xffffffff, %eax
|
|
.L1:
|
|
retl
|