<div dir="ltr">Thanks!</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 22, 2016 at 5:12 PM, Hans Wennborg 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">Merged and updated to the new run line in r279474.<br>
<br>
Thanks,<br>
Hans<br>
<br>
On Mon, Aug 22, 2016 at 2:09 PM, Matthew Simpson<br>
<div class="HOEnZb"><div class="h5"><<a href="mailto:mssimpso@codeaurora.org">mssimpso@codeaurora.org</a>> wrote:<br>
> The new run line is what you need.<br>
><br>
> opt < %s -slp-schedule-budget=0 -slp-min-tree-size=0 -slp-threshold=-30<br>
> -slp-vectorizer -S<br>
><br>
> r279369 added slp-min-tree-size as a command line option. The other flag<br>
> changes here ensure that we still vectorize the test case. It was previously<br>
> only being vectorized by chance due to undefined behavior in the cost<br>
> calculation.<br>
><br>
> -- Matt<br>
><br>
><br>
> On Mon, Aug 22, 2016 at 4:58 PM, Hans Wennborg via llvm-commits<br>
> <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br>
>><br>
>> No, I didn't realize that the flag change was necessary..<br>
>><br>
>> The old test had this run line:<br>
>> opt < %s -slp-recursion-max-depth=0 -slp-vectorizer -S<br>
>><br>
>> The new one has:<br>
>> opt < %s -slp-schedule-budget=0 -slp-min-tree-size=0<br>
>> -slp-threshold=-30 -slp-vectorizer -S<br>
>><br>
>> So it seems -slp-recursion-max-depth was removed and<br>
>> -slp-schedule-budget=0 -slp-min-tree-size=0 -slp-threshold=-30 were<br>
>> added.<br>
>><br>
>> Which ones do I need for it to test the right thing on the branch and<br>
>> not run into the UB?<br>
>><br>
>> Thanks,<br>
>> Hans<br>
>><br>
>><br>
>> On Mon, Aug 22, 2016 at 1:48 PM, Matthew Simpson<br>
>> <<a href="mailto:mssimpso@codeaurora.org">mssimpso@codeaurora.org</a>> wrote:<br>
>> > Thanks Hans,<br>
>> ><br>
>> > Did you also get r279369? It's needed by the test case change.<br>
>> ><br>
>> > --Matt<br>
>> ><br>
>> > -----Original Message-----<br>
>> > From: <a href="mailto:hwennborg@google.com">hwennborg@google.com</a> [mailto:<a href="mailto:hwennborg@google.com">hwennborg@google.com</a>] On Behalf Of<br>
>> > Hans Wennborg<br>
>> > Sent: Monday, August 22, 2016 4:36 PM<br>
>> > To: Matthew Simpson <<a href="mailto:mssimpso@codeaurora.org">mssimpso@codeaurora.org</a>><br>
>> > Cc: Michael Kuperstein <<a href="mailto:mkuper@google.com">mkuper@google.com</a>>; Kostya Serebryany<br>
>> > <<a href="mailto:kcc@google.com">kcc@google.com</a>>; LLVM Commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>><br>
>> > Subject: Re: [llvm] r279125 - [SLP] Initialize VectorizedValue when<br>
>> > gathering<br>
>> ><br>
>> > Since the UB was already there, it's not something we're regressing and<br>
>> > so I won't block 3.9 waiting on a fix for that.<br>
>> ><br>
>> > I have committed Matt's modification of the test from r279370 to 3.9 in<br>
>> > r279468.<br>
>> ><br>
>> > Thanks,<br>
>> > Hans<br>
>> ><br>
>> > On Fri, Aug 19, 2016 at 2:54 PM, Matthew Simpson<br>
>> > <<a href="mailto:mssimpso@codeaurora.org">mssimpso@codeaurora.org</a>> wrote:<br>
>> >> I'm also fine reverting the original patch in the meantime so the ubsan<br>
>> >> bot can go back to normal. Let me know if there's a preference here. Thanks!<br>
>> >><br>
>> >> -- Matt<br>
>> >><br>
>> >> -----Original Message-----<br>
>> >> From: <a href="mailto:hwennborg@google.com">hwennborg@google.com</a> [mailto:<a href="mailto:hwennborg@google.com">hwennborg@google.com</a>] On Behalf Of<br>
>> >> Hans Wennborg<br>
>> >> Sent: Friday, August 19, 2016 5:17 PM<br>
>> >> To: Michael Kuperstein <<a href="mailto:mkuper@google.com">mkuper@google.com</a>><br>
>> >> Cc: Matthew Simpson <<a href="mailto:mssimpso@codeaurora.org">mssimpso@codeaurora.org</a>>; LLVM Commits<br>
>> >> <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>><br>
>> >> Subject: Re: [llvm] r279125 - [SLP] Initialize VectorizedValue when<br>
>> >> gathering<br>
>> >><br>
>> >> I probably won't treat it as a blocker, but if it's practical to pick<br>
>> >> up the fix (e.g. if we have to do a third release candidate anyway), I'll<br>
>> >> take it.<br>
>> >><br>
>> >> Thanks,<br>
>> >> Hans<br>
>> >><br>
>> >> On Fri, Aug 19, 2016 at 2:08 PM, Michael Kuperstein <<a href="mailto:mkuper@google.com">mkuper@google.com</a>><br>
>> >> wrote:<br>
>> >>> Regardless of the fix, I don't think this should block 3.9 - the UB<br>
>> >>> was not introduced by this commit, and is not a regression. The only<br>
>> >>> thing that changed is that now we have an in-tree test that actually<br>
>> >>> exercises the UB.<br>
>> >>><br>
>> >>> Hans, what do you think?<br>
>> >>><br>
>> >>><br>
>> >>> On Fri, Aug 19, 2016 at 12:04 PM, Matthew Simpson<br>
>> >>> <<a href="mailto:mssimpso@codeaurora.org">mssimpso@codeaurora.org</a>><br>
>> >>> wrote:<br>
>> >>>><br>
>> >>>> I've submitted a fix for review here:<br>
>> >>>> <a href="https://reviews.llvm.org/D23723" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D23723</a><br>
>> >>>><br>
>> >>>><br>
>> >>>><br>
>> >>>> -- Matt<br>
>> >>>><br>
>> >>>><br>
>> >>>><br>
>> >>>> From: Matthew Simpson [mailto:<a href="mailto:mssimpso@codeaurora.org">mssimpso@codeaurora.<wbr>org</a>]<br>
>> >>>> Sent: Friday, August 19, 2016 1:30 PM<br>
>> >>>> To: 'Michael Kuperstein' <<a href="mailto:mkuper@google.com">mkuper@google.com</a>><br>
>> >>>> Cc: 'LLVM Commits' <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>><br>
>> >>>> Subject: RE: [llvm] r279125 - [SLP] Initialize VectorizedValue when<br>
>> >>>> gathering<br>
>> >>>><br>
>> >>>><br>
>> >>>><br>
>> >>>> No, we don’t. Performing the add in int64_t should work, though.<br>
>> >>>> I’ll also probably need to update the test case since we’ll have a<br>
>> >>>> different cost.<br>
>> >>>><br>
>> >>>><br>
>> >>>><br>
>> >>>> From: Michael Kuperstein [mailto:<a href="mailto:mkuper@google.com">mkuper@google.com</a>]<br>
>> >>>> Sent: Friday, August 19, 2016 1:20 PM<br>
>> >>>><br>
>> >>>><br>
>> >>>> To: Matthew Simpson <<a href="mailto:mssimpso@codeaurora.org">mssimpso@codeaurora.org</a>><br>
>> >>>> Cc: LLVM Commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>><br>
>> >>>> Subject: Re: [llvm] r279125 - [SLP] Initialize VectorizedValue when<br>
>> >>>> gathering<br>
>> >>>><br>
>> >>>><br>
>> >>>><br>
>> >>>> I don't think we have a SaturatingAdd for signed types.<br>
>> >>>><br>
>> >>>><br>
>> >>>><br>
>> >>>> On Fri, Aug 19, 2016 at 10:05 AM, Matthew Simpson<br>
>> >>>> <<a href="mailto:mssimpso@codeaurora.org">mssimpso@codeaurora.org</a>> wrote:<br>
>> >>>><br>
>> >>>> That's right. Can we just change this to a SaturatingAdd, then?<br>
>> >>>><br>
>> >>>><br>
>> >>>><br>
>> >>>> -- Matt<br>
>> >>>><br>
>> >>>><br>
>> >>>><br>
>> >>>> On Fri, Aug 19, 2016 at 12:58 PM, Michael Kuperstein via<br>
>> >>>> llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br>
>> >>>><br>
>> >>>> getTreeCost() can return INT_MAX, and tryToReduce() adds<br>
>> >>>> getReductionCost() to that.<br>
>> >>>><br>
>> >>>> Looks like the UB has been there for a while, the new test just<br>
>> >>>> exposes it.<br>
>> >>>><br>
>> >>>><br>
>> >>>><br>
>> >>>> On Fri, Aug 19, 2016 at 9:53 AM, Matthew Simpson via llvm-commits<br>
>> >>>> <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br>
>> >>>><br>
>> >>>> Sorry about that, I’ll take a look!<br>
>> >>>><br>
>> >>>><br>
>> >>>><br>
>> >>>> -- Matt<br>
>> >>>><br>
>> >>>><br>
>> >>>><br>
>> >>>> From: Kostya Serebryany [mailto:<a href="mailto:kcc@google.com">kcc@google.com</a>]<br>
>> >>>> Sent: Friday, August 19, 2016 12:43 PM<br>
>> >>>> To: Matthew Simpson <<a href="mailto:mssimpso@codeaurora.org">mssimpso@codeaurora.org</a>><br>
>> >>>> Cc: LLVM Commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>><br>
>> >>>> Subject: Re: [llvm] r279125 - [SLP] Initialize VectorizedValue when<br>
>> >>>> gathering<br>
>> >>>><br>
>> >>>><br>
>> >>>><br>
>> >>>> I think this is causing the ubsan bot failure. please fix:<br>
>> >>>><br>
>> >>>> lib/Transforms/Vectorize/<wbr>SLPVectorizer.cpp:4177:34: runtime error:<br>
>> >>>> signed integer overflow: <a href="tel:2147483647" value="+12147483647">2147483647</a> + 11 cannot be represented in<br>
>> >>>> type 'int'<br>
>> >>>><br>
>> >>>><br>
>> >>>> <a href="http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds" rel="noreferrer" target="_blank">http://lab.llvm.org:8011/<wbr>builders/sanitizer-x86_64-<wbr>linux-fast/builds</a><br>
>> >>>> / 15655/steps/check-llvm%<wbr>20ubsan/logs/stdio<br>
>> >>>><br>
>> >>>><br>
>> >>>><br>
>> >>>> On Thu, Aug 18, 2016 at 12:50 PM, Matthew Simpson via llvm-commits<br>
>> >>>> <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br>
>> >>>><br>
>> >>>> Author: mssimpso<br>
>> >>>> Date: Thu Aug 18 14:50:32 2016<br>
>> >>>> New Revision: 279125<br>
>> >>>><br>
>> >>>> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=279125&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=279125&view=rev</a><br>
>> >>>> Log:<br>
>> >>>> [SLP] Initialize VectorizedValue when gathering<br>
>> >>>><br>
>> >>>> We abort building vectorizable trees in some cases (e.g., if the<br>
>> >>>> maximum recursion depth is reached, if the region size is too large,<br>
>> >>>> etc.). If this happens for a reduction, we can be left with a root<br>
>> >>>> entry that needs to be gathered. For these cases, we need make sure<br>
>> >>>> we actually set VectorizedValue to the resulting vector.<br>
>> >>>><br>
>> >>>> This patch ensures we properly set VectorizedValue, and it also<br>
>> >>>> ensures the insertelement sequence generated for the gathers is<br>
>> >>>> inserted at the correct location.<br>
>> >>>><br>
>> >>>> Reference: <a href="https://llvm.org/bugs/show_bug.cgi?id=28330" rel="noreferrer" target="_blank">https://llvm.org/bugs/show_<wbr>bug.cgi?id=28330</a><br>
>> >>>> Differential Revison: <a href="https://reviews.llvm.org/D23410" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D23410</a><br>
>> >>>><br>
>> >>>> Added:<br>
>> >>>>     llvm/trunk/test/Transforms/<wbr>SLPVectorizer/AArch64/gather-<wbr>root.ll<br>
>> >>>> Modified:<br>
>> >>>>     llvm/trunk/lib/Transforms/<wbr>Vectorize/SLPVectorizer.cpp<br>
>> >>>><br>
>> >>>> Modified: llvm/trunk/lib/Transforms/<wbr>Vectorize/SLPVectorizer.cpp<br>
>> >>>> URL:<br>
>> >>>> <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vector" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/lib/<wbr>Transforms/Vector</a><br>
>> >>>> i ze/SLPVectorizer.cpp?rev=<wbr>279125&r1=279124&r2=279125&<wbr>view=diff<br>
>> >>>><br>
>> >>>> ==============================<wbr>==============================<wbr>========<br>
>> >>>> =<br>
>> >>>> =========<br>
>> >>>> --- llvm/trunk/lib/Transforms/<wbr>Vectorize/SLPVectorizer.cpp (original)<br>
>> >>>> +++ llvm/trunk/lib/Transforms/<wbr>Vectorize/SLPVectorizer.cpp Thu Aug 18<br>
>> >>>> 14:50:32 2016<br>
>> >>>> @@ -2153,11 +2153,61 @@ void BoUpSLP::<wbr>reorderInputsAccordingToOp<br>
>> >>>>  }<br>
>> >>>><br>
>> >>>>  void BoUpSLP::<wbr>setInsertPointAfterBundle(<wbr>ArrayRef<Value *> VL) {<br>
>> >>>> -  Instruction *VL0 = cast<Instruction>(VL[0]);<br>
>> >>>> -  BasicBlock::iterator NextInst(VL0);<br>
>> >>>> -  ++NextInst;<br>
>> >>>> -  Builder.SetInsertPoint(VL0-><wbr>getParent(), NextInst);<br>
>> >>>> -  Builder.<wbr>SetCurrentDebugLocation(VL0-><wbr>getDebugLoc());<br>
>> >>>> +<br>
>> >>>> +  // Get the basic block this bundle is in. All instructions in the<br>
>> >>>> bundle<br>
>> >>>> +  // should be in this block.<br>
>> >>>> +  auto *Front = cast<Instruction>(VL.front());  auto *BB =<br>
>> >>>> + Front->getParent();  assert(all_of(make_range(VL.<wbr>begin(),<br>
>> >>>> + VL.end()), [&](Value *V) -> bool {<br>
>> >>>> +    return cast<Instruction>(V)-><wbr>getParent() == BB;  }));<br>
>> >>>> +<br>
>> >>>> +  // The last instruction in the bundle in program order.<br>
>> >>>> +  Instruction *LastInst = nullptr;<br>
>> >>>> +<br>
>> >>>> +  // Find the last instruction. The common case should be that BB<br>
>> >>>> + has<br>
>> >>>> been<br>
>> >>>> +  // scheduled, and the last instruction is VL.back(). So we start<br>
>> >>>> + with  // VL.back() and iterate over schedule data until we reach<br>
>> >>>> + the end of<br>
>> >>>> the<br>
>> >>>> +  // bundle. The end of the bundle is marked by null ScheduleData.<br>
>> >>>> +  if (BlocksSchedules.count(BB)) {<br>
>> >>>> +    auto *Bundle = BlocksSchedules[BB]-><wbr>getScheduleData(VL.back());<br>
>> >>>> +    if (Bundle && Bundle->isPartOfBundle())<br>
>> >>>> +      for (; Bundle; Bundle = Bundle->NextInBundle)<br>
>> >>>> +        LastInst = Bundle->Inst;<br>
>> >>>> +  }<br>
>> >>>> +<br>
>> >>>> +  // LastInst can still be null at this point if there's either not<br>
>> >>>> + an<br>
>> >>>> entry<br>
>> >>>> +  // for BB in BlocksSchedules or there's no ScheduleData available<br>
>> >>>> + for  // VL.back(). This can be the case if buildTree_rec aborts<br>
>> >>>> + for various  // reasons (e.g., the maximum recursion depth is<br>
>> >>>> + reached, the maximum<br>
>> >>>> region<br>
>> >>>> +  // size is reached, etc.). ScheduleData is initialized in the<br>
>> >>>> scheduling<br>
>> >>>> +  // "dry-run".<br>
>> >>>> +  //<br>
>> >>>> +  // If this happens, we can still find the last instruction by<br>
>> >>>> + brute<br>
>> >>>> force. We<br>
>> >>>> +  // iterate forwards from Front (inclusive) until we either see<br>
>> >>>> + all // instructions in the bundle or reach the end of the block.<br>
>> >>>> + If Front<br>
>> >>>> is the<br>
>> >>>> +  // last instruction in program order, LastInst will be set to<br>
>> >>>> + Front,<br>
>> >>>> and we<br>
>> >>>> +  // will visit all the remaining instructions in the block.<br>
>> >>>> +  //<br>
>> >>>> +  // One of the reasons we exit early from buildTree_rec is to<br>
>> >>>> + place an<br>
>> >>>> upper<br>
>> >>>> +  // bound on compile-time. Thus, taking an additional compile-time<br>
>> >>>> + hit<br>
>> >>>> here is<br>
>> >>>> +  // not ideal. However, this should be exceedingly rare since it<br>
>> >>>> requires that<br>
>> >>>> +  // we both exit early from buildTree_rec and that the bundle be<br>
>> >>>> out-of-order<br>
>> >>>> +  // (causing us to iterate all the way to the end of the block).<br>
>> >>>> +  if (!LastInst) {<br>
>> >>>> +    SmallPtrSet<Value *, 16> Bundle(VL.begin(), VL.end());<br>
>> >>>> +    for (auto &I : make_range(BasicBlock::<wbr>iterator(Front),<br>
>> >>>> BB->end())) {<br>
>> >>>> +      if (Bundle.erase(&I))<br>
>> >>>> +        LastInst = &I;<br>
>> >>>> +      if (Bundle.empty())<br>
>> >>>> +        break;<br>
>> >>>> +    }<br>
>> >>>> +  }<br>
>> >>>> +<br>
>> >>>> +  // Set the insertion point after the last instruction in the<br>
>> >>>> bundle.<br>
>> >>>> Set the<br>
>> >>>> +  // debug location to Front.<br>
>> >>>> +  Builder.SetInsertPoint(BB, next(BasicBlock::iterator(<wbr>LastInst)));<br>
>> >>>> +  Builder.<wbr>SetCurrentDebugLocation(Front-<wbr>>getDebugLoc());<br>
>> >>>>  }<br>
>> >>>><br>
>> >>>>  Value *BoUpSLP::Gather(ArrayRef<<wbr>Value *> VL, VectorType *Ty) { @@<br>
>> >>>> -2235,7 +2285,9 @@ Value *BoUpSLP::vectorizeTree(<wbr>TreeEntry<br>
>> >>>><br>
>> >>>>    if (E->NeedToGather) {<br>
>> >>>>      setInsertPointAfterBundle(E-><wbr>Scalars);<br>
>> >>>> -    return Gather(E->Scalars, VecTy);<br>
>> >>>> +    auto *V = Gather(E->Scalars, VecTy);<br>
>> >>>> +    E->VectorizedValue = V;<br>
>> >>>> +    return V;<br>
>> >>>>    }<br>
>> >>>><br>
>> >>>>    unsigned Opcode = getSameOpcode(E->Scalars); @@ -2282,7 +2334,10<br>
>> >>>> @@ Value *BoUpSLP::vectorizeTree(<wbr>TreeEntry<br>
>> >>>>          E->VectorizedValue = V;<br>
>> >>>>          return V;<br>
>> >>>>        }<br>
>> >>>> -      return Gather(E->Scalars, VecTy);<br>
>> >>>> +      setInsertPointAfterBundle(E-><wbr>Scalars);<br>
>> >>>> +      auto *V = Gather(E->Scalars, VecTy);<br>
>> >>>> +      E->VectorizedValue = V;<br>
>> >>>> +      return V;<br>
>> >>>>      }<br>
>> >>>>      case Instruction::ExtractValue: {<br>
>> >>>>        if (canReuseExtract(E->Scalars, Instruction::ExtractValue)) {<br>
>> >>>> @@ -2294,7 +2349,10 @@ Value *BoUpSLP::vectorizeTree(<wbr>TreeEntry<br>
>> >>>>          E->VectorizedValue = V;<br>
>> >>>>          return propagateMetadata(V, E->Scalars);<br>
>> >>>>        }<br>
>> >>>> -      return Gather(E->Scalars, VecTy);<br>
>> >>>> +      setInsertPointAfterBundle(E-><wbr>Scalars);<br>
>> >>>> +      auto *V = Gather(E->Scalars, VecTy);<br>
>> >>>> +      E->VectorizedValue = V;<br>
>> >>>> +      return V;<br>
>> >>>>      }<br>
>> >>>>      case Instruction::ZExt:<br>
>> >>>>      case Instruction::SExt:<br>
>> >>>><br>
>> >>>> Added:<br>
>> >>>> llvm/trunk/test/Transforms/<wbr>SLPVectorizer/AArch64/gather-<wbr>root.ll<br>
>> >>>> URL:<br>
>> >>>> <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SLPVe" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/test/<wbr>Transforms/SLPVe</a><br>
>> >>>> c torizer/AArch64/gather-root.<wbr>ll?rev=279125&view=auto<br>
>> >>>><br>
>> >>>> ==============================<wbr>==============================<wbr>========<br>
>> >>>> =<br>
>> >>>> =========<br>
>> >>>> --- llvm/trunk/test/Transforms/<wbr>SLPVectorizer/AArch64/gather-<wbr>root.ll<br>
>> >>>> (added)<br>
>> >>>> +++ llvm/trunk/test/Transforms/<wbr>SLPVectorizer/AArch64/gather-<wbr>root.ll<br>
>> >>>> +++ Thu<br>
>> >>>> Aug 18 14:50:32 2016<br>
>> >>>> @@ -0,0 +1,95 @@<br>
>> >>>> +; RUN: opt < %s -slp-vectorizer -S | FileCheck %s<br>
>> >>>> +--check-prefix=DEFAULT ; RUN: opt < %s -slp-recursion-max-depth=0<br>
>> >>>> +-slp-vectorizer -S | FileCheck<br>
>> >>>> %s --check-prefix=GATHER<br>
>> >>>> +<br>
>> >>>> +target datalayout =<br>
>> >>>> "e-m:e-i8:8:32-i16:16:32-i64:<wbr>64-i128:128-n32:64-S128"<br>
>> >>>> +target triple = "aarch64--linux-gnu"<br>
>> >>>> +<br>
>> >>>> +@a = common global [80 x i8] zeroinitializer, align 16<br>
>> >>>> +<br>
>> >>>> +; DEFAULT-LABEL: @PR28330(<br>
>> >>>> +; DEFAULT: %tmp17 = phi i32 [ %tmp34, %for.body ], [ 0, %entry ] ;<br>
>> >>>> +DEFAULT: %tmp18 = phi i32 [ %tmp35, %for.body ], [ %n, %entry ] ;<br>
>> >>>> +DEFAULT: %[[S0:.+]] = select <8 x i1> %1, <8 x i32> <i32 -720, i32<br>
>> >>>> -720, i32 -720, i32 -720, i32 -720, i32 -720, i32 -720, i32 -720>,<br>
>> >>>> <8 x i32><br>
>> >>>> <i32 -80, i32 -80, i32 -80, i32 -80, i32 -80, i32 -80, i32 -80, i32<br>
>> >>>> -80><br>
>> >>>> +; DEFAULT: %[[R0:.+]] = shufflevector <8 x i32> %[[S0]], <8 x i32><br>
>> >>>> +undef,<br>
>> >>>> <8 x i32> <i32 4, i32 5, i32 6, i32 7, i32 undef, i32 undef, i32<br>
>> >>>> undef, i32<br>
>> >>>> undef><br>
>> >>>> +; DEFAULT: %[[R1:.+]] = add <8 x i32> %[[S0]], %[[R0]] ; DEFAULT:<br>
>> >>>> +%[[R2:.+]] = shufflevector <8 x i32> %[[R1]], <8 x i32> undef,<br>
>> >>>> <8 x i32> <i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef,<br>
>> >>>> i32 undef, i32 undef><br>
>> >>>> +; DEFAULT: %[[R3:.+]] = add <8 x i32> %[[R1]], %[[R2]] ; DEFAULT:<br>
>> >>>> +%[[R4:.+]] = shufflevector <8 x i32> %[[R3]], <8 x i32> undef,<br>
>> >>>> <8 x i32> <i32 1, i32 undef, i32 undef, i32 undef, i32 undef, i32<br>
>> >>>> undef, i32 undef, i32 undef><br>
>> >>>> +; DEFAULT: %[[R5:.+]] = add <8 x i32> %[[R3]], %[[R4]] ; DEFAULT:<br>
>> >>>> +%[[R6:.+]] = extractelement <8 x i32> %[[R5]], i32 0 ; DEFAULT:<br>
>> >>>> +%tmp34 = add i32 %[[R6]], %tmp17 ; ; GATHER-LABEL: @PR28330( ;<br>
>> >>>> +GATHER: %tmp17 = phi i32 [ %tmp34, %for.body ], [ 0, %entry ] ;<br>
>> >>>> +GATHER: %tmp18 = phi i32 [ %tmp35, %for.body ], [ %n, %entry ] ;<br>
>> >>>> +GATHER: %tmp19 = select i1 %tmp1, i32 -720, i32 -80 ; GATHER:<br>
>> >>>> +%tmp21 = select i1 %tmp3, i32 -720, i32 -80 ; GATHER: %tmp23 =<br>
>> >>>> +select i1 %tmp5, i32 -720, i32 -80 ; GATHER: %tmp25 = select i1<br>
>> >>>> +%tmp7, i32 -720, i32 -80 ; GATHER: %tmp27 = select i1 %tmp9, i32<br>
>> >>>> +-720, i32 -80 ; GATHER: %tmp29 = select i1 %tmp11, i32 -720, i32 -80<br>
>> >>>> ; GATHER:<br>
>> >>>> +%tmp31 = select i1 %tmp13, i32 -720, i32 -80 ; GATHER: %tmp33 =<br>
>> >>>> +select i1 %tmp15, i32 -720, i32 -80 ; GATHER: %[[I0:.+]] =<br>
>> >>>> +insertelement <8 x i32> undef, i32 %tmp19, i32 0 ; GATHER:<br>
>> >>>> +%[[I1:.+]] = insertelement <8 x i32> %[[I0]], i32 %tmp21, i32 1 ;<br>
>> >>>> +GATHER: %[[I2:.+]] = insertelement <8 x i32> %[[I1]], i32 %tmp23,<br>
>> >>>> +i32 2 ; GATHER: %[[I3:.+]] = insertelement <8 x i32> %[[I2]], i32<br>
>> >>>> +%tmp25, i32 3 ; GATHER: %[[I4:.+]] = insertelement <8 x i32><br>
>> >>>> +%[[I3]], i32 %tmp27, i32 4 ; GATHER: %[[I5:.+]] = insertelement <8<br>
>> >>>> +x<br>
>> >>>> +i32> %[[I4]], i32 %tmp29, i32 5 ; GATHER: %[[I6:.+]] =<br>
>> >>>> +i32> insertelement<br>
>> >>>> +<8 x i32> %[[I5]], i32 %tmp31, i32 6 ; GATHER: %[[I7:.+]] =<br>
>> >>>> +insertelement <8 x i32> %[[I6]], i32 %tmp33, i32 7 ; GATHER:<br>
>> >>>> +%[[R0:.+]] = shufflevector <8 x i32> %[[I7]], <8 x i32> undef,<br>
>> >>>> <8 x i32> <i32 4, i32 5, i32 6, i32 7, i32 undef, i32 undef, i32<br>
>> >>>> undef, i32<br>
>> >>>> undef><br>
>> >>>> +; GATHER: %[[R1:.+]] = add <8 x i32> %[[I7]], %[[R0]] ; GATHER:<br>
>> >>>> +%[[R2:.+]] = shufflevector <8 x i32> %[[R1]], <8 x i32> undef,<br>
>> >>>> <8 x i32> <i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef,<br>
>> >>>> i32 undef, i32 undef><br>
>> >>>> +; GATHER: %[[R3:.+]] = add <8 x i32> %[[R1]], %[[R2]] ; GATHER:<br>
>> >>>> +%[[R4:.+]] = shufflevector <8 x i32> %[[R3]], <8 x i32> undef,<br>
>> >>>> <8 x i32> <i32 1, i32 undef, i32 undef, i32 undef, i32 undef, i32<br>
>> >>>> undef, i32 undef, i32 undef><br>
>> >>>> +; GATHER: %[[R5:.+]] = add <8 x i32> %[[R3]], %[[R4]] ; GATHER:<br>
>> >>>> +%[[R6:.+]] = extractelement <8 x i32> %[[R5]], i32 0 ; GATHER:<br>
>> >>>> +%tmp34 = add i32 %[[R6]], %tmp17<br>
>> >>>> +<br>
>> >>>> +define void @PR28330(i32 %n) {<br>
>> >>>> +entry:<br>
>> >>>> +  %tmp0 = load i8, i8* getelementptr inbounds ([80 x i8], [80 x<br>
>> >>>> +i8]* @a,<br>
>> >>>> i64 0, i64 1), align 1<br>
>> >>>> +  %tmp1 = icmp eq i8 %tmp0, 0<br>
>> >>>> +  %tmp2 = load i8, i8* getelementptr inbounds ([80 x i8], [80 x<br>
>> >>>> + i8]* @a,<br>
>> >>>> i64 0, i64 2), align 2<br>
>> >>>> +  %tmp3 = icmp eq i8 %tmp2, 0<br>
>> >>>> +  %tmp4 = load i8, i8* getelementptr inbounds ([80 x i8], [80 x<br>
>> >>>> + i8]* @a,<br>
>> >>>> i64 0, i64 3), align 1<br>
>> >>>> +  %tmp5 = icmp eq i8 %tmp4, 0<br>
>> >>>> +  %tmp6 = load i8, i8* getelementptr inbounds ([80 x i8], [80 x<br>
>> >>>> + i8]* @a,<br>
>> >>>> i64 0, i64 4), align 4<br>
>> >>>> +  %tmp7 = icmp eq i8 %tmp6, 0<br>
>> >>>> +  %tmp8 = load i8, i8* getelementptr inbounds ([80 x i8], [80 x<br>
>> >>>> + i8]* @a,<br>
>> >>>> i64 0, i64 5), align 1<br>
>> >>>> +  %tmp9 = icmp eq i8 %tmp8, 0<br>
>> >>>> +  %tmp10 = load i8, i8* getelementptr inbounds ([80 x i8], [80 x<br>
>> >>>> + i8]* @a,<br>
>> >>>> i64 0, i64 6), align 2<br>
>> >>>> +  %tmp11 = icmp eq i8 %tmp10, 0<br>
>> >>>> +  %tmp12 = load i8, i8* getelementptr inbounds ([80 x i8], [80 x<br>
>> >>>> + i8]* @a,<br>
>> >>>> i64 0, i64 7), align 1<br>
>> >>>> +  %tmp13 = icmp eq i8 %tmp12, 0<br>
>> >>>> +  %tmp14 = load i8, i8* getelementptr inbounds ([80 x i8], [80 x<br>
>> >>>> + i8]* @a,<br>
>> >>>> i64 0, i64 8), align 8<br>
>> >>>> +  %tmp15 = icmp eq i8 %tmp14, 0<br>
>> >>>> +  br label %for.body<br>
>> >>>> +<br>
>> >>>> +for.body:<br>
>> >>>> +  %tmp17 = phi i32 [ %tmp34, %for.body ], [ 0, %entry ]<br>
>> >>>> +  %tmp18 = phi i32 [ %tmp35, %for.body ], [ %n, %entry ]<br>
>> >>>> +  %tmp19 = select i1 %tmp1, i32 -720, i32 -80<br>
>> >>>> +  %tmp20 = add i32 %tmp17, %tmp19<br>
>> >>>> +  %tmp21 = select i1 %tmp3, i32 -720, i32 -80<br>
>> >>>> +  %tmp22 = add i32 %tmp20, %tmp21<br>
>> >>>> +  %tmp23 = select i1 %tmp5, i32 -720, i32 -80<br>
>> >>>> +  %tmp24 = add i32 %tmp22, %tmp23<br>
>> >>>> +  %tmp25 = select i1 %tmp7, i32 -720, i32 -80<br>
>> >>>> +  %tmp26 = add i32 %tmp24, %tmp25<br>
>> >>>> +  %tmp27 = select i1 %tmp9, i32 -720, i32 -80<br>
>> >>>> +  %tmp28 = add i32 %tmp26, %tmp27<br>
>> >>>> +  %tmp29 = select i1 %tmp11, i32 -720, i32 -80<br>
>> >>>> +  %tmp30 = add i32 %tmp28, %tmp29<br>
>> >>>> +  %tmp31 = select i1 %tmp13, i32 -720, i32 -80<br>
>> >>>> +  %tmp32 = add i32 %tmp30, %tmp31<br>
>> >>>> +  %tmp33 = select i1 %tmp15, i32 -720, i32 -80<br>
>> >>>> +  %tmp34 = add i32 %tmp32, %tmp33<br>
>> >>>> +  %tmp35 = add nsw i32 %tmp18, -1<br>
>> >>>> +  %tmp36 = icmp eq i32 %tmp35, 0<br>
>> >>>> +  br i1 %tmp36, label %for.end, label %for.body<br>
>> >>>> +<br>
>> >>>> +for.end:<br>
>> >>>> +  ret void<br>
>> >>>> +}<br>
>> >>>><br>
>> >>>><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>
>> >>>><br>
>> >>>><br>
>> >>>><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>
>> >>>><br>
>> >>>><br>
>> >>>><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>
>> >>>><br>
>> >>>><br>
>> >>>><br>
>> >>><br>
>> >>><br>
>> >><br>
>> ><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>
><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>
</div></div></blockquote></div><br></div>