Page MenuHomePhabricator

Ayal (Ayal Zaks)
User

Projects

User does not belong to any projects.

User Details

User Since
Jul 12 2015, 1:48 PM (280 w, 4 d)

Recent Activity

Tue, Nov 24

Ayal committed rG32d9a386bf8f: [LV] Keep Primary Induction alive when folding tail by masking (authored by Ayal).
[LV] Keep Primary Induction alive when folding tail by masking
Tue, Nov 24, 5:37 AM
Ayal closed D92017: [LV] Keep Primary Induction alive when folding tail by masking.
Tue, Nov 24, 5:37 AM · Restricted Project
Ayal added a comment to D66720: [LV] Fold tail by masking - handle reductions.

@Ayal Hi.
Found a problem caused by these changes.
Take a look, please. I posted about it here https://bugs.llvm.org/show_bug.cgi?id=47390

I attach the file here too, after the bug point:

Run like this:
opt -passes=loop-vectorize 'reduced-simplified.ll' -S

Could you take a look?
Thanks in advance.

Tue, Nov 24, 5:07 AM · Restricted Project
Ayal requested review of D92017: [LV] Keep Primary Induction alive when folding tail by masking.
Tue, Nov 24, 2:52 AM · Restricted Project

Sun, Nov 15

Ayal accepted D90558: [VPlan] Add VPDef class..

This looks good to me, thanks!

Sun, Nov 15, 9:08 AM · Restricted Project
Ayal added inline comments to D90558: [VPlan] Add VPDef class..
Sun, Nov 15, 12:45 AM · Restricted Project

Sat, Nov 14

Ayal added inline comments to D90558: [VPlan] Add VPDef class..
Sat, Nov 14, 2:28 PM · Restricted Project

Fri, Nov 13

Ayal added a comment to D88380: [VPlan] Extend VPValue to also model sub- & 'virtual' values..

OK sounds great. I did not know that MLIR could represent multiple values, that's good to see.

I still like honestly like a more "llvm" Value/User model more, but perhaps as I read the patches I will learn to like Defs too.

Fri, Nov 13, 5:33 AM · Restricted Project
Ayal added a comment to D90558: [VPlan] Add VPDef class..

Looks good to me, adding minor comments, thanks for pushing this forward!

Fri, Nov 13, 12:34 AM · Restricted Project

Thu, Nov 12

Ayal added a comment to D88380: [VPlan] Extend VPValue to also model sub- & 'virtual' values..

Extending the recipe abstraction to support def/use relations is an important next step forward for VPlan, thanks for pushing this momentum forward!

Thu, Nov 12, 3:44 PM · Restricted Project

Oct 12 2020

Ayal added inline comments to D87679: [LV] Unroll factor is expected to be > 0.
Oct 12 2020, 5:55 AM · Restricted Project

Oct 9 2020

Ayal added inline comments to D87679: [LV] Unroll factor is expected to be > 0.
Oct 9 2020, 2:40 PM · Restricted Project

Sep 27 2020

Ayal added inline comments to D87679: [LV] Unroll factor is expected to be > 0.
Sep 27 2020, 6:00 AM · Restricted Project

Sep 22 2020

Ayal accepted D84679: [VPlan] Disconnect VPValue and VPUser..

This looks good to me, thanks!

Sep 22 2020, 3:35 PM · Restricted Project

Sep 21 2020

Ayal added a comment to D84679: [VPlan] Disconnect VPValue and VPUser..

This looks good to me, as part of the effort to support VPlan def-use modeling and traversals.
Note that top-down traversal from VPValue to its VPUsers, will now need to check if each VPUser isa single-def recipe/VPInstruction in order to continue downwards to its VPUsers, etc., facilitating multi-def recipes.

Sep 21 2020, 8:52 AM · Restricted Project

Jul 12 2020

Ayal added a comment to D83470: [LV] Fix versioning-for-unit-stide of loops with small trip count.

LGTM, thanks!

