<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Hi All,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">  The initial SelectionDAG I have has the following snippet.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><div class="gmail_default">    t10: i64,ch = load<LD8[%1](align=4)> t0, t4, undef:i32</div><div class="gmail_default">            t13: i64 = srl t10, Constant:i32<8></div><div class="gmail_default">          t14: i32 = truncate t13</div></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">and after DAGCombine the SelectionDAG becomes,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><div class="gmail_default">    t10: i64,ch = load<LD8[%1](align=4)> t0, t4, undef:i32</div><div class="gmail_default">            t30: i32 = truncate t10</div><div class="gmail_default">          t36: i32 = srl t30, Constant:i32<6></div><div class="gmail_default"><br></div><div class="gmail_default">Here I want to load i32 if possible. Can above pattern be combined further?</div><div class="gmail_default">If not, I find it's because srl and truncate be swapped, and the truncate in</div><div class="gmail_default">the middle blocks DAGCombine combine srl and load. Any idea on why</div><div class="gmail_default">DAGCombine perform this way?</div><div class="gmail_default"><br></div><div class="gmail_default">Thanks.</div></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Regards,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">chenwj</div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div>Wei-Ren Chen (陳韋任)<br>Homepage: <a href="https://people.cs.nctu.edu.tw/~chenwj" target="_blank">https://people.cs.nctu.edu.tw/~chenwj</a></div></div></div>
</div>