ir/tests/folding/fold_007.irt

23 lines
434 B
Plaintext
Raw Permalink Normal View History

2023-03-29 13:07:31 +02:00
--TEST--
005: FOLD: SUB(Y, ADD(X, Y)) => Y
--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_3, d_4);
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_5);
int32_t d_2 = PARAM(l_1, "a", 1);
int32_t d_3 = PARAM(l_1, "b", 2);
int32_t d_4 = NEG(d_2);
l_5 = RETURN(l_1, d_4);
}