In such cases, the loop vectorizer should either re-run the analysis or bail-out from vectorizing the loop, as done prior to D81345. The latter is chosen for now as the former requires refactoring.

As already discussed in D81345, ideally LV would have more flexibility to drive LAA, but this requires non-trivial refactoring. Which we should do, but until then the patch looks like a reasonable fix to the crash.

Jul 12 2020, 10:48 AM · Restricted Project
Ayal committed rG82a5157ff165: [LV] Fixing versioning-for-unit-stide of loops with small trip count (authored by Ayal).
[LV] Fixing versioning-for-unit-stide of loops with small trip count
Jul 12 2020, 10:42 AM
Ayal closed D83470: [LV] Fix versioning-for-unit-stide of loops with small trip count.
Jul 12 2020, 10:42 AM · Restricted Project
Ayal added a comment to D83288: [LV] Pick vector loop body as insert point for SCEV expansion..

Good catch!

Jul 12 2020, 7:58 AM · Restricted Project
Ayal accepted D75069: [LoopVectorizer] Inloop vector reductions.

This looks good to me, thanks! with last couple of nits.

Jul 12 2020, 7:35 AM · Restricted Project

Jul 9 2020

Herald added a project to D83470: [LV] Fix versioning-for-unit-stide of loops with small trip count: Restricted Project.
Jul 9 2020, 3:29 AM · Restricted Project

Jul 7 2020

Ayal added inline comments to D75069: [LoopVectorizer] Inloop vector reductions.
Jul 7 2020, 3:05 PM · Restricted Project
Ayal added inline comments to D75069: [LoopVectorizer] Inloop vector reductions.
Jul 7 2020, 12:33 PM · Restricted Project
Ayal added a comment to D81416: [LV] Interleave to expose ILP for small loops with scalar reductions..

In the application we try, LV refuse to vectorize due to not profitable, but if we force LV to vectorize and it will crash. Apparently there are some obstacles. There are cases that even if LV fails, SLP could succeed.

Jul 7 2020, 11:29 AM · Restricted Project, Restricted Project
Ayal added a comment to D81416: [LV] Interleave to expose ILP for small loops with scalar reductions..

IIUC, we should add a test under test/Transforms/PhaseOrdering with -O2 to show the cooperative effect of the 2 vectorizers rather than a stand-alone SLP test.
If you can push that test with full baseline CHECK lines and then apply this patch and show test diffs, that would make it much easier to tell what is intended with this patch.

Thanks for the comment. This patch does not intend to change or test phase ordering. In this patch, we interleave for small loops with scalar reductions which cannot be vectorized by LV, and later on SLP captures the opportunities. Interleaving is done by LV, and vectorization is done by SLP.

Jul 7 2020, 7:11 AM · Restricted Project, Restricted Project
Ayal added inline comments to D81345: [LV] Vectorize without versioning-for-unit-stride under -Os/-Oz.
Jul 7 2020, 5:10 AM · Restricted Project
Ayal committed rG7bf299c8d8d5: [LV] Vectorize without versioning-for-unit-stride under -Os/-Oz (authored by Ayal).
[LV] Vectorize without versioning-for-unit-stride under -Os/-Oz
Jul 7 2020, 5:05 AM
Ayal closed D81345: [LV] Vectorize without versioning-for-unit-stride under -Os/-Oz.
Jul 7 2020, 5:05 AM · Restricted Project

Jul 6 2020

Ayal added inline comments to D75069: [LoopVectorizer] Inloop vector reductions.
Jul 6 2020, 1:15 PM · Restricted Project

Jun 13 2020

Ayal added inline comments to D81345: [LV] Vectorize without versioning-for-unit-stride under -Os/-Oz.
Jun 13 2020, 11:26 PM · Restricted Project

Jun 7 2020

Ayal accepted D80446: [NFC][LV][TEST]: extend pr45679-fold-tail-by-masking.ll with a run of -force-vector-width=1 -force-vector-interleave=4.

Looks good to me, thanks for following-up on this suggestion from D79976.

