<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF">I guess my previous reply was a bit too terse.<br>
<br>
We don't want to narrow loads early in the optimization pipeline
because it tends to hide relationships between bitfields. In
particular, overlapping loads/stores are more difficult to
optimize. We want EarlyCSE/GVN/DSE/etc. to see the full-width loads
and stores to make them more effective.<br>
<br>
Currently, we do narrowing in DAGCombine. D30416 is a proposal to
move that slightly earlier, to the late stages of the IR
optimization pipeline, so we can avoid the limitations of
SelectionDAG.<br>
<br>
If you read the whole discussion on that patch, it goes into more
detail about this.</div></blockquote><div><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Thanks. I was only reading the summary of the patch. :-)</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><div><br></div>-- <br><div class="gmail_signature" data-smartmail="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></div>