<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=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jun 28, 2016, at 10:35 AM, Demikhovsky, Elena via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" class="">llvm-commits@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="WordSection1" style="page: WordSection1; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><a name="_MailEndCompose" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">It would be great if you can provide a test, even big.<o:p class=""></o:p></span></a></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">If I’ll not find a solution in 2-3 days, I’ll revert the patch.<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">The problem is not in the small diff between two commits, it is, probably, in usage of getPtrStride() that allows to vectorize more loops.<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">Thank you.</span></div></div></div></blockquote><div><br class=""></div><div>It is still a good idea to explain what has changed for the recommit in the commit log .</div><div><br class=""></div><div>Adam</div><br class=""><blockquote type="cite" class=""><div class=""><div class="WordSection1" style="page: WordSection1; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm 0cm 0.0001pt 36pt; font-size: 12pt; font-family: 'Times New Roman', serif; text-indent: -18pt;" class=""><span style="font-family: Calibri, sans-serif; color: rgb(47, 84, 150);" class=""><span class="">-<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-family: 'Times New Roman';" class=""> <span class="Apple-converted-space"> </span></span></span></span><span dir="LTR" class=""></span><b class=""><i class=""><span style="color: rgb(47, 84, 150);" class=""> Elena<o:p class=""></o:p></span></i></b></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><o:p class=""> </o:p></span></div><div style="border-style: none none none solid; border-left-color: blue; border-left-width: 1.5pt; padding: 0cm 0cm 0cm 4pt;" class=""><div class=""><div style="border-style: solid none none; border-top-color: rgb(225, 225, 225); border-top-width: 1pt; padding: 3pt 0cm 0cm;" class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><a name="_____replyseparator" class=""></a><b class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif;" class="">From:</span></b><span style="font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class="Apple-converted-space"> </span>Eric Liu [<a href="mailto:ioeric@google.com" style="color: purple; text-decoration: underline;" class="">mailto:ioeric@google.com</a>]<span class="Apple-converted-space"> </span><br class=""><b class="">Sent:</b><span class="Apple-converted-space"> </span>Tuesday, June 28, 2016 17:36<br class=""><b class="">To:</b><span class="Apple-converted-space"> </span>Demikhovsky, Elena <<a href="mailto:elena.demikhovsky@intel.com" style="color: purple; text-decoration: underline;" class="">elena.demikhovsky@intel.com</a>>;<span class="Apple-converted-space"> </span><a href="mailto:llvm-commits@lists.llvm.org" style="color: purple; text-decoration: underline;" class="">llvm-commits@lists.llvm.org</a><br class=""><b class="">Cc:</b><span class="Apple-converted-space"> </span>Nirav Davé <<a href="mailto:niravd@google.com" style="color: purple; text-decoration: underline;" class="">niravd@google.com</a>><br class=""><b class="">Subject:</b><span class="Apple-converted-space"> </span>Re: [llvm] r273864 - Fixed consecutive memory access detection in Loop Vectorizer.<o:p class=""></o:p></span></div></div></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><o:p class=""> </o:p></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">Hi Elena,<o:p class=""></o:p></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">I see this is a re-commit of a previous patch but wondering if new changes you introduced in this re-commit have been reviewed or not? <o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">One of our internal test cases fails when built with llvm that is sync to this revision (the test passes with both r273863 llvm and gcc). I am trying to find a minimal test case that can reproduce the bug, but please could you take a second look at the changes? Thanks a lot!<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">Cheers,<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">Eric<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><o:p class=""> </o:p></div><div class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">On Mon, Jun 27, 2016 at 1:26 PM Elena Demikhovsky via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" style="color: purple; text-decoration: underline;" class="">llvm-commits@lists.llvm.org</a>> wrote:<o:p class=""></o:p></div></div><blockquote style="border-style: none none none solid; border-left-color: rgb(204, 204, 204); border-left-width: 1pt; padding: 0cm 0cm 0cm 6pt; margin-left: 4.8pt; margin-right: 0cm;" class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">Author: delena<br class="">Date: Mon Jun 27 06:19:23 2016<br class="">New Revision: 273864<br class=""><br class="">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project?rev=273864&view=rev" target="_blank" style="color: purple; text-decoration: underline;" class="">http://llvm.org/viewvc/llvm-project?rev=273864&view=rev</a><br class="">Log:<br class="">Fixed consecutive memory access detection in Loop Vectorizer.<br class="">It did not handle correctly cases without GEP.<br class=""><br class="">The following loop wasn't vectorized:<br class=""><br class="">for (int i=0; i<len; i++)<br class=""><br class=""> *to++ = *from++;<br class=""><br class="">I use getPtrStride() to find Stride for memory access and return 0 is the Stride is not 1 or -1.<br class=""><br class="">Re-commit rL273257 - revision:<span class="Apple-converted-space"> </span><a href="http://reviews.llvm.org/D20789" target="_blank" style="color: purple; text-decoration: underline;" class="">http://reviews.llvm.org/D20789</a><br class=""><br class=""><br class="">Added:<br class=""> llvm/trunk/test/Transforms/LoopVectorize/consec_no_gep.ll<br class=""> - copied unchanged from r273257, llvm/trunk/test/Transforms/LoopVectorize/consec_no_gep.ll<br class=""> llvm/trunk/test/Transforms/LoopVectorize/consec_no_gep2.ll<br class="">Modified:<br class=""> llvm/trunk/include/llvm/Analysis/LoopAccessAnalysis.h<br class=""> llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp<br class=""> llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp<br class=""> llvm/trunk/test/Transforms/LoopVectorize/ptr-induction.ll<br class=""><br class="">Modified: llvm/trunk/include/llvm/Analysis/LoopAccessAnalysis.h<br class="">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/LoopAccessAnalysis.h?rev=273864&r1=273863&r2=273864&view=diff" target="_blank" style="color: purple; text-decoration: underline;" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/LoopAccessAnalysis.h?rev=273864&r1=273863&r2=273864&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/include/llvm/Analysis/LoopAccessAnalysis.h (original)<br class="">+++ llvm/trunk/include/llvm/Analysis/LoopAccessAnalysis.h Mon Jun 27 06:19:23 2016<br class="">@@ -679,9 +679,11 @@ const SCEV *replaceSymbolicStrideSCEV(Pr<br class=""> /// to \p PtrToStride and therefore add further predicates to \p PSE.<br class=""> /// The \p Assume parameter indicates if we are allowed to make additional<br class=""> /// run-time assumptions.<br class="">+/// The \p ShouldCheckWrap indicates that we should ensure that address<br class="">+/// calculation does not wrap.<br class=""> int getPtrStride(PredicatedScalarEvolution &PSE, Value *Ptr, const Loop *Lp,<br class=""> const ValueToValueMap &StridesMap = ValueToValueMap(),<br class="">- bool Assume = false);<br class="">+ bool Assume = false, bool ShouldCheckWrap = true);<br class=""><br class=""> /// \brief Returns true if the memory operations \p A and \p B are consecutive.<br class=""> /// This is a simple API that does not depend on the analysis pass.<br class=""><br class="">Modified: llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp<br class="">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp?rev=273864&r1=273863&r2=273864&view=diff" target="_blank" style="color: purple; text-decoration: underline;" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp?rev=273864&r1=273863&r2=273864&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp (original)<br class="">+++ llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp Mon Jun 27 06:19:23 2016<br class="">@@ -866,7 +866,7 @@ static bool isNoWrapAddRec(Value *Ptr, c<br class=""> /// \brief Check whether the access through \p Ptr has a constant stride.<br class=""> int llvm::getPtrStride(PredicatedScalarEvolution &PSE, Value *Ptr,<br class=""> const Loop *Lp, const ValueToValueMap &StridesMap,<br class="">- bool Assume) {<br class="">+ bool Assume, bool ShouldCheckWrap) {<br class=""> Type *Ty = Ptr->getType();<br class=""> assert(Ty->isPointerTy() && "Unexpected non-ptr");<br class=""><br class="">@@ -905,9 +905,9 @@ int llvm::getPtrStride(PredicatedScalarE<br class=""> // to access the pointer value "0" which is undefined behavior in address<br class=""> // space 0, therefore we can also vectorize this case.<br class=""> bool IsInBoundsGEP = isInBoundsGep(Ptr);<br class="">- bool IsNoWrapAddRec =<br class="">- PSE.hasNoOverflow(Ptr, SCEVWrapPredicate::IncrementNUSW) ||<br class="">- isNoWrapAddRec(Ptr, AR, PSE, Lp);<br class="">+ bool IsNoWrapAddRec = !ShouldCheckWrap ||<br class="">+ PSE.hasNoOverflow(Ptr, SCEVWrapPredicate::IncrementNUSW) ||<br class="">+ isNoWrapAddRec(Ptr, AR, PSE, Lp);<br class=""> bool IsInAddressSpaceZero = PtrTy->getAddressSpace() == 0;<br class=""> if (!IsNoWrapAddRec && !IsInBoundsGEP && !IsInAddressSpaceZero) {<br class=""> if (Assume) {<br class=""><br class="">Modified: llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp<br class="">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp?rev=273864&r1=273863&r2=273864&view=diff" target="_blank" style="color: purple; text-decoration: underline;" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp?rev=273864&r1=273863&r2=273864&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp (original)<br class="">+++ llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp Mon Jun 27 06:19:23 2016<br class="">@@ -2242,87 +2242,13 @@ Value *InnerLoopVectorizer::getStepVecto<br class=""> }<br class=""><br class=""> int LoopVectorizationLegality::isConsecutivePtr(Value *Ptr) {<br class="">- assert(Ptr->getType()->isPointerTy() && "Unexpected non-ptr");<br class="">- auto *SE = PSE.getSE();<br class="">- // Make sure that the pointer does not point to structs.<br class="">- if (Ptr->getType()->getPointerElementType()->isAggregateType())<br class="">- return 0;<br class="">-<br class="">- // If this value is a pointer induction variable, we know it is consecutive.<br class="">- PHINode *Phi = dyn_cast_or_null<PHINode>(Ptr);<br class="">- if (Phi && Inductions.count(Phi)) {<br class="">- InductionDescriptor II = Inductions[Phi];<br class="">- return II.getConsecutiveDirection();<br class="">- }<br class="">-<br class="">- GetElementPtrInst *Gep = getGEPInstruction(Ptr);<br class="">- if (!Gep)<br class="">- return 0;<br class="">-<br class="">- unsigned NumOperands = Gep->getNumOperands();<br class="">- Value *GpPtr = Gep->getPointerOperand();<br class="">- // If this GEP value is a consecutive pointer induction variable and all of<br class="">- // the indices are constant, then we know it is consecutive.<br class="">- Phi = dyn_cast<PHINode>(GpPtr);<br class="">- if (Phi && Inductions.count(Phi)) {<br class="">-<br class="">- // Make sure that the pointer does not point to structs.<br class="">- PointerType *GepPtrType = cast<PointerType>(GpPtr->getType());<br class="">- if (GepPtrType->getElementType()->isAggregateType())<br class="">- return 0;<br class="">-<br class="">- // Make sure that all of the index operands are loop invariant.<br class="">- for (unsigned i = 1; i < NumOperands; ++i)<br class="">- if (!SE->isLoopInvariant(PSE.getSCEV(Gep->getOperand(i)), TheLoop))<br class="">- return 0;<br class="">-<br class="">- InductionDescriptor II = Inductions[Phi];<br class="">- return II.getConsecutiveDirection();<br class="">- }<br class=""><br class="">- unsigned InductionOperand = getGEPInductionOperand(Gep);<br class="">-<br class="">- // Check that all of the gep indices are uniform except for our induction<br class="">- // operand.<br class="">- for (unsigned i = 0; i != NumOperands; ++i)<br class="">- if (i != InductionOperand &&<br class="">- !SE->isLoopInvariant(PSE.getSCEV(Gep->getOperand(i)), TheLoop))<br class="">- return 0;<br class="">-<br class="">- // We can emit wide load/stores only if the last non-zero index is the<br class="">- // induction variable.<br class="">- const SCEV *Last = nullptr;<br class="">- if (!getSymbolicStrides() || !getSymbolicStrides()->count(Gep))<br class="">- Last = PSE.getSCEV(Gep->getOperand(InductionOperand));<br class="">- else {<br class="">- // Because of the multiplication by a stride we can have a s/zext cast.<br class="">- // We are going to replace this stride by 1 so the cast is safe to ignore.<br class="">- //<br class="">- // %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]<br class="">- // %0 = trunc i64 %indvars.iv to i32<br class="">- // %mul = mul i32 %0, %Stride1<br class="">- // %idxprom = zext i32 %mul to i64 << Safe cast.<br class="">- // %arrayidx = getelementptr inbounds i32* %B, i64 %idxprom<br class="">- //<br class="">- Last = replaceSymbolicStrideSCEV(PSE, *getSymbolicStrides(),<br class="">- Gep->getOperand(InductionOperand), Gep);<br class="">- if (const SCEVCastExpr *C = dyn_cast<SCEVCastExpr>(Last))<br class="">- Last =<br class="">- (C->getSCEVType() == scSignExtend || C->getSCEVType() == scZeroExtend)<br class="">- ? C->getOperand()<br class="">- : Last;<br class="">- }<br class="">- if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(Last)) {<br class="">- const SCEV *Step = AR->getStepRecurrence(*SE);<br class="">-<br class="">- // The memory is consecutive because the last index is consecutive<br class="">- // and all other indices are loop invariant.<br class="">- if (Step->isOne())<br class="">- return 1;<br class="">- if (Step->isAllOnesValue())<br class="">- return -1;<br class="">- }<br class="">+ const ValueToValueMap &Strides = getSymbolicStrides() ? *getSymbolicStrides() :<br class="">+ ValueToValueMap();<br class=""><br class="">+ int Stride = getPtrStride(PSE, Ptr, TheLoop, Strides, true, false);<br class="">+ if (Stride == 1 || Stride == -1)<br class="">+ return Stride;<br class=""> return 0;<br class=""> }<br class=""><br class="">@@ -2658,7 +2584,9 @@ void InnerLoopVectorizer::vectorizeMemor<br class=""> // Handle consecutive loads/stores.<br class=""> GetElementPtrInst *Gep = getGEPInstruction(Ptr);<br class=""> if (ConsecutiveStride) {<br class="">- if (Gep && Legal->isInductionVariable(Gep->getPointerOperand())) {<br class="">+ if (Gep &&<br class="">+ !PSE.getSE()->isLoopInvariant(PSE.getSCEV(Gep->getPointerOperand()),<br class="">+ OrigLoop)) {<br class=""> setDebugLocFromInst(Builder, Gep);<br class=""> Value *PtrOperand = Gep->getPointerOperand();<br class=""> Value *FirstBasePtr = getVectorValue(PtrOperand)[0];<br class="">@@ -2671,9 +2599,6 @@ void InnerLoopVectorizer::vectorizeMemor<br class=""> Ptr = Builder.Insert(Gep2);<br class=""> } else if (Gep) {<br class=""> setDebugLocFromInst(Builder, Gep);<br class="">- assert(PSE.getSE()->isLoopInvariant(PSE.getSCEV(Gep->getPointerOperand()),<br class="">- OrigLoop) &&<br class="">- "Base ptr must be invariant");<br class=""> // The last index does not have to be the induction. It can be<br class=""> // consecutive and be a function of the index. For example A[I+1];<br class=""> unsigned NumOperands = Gep->getNumOperands();<br class="">@@ -2702,8 +2627,6 @@ void InnerLoopVectorizer::vectorizeMemor<br class=""> }<br class=""> Ptr = Builder.Insert(Gep2);<br class=""> } else { // No GEP<br class="">- // Use the induction element ptr.<br class="">- assert(isa<PHINode>(Ptr) && "Invalid induction ptr");<br class=""> setDebugLocFromInst(Builder, Ptr);<br class=""> VectorParts &PtrVal = getVectorValue(Ptr);<br class=""> Ptr = Builder.CreateExtractElement(PtrVal[0], Zero);<br class=""><br class="">Added: llvm/trunk/test/Transforms/LoopVectorize/consec_no_gep2.ll<br class="">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopVectorize/consec_no_gep2.ll?rev=273864&view=auto" target="_blank" style="color: purple; text-decoration: underline;" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopVectorize/consec_no_gep2.ll?rev=273864&view=auto</a><br class="">==============================================================================<br class="">--- llvm/trunk/test/Transforms/LoopVectorize/consec_no_gep2.ll (added)<br class="">+++ llvm/trunk/test/Transforms/LoopVectorize/consec_no_gep2.ll Mon Jun 27 06:19:23 2016<br class="">@@ -0,0 +1,34 @@<br class="">+; RUN: opt < %s -loop-vectorize -S | FileCheck %s<br class="">+target datalayout = "E-m:e-i64:64-n32:64"<br class="">+target triple = "powerpc64-unknown-linux-gnu"<br class="">+<br class="">+; CHECK-LABEL: @img2buf<br class="">+; CHECK: store <4 x i32><br class="">+; Function Attrs: nounwind<br class="">+define void @img2buf(i64 %val, i8* nocapture %buf, i32 %N) local_unnamed_addr #0 {<br class="">+entry:<br class="">+ br label %l2<br class="">+<br class="">+l2:<br class="">+ br label %<a href="http://for.body57.us/" target="_blank" style="color: purple; text-decoration: underline;" class="">for.body57.us</a><br class="">+<br class="">+<a href="http://for.body57.us/" target="_blank" style="color: purple; text-decoration: underline;" class="">for.body57.us</a>:<br class="">+ %indvars.iv24 = phi i64 [ %val, %l2 ], [ %indvars.iv.next25, %<a href="http://for.body57.us/" target="_blank" style="color: purple; text-decoration: underline;" class="">for.body57.us</a><span class="Apple-converted-space"> </span>]<br class="">+ %0 = trunc i64 %indvars.iv24 to i32<br class="">+ %<a href="http://add77.us/" target="_blank" style="color: purple; text-decoration: underline;" class="">add77.us</a><span class="Apple-converted-space"> </span>= add i32 5, %0<br class="">+ %<a href="http://mul78.us/" target="_blank" style="color: purple; text-decoration: underline;" class="">mul78.us</a><span class="Apple-converted-space"> </span>= shl nsw i32 %<a href="http://add77.us/" target="_blank" style="color: purple; text-decoration: underline;" class="">add77.us</a>, 2<br class="">+ %<a href="http://idx.ext79.us/" target="_blank" style="color: purple; text-decoration: underline;" class="">idx.ext79.us</a><span class="Apple-converted-space"> </span>= sext i32 %<a href="http://mul78.us/" target="_blank" style="color: purple; text-decoration: underline;" class="">mul78.us</a><span class="Apple-converted-space"> </span>to i64<br class="">+ %<a href="http://add.ptr80.us/" target="_blank" style="color: purple; text-decoration: underline;" class="">add.ptr80.us</a><span class="Apple-converted-space"> </span>= getelementptr inbounds i8, i8* %buf, i64 %<a href="http://idx.ext79.us/" target="_blank" style="color: purple; text-decoration: underline;" class="">idx.ext79.us</a><br class="">+ %<a href="http://ui32.0.add.ptr80.sroa_cast.us/" target="_blank" style="color: purple; text-decoration: underline;" class="">ui32.0.add.ptr80.sroa_cast.us</a><span class="Apple-converted-space"> </span>= bitcast i8* %<a href="http://add.ptr80.us/" target="_blank" style="color: purple; text-decoration: underline;" class="">add.ptr80.us</a><span class="Apple-converted-space"> </span>to i32*<br class="">+ store i32 0, i32* %<a href="http://ui32.0.add.ptr80.sroa_cast.us/" target="_blank" style="color: purple; text-decoration: underline;" class="">ui32.0.add.ptr80.sroa_cast.us</a>, align 1<br class="">+ %indvars.iv.next25 = add nsw i64 %indvars.iv24, 1<br class="">+ %lftr.wideiv26 = trunc i64 %indvars.iv.next25 to i32<br class="">+ %exitcond27 = icmp eq i32 %lftr.wideiv26, %N<br class="">+ br i1 %exitcond27, label %l3, label %<a href="http://for.body57.us/" target="_blank" style="color: purple; text-decoration: underline;" class="">for.body57.us</a><br class="">+<br class="">+l3:<br class="">+ ret void<br class="">+}<br class="">+<br class="">+attributes #0 = { nounwind "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="ppc64" "target-features"="+altivec,-bpermd,-crypto,-direct-move,-extdiv,-power8-vector,-qpx,-vsx" "unsafe-fp-math"="false" "use-soft-float"="false" }<br class="">+<br class=""><br class="">Modified: llvm/trunk/test/Transforms/LoopVectorize/ptr-induction.ll<br class="">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopVectorize/ptr-induction.ll?rev=273864&r1=273863&r2=273864&view=diff" target="_blank" style="color: purple; text-decoration: underline;" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopVectorize/ptr-induction.ll?rev=273864&r1=273863&r2=273864&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/test/Transforms/LoopVectorize/ptr-induction.ll (original)<br class="">+++ llvm/trunk/test/Transforms/LoopVectorize/ptr-induction.ll Mon Jun 27 06:19:23 2016<br class="">@@ -18,6 +18,7 @@ while.body.preheader:<br class=""> while.body: ; preds = %while.body.preheader, %while.body<br class=""> %<a href="http://a.pn/" target="_blank" style="color: purple; text-decoration: underline;" class="">a.pn</a><span class="Apple-converted-space"> </span>= phi i32* [ %incdec.ptr8, %while.body ], [ %a, %while.body.preheader ]<br class=""> %acc.07 = phi i32 [ %add, %while.body ], [ 0, %while.body.preheader ]<br class="">+ %<a href="http://a1.pn/" target="_blank" style="color: purple; text-decoration: underline;" class="">a1.pn</a><span class="Apple-converted-space"> </span>= getelementptr inbounds i32, i32* %<a href="http://a.pn/" target="_blank" style="color: purple; text-decoration: underline;" class="">a.pn</a>, i64 0<br class=""> %incdec.ptr8 = getelementptr inbounds i32, i32* %<a href="http://a.pn/" target="_blank" style="color: purple; text-decoration: underline;" class="">a.pn</a>, i64 1<br class=""> %0 = load i32, i32* %incdec.ptr8, align 1<br class=""> %add = add nuw nsw i32 %0, %acc.07<br class=""><br class=""><br class="">_______________________________________________<br class="">llvm-commits mailing list<br class=""><a href="mailto:llvm-commits@lists.llvm.org" target="_blank" style="color: purple; text-decoration: underline;" class="">llvm-commits@lists.llvm.org</a><br class=""><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" target="_blank" style="color: purple; text-decoration: underline;" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><o:p class=""></o:p></div></blockquote><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><o:p class=""> </o:p></div></div></div></div></div></div><p style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">---------------------------------------------------------------------<br class="">Intel Israel (74) Limited</p><p style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">This e-mail and any attachments may contain confidential material for<br class="">the sole use of the intended recipient(s). Any review or distribution<br class="">by others is strictly prohibited. If you are not the intended<br class="">recipient, please contact the sender and delete all copies.</p><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">_______________________________________________</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">llvm-commits mailing list</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="mailto:llvm-commits@lists.llvm.org" style="color: purple; text-decoration: underline; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">llvm-commits@lists.llvm.org</a><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" style="color: purple; text-decoration: underline; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""></div></blockquote></div><br class=""></body></html>