Jun 7 2020, 1:19 PM · Restricted Project
Ayal created D81345: [LV] Vectorize without versioning-for-unit-stride under -Os/-Oz.
Jun 7 2020, 9:34 AM · Restricted Project

Jun 5 2020

Ayal added a comment to D75069: [LoopVectorizer] Inloop vector reductions.

The proposed RecurrenceDescriptor::getReductionOpChain() method identifies horizontal reductions, a subset of the vertical reductions identified by RecurrenceDescriptor::isReductionPHI(). Being two totally independent methods, it's unclear what the latter supports that the former does not. Would it be better to have isReductionPHI() also take care of recognizing horizontal reductions, and record them as in CastsToIgnore? See also TODO commented inline.

Jun 5 2020, 3:43 PM · Restricted Project

Jun 2 2020

Ayal added inline comments to D80787: [VPlan] Support extracting lanes for defs managed in VPTransformState..
Jun 2 2020, 12:05 PM · Restricted Project

Jun 1 2020

Ayal accepted D80870: [LV] Make sure smallest/widest type sizes are powers-of-2..

Thanks!

Jun 1 2020, 2:39 PM · Restricted Project
Ayal added a comment to D80870: [LV] Make sure smallest/widest type sizes are powers-of-2..

D80491 has been breaking our ToT builds for a week now. Can this be submitted soon. If not please consider reverting D80491.

Jun 1 2020, 1:33 PM · Restricted Project

May 30 2020

Ayal added a comment to D80870: [LV] Make sure smallest/widest type sizes are powers-of-2..

Alternatively we could force the computed max VF to the next-lowest power-of-2

May 30 2020, 2:18 PM · Restricted Project

May 26 2020

Ayal accepted D79969: [LAA] We only need pointer checks if there are non-zero checks (NFC)..

Looks good to me. Added a minor nit.

May 26 2020, 2:44 PM · Restricted Project

May 25 2020

Ayal committed rG840450549c91: [LV] Clamp MaxVF to power of 2. (authored by Ayal).
[LV] Clamp MaxVF to power of 2.
May 25 2020, 1:35 AM
Ayal closed D80491: [LV] Clamp MaxVF to power of 2.
May 25 2020, 1:34 AM · Restricted Project

May 24 2020

Ayal added inline comments to D80491: [LV] Clamp MaxVF to power of 2.
May 24 2020, 3:59 PM · Restricted Project
Ayal created D80491: [LV] Clamp MaxVF to power of 2.
May 24 2020, 9:36 AM · Restricted Project
Ayal added inline comments to D79783: [LV] Fallback strategies if tail-folding fails.
May 24 2020, 4:16 AM · Restricted Project
Ayal added inline comments to D80219: [VPlan] Use VPUser for VPWidenSelectRecipe operands (NFC)..
May 24 2020, 1:34 AM · Restricted Project

May 22 2020

Ayal added inline comments to D79976: [LV] Handle Fold-Tail of loops with vectorizarion factor (VF) equal to 1.
May 22 2020, 7:28 AM · Restricted Project

May 20 2020

Ayal added inline comments to D79783: [LV] Fallback strategies if tail-folding fails.
May 20 2020, 1:43 PM · Restricted Project
Ayal added a comment to D79783: [LV] Fallback strategies if tail-folding fails.
  • Addressed comments (see items marked as "done")
  • Changed "reportVectorizationFailure" calls in "prepareTailFoldingByMasking" into simple debug prints.

Would be good to also preserve the existing "force-vector-tail-folding" behavior of "fold or do not vectorize", in addition to introducing the new "prefer-vector-tail-folding" behavior.

What is your preferred solution for this? Here are some ideas:

  • Add a new command-line switch that acts like the old -prefer-predicate-over-epilog, something like -force-predicate-over-epilog
  • Add an additional switch to use with -prefer-predicate-over-epilog to disable the fallback behaviour, such as -disable-scalar-epilog-fallback
  • Keep the old -prefer-predicate-over-epilog behaviour and only fallback when TTI requested tail-folding
