mirror of
https://github.com/danog/ir.git
synced 2024-11-30 04:39:43 +01:00
22 lines
409 B
Plaintext
22 lines
409 B
Plaintext
|
--TEST--
|
||
|
002: FOLD: SUB(ADD(X, Y), Y) => X
|
||
|
--CODE--
|
||
|
{
|
||
|
l_1 = START(l_6);
|
||
|
int32_t d_2 = PARAM(l_1, "a", 1);
|
||
|
int32_t d_3 = PARAM(l_1, "b", 2);
|
||
|
int32_t d_4 = ADD(d_2, d_3);
|
||
|
int32_t d_5 = SUB(d_4, d_3);
|
||
|
l_6 = RETURN(l_1, d_5);
|
||
|
}
|
||
|
--EXPECT--
|
||
|
{
|
||
|
uintptr_t c_1 = 0;
|
||
|
bool c_2 = 0;
|
||
|
bool c_3 = 1;
|
||
|
l_1 = START(l_4);
|
||
|
int32_t d_2 = PARAM(l_1, "a", 1);
|
||
|
int32_t d_3 = PARAM(l_1, "b", 2);
|
||
|
l_4 = RETURN(l_1, d_2);
|
||
|
}
|