<div><div dir="auto">This one is a bit trickier than I remembered. We may have FP here because we peeked through bitcasts in the caller. It might be better to make the signbits call there in the caller, but I have to see if that’s feasible. I reverted this + r344609 at r344612. </div></div><div><br><div class="gmail_quote"><div dir="ltr">On Tue, Oct 16, 2018 at 11:20 AM Friedman, Eli <<a href="mailto:efriedma@codeaurora.org">efriedma@codeaurora.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 10/16/2018 7:44 AM, Sanjay Patel via llvm-commits wrote:<br>
> Author: spatel<br>
> Date: Tue Oct 16 07:44:50 2018<br>
> New Revision: 344610<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=344610&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=344610&view=rev</a><br>
> Log:<br>
> [InstCombine] make sure type is integer before calling ComputeNumSignBits<br>
><br>
> Modified:<br>
> llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp<br>
><br>
> Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp?rev=344610&r1=344609&r2=344610&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp?rev=344610&r1=344609&r2=344610&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp (original)<br>
> +++ llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp Tue Oct 16 07:44:50 2018<br>
> @@ -1834,7 +1834,8 @@ static bool areInverseVectorBitmasks(Con<br>
> Value *InstCombiner::getSelectCondition(Value *A, Value *B) {<br>
> // Step 1: We need 0 or all-1's bitmasks.<br>
> Type *Ty = A->getType();<br>
> - if (ComputeNumSignBits(A) != Ty->getScalarSizeInBits())<br>
> + if (Ty->isIntOrIntVectorTy() &&<br>
> + ComputeNumSignBits(A) != Ty->getScalarSizeInBits())<br>
<br>
"&&"? Don't we need to exit early if the type isn't an integer type?<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>
</blockquote></div></div>