[llvm] r222499 - SROA: The alloca type isn't a candidate promotion type for vectors

Chandler Carruth chandlerc at google.com
Thu Nov 20 18:38:41 PST 2014


On Thu, Nov 20, 2014 at 6:34 PM, David Majnemer <david.majnemer at gmail.com>
wrote:

> Modified: llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp?rev=222499&r1=222498&r2=222499&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp (original)
> +++ llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp Thu Nov 20 20:34:55
> 2014
> @@ -394,6 +394,13 @@ static BinaryOperator *LowerNegateToMult
>    BinaryOperator *Res = CreateMul(Neg->getOperand(1), NegOne, "", Neg,
> Neg);
>    Neg->setOperand(1, Constant::getNullValue(Ty)); // Drop use of op.
>    Res->takeName(Neg);
> +  if (Ty->isIntegerTy()) {
> +    bool NSW = cast<BinaryOperator>(Neg)->hasNoSignedWrap();
> +    bool NUW = cast<BinaryOperator>(Neg)->hasNoUnsignedWrap();
> +    if (NSW || NUW)
> +      Res->setHasNoSignedWrap(true);
> +    Res->setHasNoUnsignedWrap(NUW);
> +  }
>

Uh, this doesn't seem like it has much to do with SROA?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141120/58d9f19c/attachment.html>


More information about the llvm-commits mailing list