[llvm] r299915 - [InstCombine] Support weird size element types in dyn_castNegVal.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 11 11:37:42 PDT 2017


I fixed that in a later commit.

~Craig

On Tue, Apr 11, 2017 at 11:35 AM, Friedman, Eli <efriedma at codeaurora.org>
wrote:

> On 4/10/2017 10:42 PM, Craig Topper via llvm-commits wrote:
>
>> Author: ctopper
>> Date: Tue Apr 11 00:42:47 2017
>> New Revision: 299915
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=299915&view=rev
>> Log:
>> [InstCombine] Support weird size element types in dyn_castNegVal.
>>
>> Modified:
>>      llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
>>      llvm/trunk/test/Transforms/InstCombine/2008-05-22-NegValVector.ll
>>      llvm/trunk/test/Transforms/InstCombine/rem.ll
>>
>> Modified: llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transform
>> s/InstCombine/InstructionCombining.cpp?rev=299915&r1=299914&
>> r2=299915&view=diff
>> ============================================================
>> ==================
>> --- llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
>> (original)
>> +++ llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp Tue
>> Apr 11 00:42:47 2017
>> @@ -726,6 +726,10 @@ Value *InstCombiner::dyn_castNegVal(Valu
>>       if (C->getType()->getElementType()->isIntegerTy())
>>         return ConstantExpr::getNeg(C);
>>   +  if (ConstantVector *C = dyn_cast<ConstantVector>(V))
>> +    if (C->getType()->getElementType()->isIntegerTy())
>> +      return ConstantExpr::getNeg(C);
>>
>
> Do you need to check the operands of the ConstantVector here?  The
> existing code carefully avoids making new ConstantExprs.
>
> -Eli
>
> --
> Employee of Qualcomm Innovation Center, Inc.
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux
> Foundation Collaborative Project
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170411/7c58ae0f/attachment.html>


More information about the llvm-commits mailing list