May 20 2020, 11:27 AM · Restricted Project
Ayal added a comment to D79976: [LV] Handle Fold-Tail of loops with vectorizarion factor (VF) equal to 1.

This looks good to me, thanks! Please wait a day or so if @fhahn has further comments.

As noted, it would now be good to also extend pr45679-fold-tail-by-masking.ll with an additional RUN of -force-vector-width=1 and -force-vector-interleave=4.

It is very kind of you, Ayal @Ayal , and I thank you very much. As you have mentioned, I surely will wait a day or two to see whether Florian and Bardia might have further comments.
About pr45679-fold-tail-by-masking.ll, do you want me to add it for completeness?
With VF=1, the testcase does not go through the code changed by this patch (b/c its BackedgeTakenCount is null).

Oh, I think I know what you meant now: adding the test pr45679-fold-tail-by-masking.ll AFTER applying your patch https://reviews.llvm.org/D80085. I will do.

May 20 2020, 3:45 AM · Restricted Project

May 19 2020

Ayal added a comment to D75069: [LoopVectorizer] Inloop vector reductions.

Ping. Anyone have any thought/comments about this one? Does it at least look like its going in the right direction, or does anyone have some better suggestions?

May 19 2020, 4:34 PM · Restricted Project
Ayal accepted D79976: [LV] Handle Fold-Tail of loops with vectorizarion factor (VF) equal to 1.

This looks good to me, thanks! Please wait a day or so if @fhahn has further comments.

May 19 2020, 2:18 PM · Restricted Project
Ayal added a comment to D80085: [LV] Fix FoldTail under user VF and UF.

LGTM, thanks! It could be beneficial to move the UserVF handling directly to computeFeasibleMaxVF (see inline comment), but either approach should be fine!

May 19 2020, 10:22 AM · Restricted Project
Ayal added a comment to D80110: [VPlan] Remove unique_ptr from VPBranchOnRecipeMask (NFC)..

Perhaps clearer to introduce getMask() as in other recipes, and check if it returns null?

Thanks Ayal, I've added & used a getMask() method in the committed version!

