<div dir="ltr"><div>I did add vector tests with:<br><a href="https://reviews.llvm.org/rL295573" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>rL295573</a><br></div>...so at least we have good tests. Thanks for cleaning up the code.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 30, 2017 at 4:50 PM, Friedman, Eli via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div class="m_4619554937929768074moz-cite-prefix">Oh, you're right. Nevermind.<br>
<br>
-Eli<div><div class="h5"><br>
<br>
On 3/30/2017 3:46 PM, Craig Topper wrote:<br>
</div></div></div><div><div class="h5">
<blockquote type="cite">
<div dir="ltr">If Ty is a vector type wasn't that ConstantInt::get
in the original code going to create a splat of the Constant?</div>
<div class="gmail_extra"><br clear="all">
<div>
<div class="m_4619554937929768074gmail_signature" data-smartmail="gmail_signature">~Craig</div>
</div>
<br>
<div class="gmail_quote">On Thu, Mar 30, 2017 at 3:44 PM,
Friedman, Eli <span dir="ltr"><<a href="mailto:efriedma@codeaurora.org" target="_blank">efriedma@codeaurora.org</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On
3/30/2017 3:21 PM, Craig Topper via llvm-commits wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Author: ctopper<br>
Date: Thu Mar 30 17:21:16 2017<br>
New Revision: 299121<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=299121&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject?rev=299121&view=rev</a><br>
Log:<br>
[InstSimplify] Use m_SignBit instead of calling getSignBit
and using m_Specific. NFCI<br>
<br>
Modified:<br>
llvm/trunk/lib/Analysis/Instr<wbr>uctionSimplify.cpp<br>
<br>
Modified: llvm/trunk/lib/Analysis/Instru<wbr>ctionSimplify.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/InstructionSimplify.cpp?rev=299121&r1=299120&r2=299121&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/llvm/trunk/lib/Analysis/<wbr>InstructionSimplify.cpp?rev=29<wbr>9121&r1=299120&r2=299121&view=<wbr>diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/lib/Analysis/Instru<wbr>ctionSimplify.cpp
(original)<br>
+++ llvm/trunk/lib/Analysis/Instru<wbr>ctionSimplify.cpp
Thu Mar 30 17:21:16 2017<br>
@@ -565,10 +565,8 @@ static Value *SimplifyAddInst(Value
*Op0<br>
// add nsw/nuw (xor Y, signbit), signbit --> Y<br>
// The no-wrapping add guarantees that the top bit
will be set by the add.<br>
// Therefore, the xor must be clearing the already set
sign bit of Y.<br>
- Constant *SignBit =<br>
- ConstantInt::get(Ty,
APInt::getSignBit(Ty->getScala<wbr>rSizeInBits()));<br>
- if ((isNSW || isNUW) && match(Op1,
m_Specific(SignBit)) &&<br>
- match(Op0, m_Xor(m_Value(Y), m_Specific(SignBit))))<br>
+ if ((isNSW || isNUW) && match(Op1, m_SignBit())
&&<br>
+ match(Op0, m_Xor(m_Value(Y), m_SignBit())))<br>
return Y;<br>
<br>
</blockquote>
<br>
Are you certain there's no functional change here?
m_SignBit() also matches vectors.<span class="m_4619554937929768074HOEnZb"><font color="#888888"><br>
<br>
-Eli<br>
<br>
-- <br>
Employee of Qualcomm Innovation Center, Inc.<br>
Qualcomm Innovation Center, Inc. is a member of Code
Aurora Forum, a Linux Foundation Collaborative Project<br>
<br>
</font></span></blockquote>
</div>
<br>
</div>
</blockquote>
<br>
<p><br>
</p>
<pre class="m_4619554937929768074moz-signature" cols="72">--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project</pre>
</div></div></div>
<br>______________________________<wbr>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div>