2022-04-05 23:19:23 +02:00
|
|
|
--TEST--
|
2023-10-03 07:34:02 +02:00
|
|
|
005: Common Sub-expression Elimination & Commutative Expressions
|
2022-04-05 23:19:23 +02:00
|
|
|
--CODE--
|
|
|
|
{
|
|
|
|
int32_t c_4 = 1;
|
|
|
|
l_1 = START(l_6);
|
|
|
|
int32_t d_2 = PARAM(l_1, "a", 0);
|
|
|
|
int32_t d_3 = ADD(c_4, d_2);
|
|
|
|
int32_t d_4 = ADD(d_2, c_4);
|
|
|
|
int32_t d_5 = MUL(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;
|
|
|
|
int32_t c_4 = 1;
|
|
|
|
l_1 = START(l_5);
|
|
|
|
int32_t d_2 = PARAM(l_1, "a", 0);
|
|
|
|
int32_t d_3 = ADD(d_2, c_4);
|
|
|
|
int32_t d_4 = MUL(d_3, d_3);
|
|
|
|
l_5 = RETURN(l_1, d_4);
|
|
|
|
}
|