--TEST-- 019: SCCP+GVN+Schedule (Figure 3.11 from "Combining Analyses, Combining Optimization" by C.Click) --CODE-- { uintptr_t c_1 = 0; bool c_2 = 0; bool c_3 = 1; int32_t c_4 = 1; int32_t c_5 = 2; l_1 = START(l_33); bool d_2 = PARAM(l_1, "cond", 0); int32_t d_3 = PARAM(l_1, "z", 1); int32_t d_4 = COPY(c_4); int32_t d_5 = COPY(d_3); l_6 = END(l_1); l_7 = LOOP_BEGIN(l_6, l_31); int32_t d_8 = PHI(l_7, d_4, d_19); int32_t d_9 = PHI(l_7, d_5, d_28); bool d_10 = NE(d_9, d_3); l_11 = IF(l_7, d_10); l_12 = IF_TRUE(l_11); int32_t d_13 = COPY(c_5); l_14 = END(l_12); l_15 = IF_FALSE(l_11); l_16 = END(l_15); l_17 = MERGE(l_14, l_16); int32_t d_18 = PHI(l_17, d_13, d_8); int32_t d_19 = SUB(c_5, d_18); bool d_20 = NE(d_19, c_4); l_21 = IF(l_17, d_20); l_22 = IF_TRUE(l_21); int32_t d_23 = COPY(c_5); l_24 = END(l_22); l_25 = IF_FALSE(l_21); l_26 = END(l_25); l_27 = MERGE(l_24, l_26); int32_t d_28 = PHI(l_27, d_23, d_9); l_29 = IF(l_27, d_2); l_30 = IF_TRUE(l_29); l_31 = LOOP_END(l_30); l_32 = IF_FALSE(l_29); l_33 = RETURN(l_32, d_19); } --EXPECT-- { uintptr_t c_1 = 0; bool c_2 = 0; bool c_3 = 1; int32_t c_4 = 1; l_1 = START(l_10); bool d_2 = PARAM(l_1, "cond", 0); int32_t d_3 = PARAM(l_1, "z", 1); l_4 = END(l_1); l_5 = LOOP_BEGIN(l_4, l_8); l_6 = IF(l_5, d_2); l_7 = IF_TRUE(l_6); l_8 = LOOP_END(l_7); l_9 = IF_FALSE(l_6); l_10 = RETURN(l_9, c_4); }