<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hi Sanjay,<br class="">
<div>
<blockquote type="cite" class="">
<div class="">On 19 Jul 2016, at 18:54, Sanjay Patel <<a href="mailto:spatel@rotateright.com" class="">spatel@rotateright.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">
<div class="">
<div class="">
<div class="">Hi Artur -<br class="">
<br class="">
</div>
I don't think there's any reason to limit the transform to sexts only; that's just the case that was apparent in
<a href="https://llvm.org/bugs/show_bug.cgi?id=20134" class="">https://llvm.org/bugs/show_bug.cgi?id=20134</a> , so I limited it to that pattern.<br class="">
<br class="">
</div>
It's probably worth noting that I'm currently fighting through casts of all kinds in IR (InstCombine) rather than the backend:<br class="">
</div>
</div>
</div>
</blockquote>
What is the current status of this work? Does it make sense to patch the existing code in X86ISelLowering in order to support looking through zext or the generic solution will be available soon?</div>
<div><br class="">
</div>
<div>Artur<br class="">
<blockquote type="cite" class="">
<div class="">
<div dir="ltr" class="">
<div class=""><a href="https://reviews.llvm.org/D22421" class="">https://reviews.llvm.org/D22421</a><br class="">
<a href="https://reviews.llvm.org/D22271" class="">https://reviews.llvm.org/D22271</a><br class="">
<a href="https://reviews.llvm.org/D22477" class="">https://reviews.llvm.org/D22477</a><br class="">
<a href="https://reviews.llvm.org/D20774" class="">https://reviews.llvm.org/D20774</a><br class="">
<a href="https://llvm.org/bugs/show_bug.cgi?id=27925" class="">https://llvm.org/bugs/show_bug.cgi?id=27925</a><br class="">
<br class="">
</div>
I'm very interested to see what kinds of patterns you're seeing and want to optimize. It's possible that IR transforms could eliminate the need for the backend fixups...or it could make them harder. Are there bug reports for the cases that you are looking at?<br class="">
<div class="">
<div class=""><br class="">
</div>
</div>
</div>
<div class="gmail_extra"><br class="">
<div class="gmail_quote">On Tue, Jul 19, 2016 at 9:13 AM, Artur Pilipenko <span dir="ltr" class="">
<<a href="mailto:apilipenko@azulsystems.com" target="_blank" class="">apilipenko@azulsystems.com</a>></span> wrote:<br class="">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word" class="">
<div class="">Hi Sanjay,</div>
<div class=""><br class="">
</div>
<div class="">Some time ago you implemented a sext(add_nsw(x, C)) --> add(sext(x), C_sext) transformation in X86ISelLowering </div>
<div class=""><a href="https://reviews.llvm.org/D13757" target="_blank" class="">https://reviews.llvm.org/D13757</a></div>
<div class="">Is there any reason why this transformation is limited to sexts and doesn’t support zexts?</div>
<div class=""><br class="">
</div>
<div class="">Thanks,</div>
<div class="">Artur</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</body>
</html>