<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>Dear All, </div><div><br></div><div>I have a function which is some thing like this:</div><div>“</div><div><div style="margin: 0px; font-size: 13px; font-family: Menlo;">define float @ir.test.f32(float %arg1, float %arg2, i1 zeroext %flag) #6 {</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;">br i1 % flag, label %1, label %3</div><div style="margin: 0px; font-size: 13px; font-family: Menlo; min-height: 15px;"><br></div><div style="margin: 0px; font-size: 13px; font-family: Menlo;">; <label>:1                                       ; preds = %0</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;">%2 = tail call float @__my_test_1_f32(float %arg1, float %arg2) #8</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;">return float %2</div><div style="margin: 0px; font-size: 13px; font-family: Menlo; min-height: 15px;"><br></div><div style="margin: 0px; font-size: 13px; font-family: Menlo;">; <label>:3                                       ; preds = %0</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;">%3 = tail call float @__my_test_2_f32(float %arg1, float %arg2, i1 zeroext %flag) #8</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;">return float %3</div><div style="margin: 0px; font-size: 13px; font-family: Menlo; min-height: 15px;"><br></div><div style="margin: 0px; font-size: 13px; font-family: Menlo;">}</div><div style="margin: 0px; font-size: 13px; font-family: Menlo; min-height: 15px;">“</div><div style="margin: 0px; font-size: 13px; font-family: Menlo; min-height: 15px;"><br></div><div style="margin: 0px; font-size: 13px; min-height: 15px;">and my input will always something like</div><div style="margin: 0px; font-size: 13px; min-height: 15px;"> "float @ir.test.f32(float %arg1, float %arg2, true)”</div><div style="margin: 0px; font-size: 13px; min-height: 15px;">or "float @ir.test.f32(float %arg1, float %arg2, true)”, that is said that the flag is decided before compiling. </div><div style="margin: 0px; font-size: 13px; min-height: 15px;">So ideally I want something like :</div><div style="margin: 0px; font-size: 13px; min-height: 15px;">"<span style="font-family: Menlo;">define float @ir.test.f32(float %arg1, float %arg2, true) #6{</span></div><div style="margin: 0px; font-size: 13px; min-height: 15px;"><font face="Menlo">return </font><span style="font-family: Menlo;">tail call float @__my_test_1_f32(float %arg1, float %arg2) #8</span></div><div style="margin: 0px; font-size: 13px; min-height: 15px;"><span style="font-family: Menlo;">}</span></div><div style="margin: 0px; min-height: 15px;"><font face="Menlo" size="2">“</font></div><div style="margin: 0px; font-size: 13px; min-height: 15px;"><span style="font-family: Menlo;">and </span></div><div style="margin: 0px; font-size: 13px; min-height: 15px;"><div style="margin: 0px; min-height: 15px;">"<span style="font-family: Menlo;">define float @ir.test.f32(float %arg1, float %arg2, false) #6{</span></div><div style="margin: 0px; min-height: 15px;"><font face="Menlo">return </font><span style="font-family: Menlo;">tail call float @__my_test_2_f32(float %arg1, float %arg2) #8</span></div><div style="margin: 0px; min-height: 15px;"><span style="font-family: Menlo;">}</span></div><div style="font-size: 12px; margin: 0px; min-height: 15px;"><font face="Menlo" size="2">“</font></div></div><div style="margin: 0px; font-size: 13px; min-height: 15px;"><br></div><div style="margin: 0px; font-size: 13px; min-height: 15px;">therefore, the dynamic branch can be avoided.</div><div style="margin: 0px; font-size: 13px; min-height: 15px;">I feel that the optimization part can help me to achieve this, is it possible and how?</div><div style="margin: 0px; font-size: 13px; min-height: 15px;"><br></div><div style="margin: 0px; font-size: 13px; min-height: 15px;">best</div><div style="margin: 0px; font-size: 13px; min-height: 15px;">kevin</div></div></body></html>