May 19 2020, 9:49 AM · Restricted Project
Ayal added a comment to D79783: [LV] Fallback strategies if tail-folding fails.
  • Changing implementation of the patch following discussion
  • Removed the ReportFailure argument of prepareToFoldTailByMasking. I don't think it's useful anymore, but feedback is welcome. (The only thing that annoys me is that we now print "loop not vectorized" even when we'll fallback to a scalar epilogue)
May 19 2020, 3:45 AM · Restricted Project

May 18 2020

Ayal committed rG682e739638a9: [LV] Fix FoldTail under user VF and UF (authored by Ayal).
[LV] Fix FoldTail under user VF and UF
May 18 2020, 4:17 PM
Ayal closed D80085: [LV] Fix FoldTail under user VF and UF.
May 18 2020, 4:17 PM · Restricted Project
Ayal added inline comments to D79783: [LV] Fallback strategies if tail-folding fails.
May 18 2020, 1:33 PM · Restricted Project
Ayal accepted D80110: [VPlan] Remove unique_ptr from VPBranchOnRecipeMask (NFC)..

Perhaps clearer to introduce getMask() as in other recipes, and check if it returns null?

May 18 2020, 3:42 AM · Restricted Project

May 17 2020

Ayal added inline comments to D79783: [LV] Fallback strategies if tail-folding fails.
May 17 2020, 11:43 AM · Restricted Project
Ayal added inline comments to D79976: [LV] Handle Fold-Tail of loops with vectorizarion factor (VF) equal to 1.
May 17 2020, 9:02 AM · Restricted Project
Ayal created D80085: [LV] Fix FoldTail under user VF and UF.
May 17 2020, 9:02 AM · Restricted Project

May 15 2020

Ayal added inline comments to D79976: [LV] Handle Fold-Tail of loops with vectorizarion factor (VF) equal to 1.
May 15 2020, 2:09 PM · Restricted Project
Ayal added a comment to D79976: [LV] Handle Fold-Tail of loops with vectorizarion factor (VF) equal to 1.

Thanks for taking care of this, only a couple of nits.

May 15 2020, 12:52 AM · Restricted Project

May 13 2020

Ayal added a comment to D79783: [LV] Fallback strategies if tail-folding fails.

There are indeed loops which can be vectorized only with a scalar remainder loop, i.e., w/o foldTail. But the tests attached could easily be made an exception: LV handles induction variables that are live-out by pre-computing their values in the pre-header. So foldTail should work fine in their presence, provided the live-out value is computed using the original trip-count rather than the one foldTail rounds up.

May 13 2020, 1:36 PM · Restricted Project

May 12 2020

Ayal added a comment to D78847: [LV] Fix recording of BranchTakenCount for FoldTail.

[snip]

Right, VPWidenCanonicalIVRecipe::execute() also needs to treat VF==1 differently.

I looked at that, too. It still gives us the assert at a different location. We will need a little more work to do.

The above implies setting both VStart to CanonicalIV instead of splatting, and VStep to ConstantInt::set(STy, Part) instead of ConstantVector::get(Indices), when VF==1. Would doing so pass all your tests?

May 12 2020, 4:47 AM · Restricted Project

May 11 2020

Ayal added a comment to D78847: [LV] Fix recording of BranchTakenCount for FoldTail.

[snip]

Below is an example to demonstrate that setting VTCMO to TCMO when State->VF == 1 will not help in the case of a loop of VF 1 having a vector loop-bound.

[snip]

In this case, the operand[0] (which is %vec.iv) has type <1 x i64>. The loop-bound, however, will get the type as **i64** instead of the expected **<i64 2305843009213693951>** .
May 11 2020, 1:02 AM · Restricted Project

May 10 2020

Ayal added a comment to D78847: [LV] Fix recording of BranchTakenCount for FoldTail.

Hello,

[snip]

In this example, the operand[0] (%induction) correctly has type i64, but the loop bound (14) is of vector type <1 x i64>

There might be multiple ways to address this assert failure. I list below a few simple ones for your reference: they might or might not be a good solution at all.

  1. Option 1: Not to generate the icmp instructions for %induction. In the particular case of this testcase, these instructions seem to be redundant.
  2. Option 2: If we are to generate the icmp instructions above, can we set the BackedgeTakenCount to the State depending on the type of the first operand? In cases like this one when the first operand is not a vector type, using Value *TCMO instead of Value *VTCMO might be an option.

I will open a Bugzzila and copy its link to this page when my password reset goes through.

Thanks,
Anh

May 10 2020, 5:01 PM · Restricted Project

May 9 2020

Ayal accepted D78460: [LAA] Move runtime-check generation to Transforms/Utils/loopUtils (NFC).

This looks good to me, thanks!
Noting a minor nit.
Follow-ups could be noted in TODO's.

May 9 2020, 4:29 PM · Restricted Project
Ayal accepted D79679: [LAA] Remove one addRuntimeChecks function (NFC)..

Thanks for breaking this up!

May 9 2020, 3:57 PM · Restricted Project
Ayal added a comment to D78460: [LAA] Move runtime-check generation to Transforms/Utils/loopUtils (NFC).

This analysis/utils refactoring looks good to me, thanks! Just adding some nits to clarify some presumably "add-on" parts, and possible alternatives/follow-ups.

May 9 2020, 6:20 AM · Restricted Project

May 6 2020

Ayal accepted D78911: [LV] Induction Variable does not remain scalar under tail-folding..

Thanks for cleaning this up!
Just adding another follow-up.

May 6 2020, 1:00 PM · Restricted Project

May 5 2020

Ayal added a comment to D78911: [LV] Induction Variable does not remain scalar under tail-folding..

Thanks for following-up on this!

May 5 2020, 7:31 AM · Restricted Project

Apr 28 2020

Ayal accepted D78458: [LAA] Move CheckingPtrGroup/PointerCheck outside class (NFC)..
Apr 28 2020, 8:01 AM · Restricted Project

Apr 27 2020

Ayal added inline comments to D78458: [LAA] Move CheckingPtrGroup/PointerCheck outside class (NFC)..
Apr 27 2020, 4:11 PM · Restricted Project

Apr 26 2020

Ayal added a comment to D78458: [LAA] Move CheckingPtrGroup/PointerCheck outside class (NFC)..

Given that CheckingPtrGroup and PointerCheck are taken out of RuntimePointerChecking to become externally visible, would it make sense to rename them RuntimeCheckingPtrGroup and RuntimePointerCheck?

Apr 26 2020, 2:20 PM · Restricted Project
Ayal added inline comments to D76992: [VPlan] Add & use VPValue operands for VPWidenRecipe (NFC)..
Apr 26 2020, 11:09 AM · Restricted Project
Ayal committed rGa3c964a278b4: [LV] Fix recording of BranchTakenCount for FoldTail (authored by Ayal).
[LV] Fix recording of BranchTakenCount for FoldTail
Apr 26 2020, 10:37 AM
Ayal closed D78847: [LV] Fix recording of BranchTakenCount for FoldTail.
Apr 26 2020, 10:37 AM · Restricted Project
Ayal added a comment to D78847: [LV] Fix recording of BranchTakenCount for FoldTail.

LGTM, thanks!

I'll add a reduced version of the crashing case from D78847 when I recommit it.

Apr 26 2020, 9:01 AM · Restricted Project
Ayal updated the diff for D78847: [LV] Fix recording of BranchTakenCount for FoldTail.

Added test. Rebased.

Apr 26 2020, 9:01 AM · Restricted Project

Apr 25 2020

Ayal added inline comments to D78353: [LV] Don't emit the Vector IV if it is not used..
Apr 25 2020, 5:00 PM · Restricted Project

Apr 24 2020

Ayal created D78847: [LV] Fix recording of BranchTakenCount for FoldTail.
Apr 24 2020, 6:25 PM · Restricted Project

Apr 19 2020

Ayal accepted D78287: [VPlan] Clean up tryToCreate(Widen)Recipe. (NFC).

Thanks for following up on this! Looks good to me with a couple of nits.

Apr 19 2020, 4:15 AM · Restricted Project

Apr 18 2020

Ayal added a comment to D78210: [LV] Mark first-order recurrences as allowed exit.

I'm not sure how correct this fix is but I verified that it fixes my original problem.

Apr 18 2020, 3:38 PM · Restricted Project
Ayal committed rG8e0c5f720058: [LV] Mark first-order recurrences as allowed exits (authored by Ayal).
[LV] Mark first-order recurrences as allowed exits
Apr 18 2020, 2:01 PM
Ayal closed D78210: [LV] Mark first-order recurrences as allowed exit.
Apr 18 2020, 2:01 PM · Restricted Project
Ayal updated the diff for D78210: [LV] Mark first-order recurrences as allowed exit.

Addressed comment regarding test; rebased.

Apr 18 2020, 5:23 AM · Restricted Project
Ayal added inline comments to D78210: [LV] Mark first-order recurrences as allowed exit.
Apr 18 2020, 5:23 AM · Restricted Project
Ayal accepted D78420: [VectorUtils] Use early_inc_range instead of DelSet (NFC)..

Yes, that's indeed better, thanks!

Apr 18 2020, 4:18 AM · Restricted Project

Apr 17 2020

Ayal added inline comments to D78353: [LV] Don't emit the Vector IV if it is not used..
Apr 17 2020, 4:25 PM · Restricted Project
Ayal accepted D78298: [LV] Invalidate cost model decisions along with interleave groups..

This looks good to me, thanks!

Apr 17 2020, 11:53 AM · Restricted Project
Ayal added inline comments to D78298: [LV] Invalidate cost model decisions along with interleave groups..
Apr 17 2020, 8:37 AM · Restricted Project
Ayal added a comment to D78298: [LV] Invalidate cost model decisions along with interleave groups..

Sure, the updated summary's fine :-).

Apr 17 2020, 7:32 AM · Restricted Project

Apr 16 2020

Ayal added a comment to D78298: [LV] Invalidate cost model decisions along with interleave groups..

Clarifying the summary a bit:

Apr 16 2020, 10:01 AM · Restricted Project

Apr 15 2020

Ayal created D78210: [LV] Mark first-order recurrences as allowed exit.
Apr 15 2020, 8:11 AM · Restricted Project

Apr 14 2020

Ayal accepted D77972: [VPlan] Move Load/Store checks out of tryToWiden (NFC)..

Looks good to me, thanks!

Apr 14 2020, 2:04 PM · Restricted Project
Ayal added inline comments to D77973: [VPlan] Move widening check for non-memory/non-calls to function (NFC)..
Apr 14 2020, 12:24 PM · Restricted Project
Ayal added inline comments to D77973: [VPlan] Move widening check for non-memory/non-calls to function (NFC)..
Apr 14 2020, 7:59 AM · Restricted Project
Ayal added a comment to D77635: [LV] Vectorize with FoldTail when Primary Induction is absent.

Hello @Ayal, unfortunately this patch causes the functional regression.
For the test below, vectorizer decided to vectorize inner loop by 32 while it has only a couple of iteration and it causes a miscompile.
Please fix it quickly or revert the patch.

The reproducer:

; ModuleID = './repro.ll'
source_filename = "./repro.ll"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128-ni:1-p2:32:8:8:32-ni:2"
target triple = "x86_64-unknown-linux-gnu"

@global = external global i8*

define void @hoge(i8* nonnull align 8 dereferenceable_or_null(8) %arg, i8* align 8 dereferenceable_or_null(16) %arg1) {
bb:
  %tmp = load atomic i8*, i8** @global unordered, align 8
  %tmp2 = getelementptr inbounds i8, i8* %tmp, i64 852
  br label %bb3

bb3:                                              ; preds = %bb12, %bb
  %tmp4 = phi i32 [ 1, %bb ], [ %tmp15, %bb12 ]
  %tmp5 = phi i32 [ 0, %bb ], [ %tmp8, %bb12 ]
  br label %bb7

bb6:                                              ; preds = %bb12
  ret void

bb7:                                              ; preds = %bb7, %bb3
  %tmp8 = phi i32 [ %tmp5, %bb3 ], [ %tmp10, %bb7 ]
  %tmp9 = phi i32 [ 1, %bb3 ], [ %tmp10, %bb7 ]
  %tmp10 = add nuw nsw i32 %tmp9, 1
  %tmp11 = icmp ugt i32 %tmp9, 5
  br i1 %tmp11, label %bb12, label %bb7

bb12:                                             ; preds = %bb7
  %tmp13 = mul i32 %tmp8, %tmp4
  %tmp14 = trunc i32 %tmp13 to i8
  fence release
  store atomic i8 %tmp14, i8* %tmp2 unordered, align 1
  fence seq_cst
  %tmp15 = add nuw nsw i32 %tmp4, 1
  %tmp16 = icmp ult i32 %tmp4, 240
  br i1 %tmp16, label %bb3, label %bb6
}

ran as

> opt -passes=loop-vectorize -S -o res.ll ./repro.ll
Apr 14 2020, 2:04 AM · Restricted Project

Apr 13 2020

Ayal accepted D77973: [VPlan] Move widening check for non-memory/non-calls to function (NFC)..

Thanks for cleaning this up! Final couple of nits.

Apr 13 2020, 3:12 AM · Restricted Project

Apr 12 2020

Ayal added inline comments to D77869: [VPlan] Introduce VPWidenSelectRecipe (NFC)..
Apr 12 2020, 4:33 PM · Restricted Project