[llvm] r285517 - [LoopVectorize] Make interleaved-accesses analysis less conservative about

Nuzman, Dorit via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 30 08:13:28 PDT 2016


My guess is that the problem is with the releaseGroup() which doesn't really remove the group; so the next loop that scans over the LoadGroups encounters a Group that had already been released (and tries to release it again).

I have a tentative fix (basically instead of having two separate scans over the LoadGroups, do all the LoadGroup checks inside a single scan over the Groups; see patch below), but I did not have time to test it yet (also I wasn't able to reproduce the failure on my platform yet...).

Thanks (and sorry!),
Dorit


Index: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
===================================================================
--- llvm/lib/Transforms/Vectorize/LoopVectorize.cpp     (revision 285517)
+++ llvm/lib/Transforms/Vectorize/LoopVectorize.cpp     (working copy)
@@ -5994,14 +5994,12 @@
         continue;
       }
     }
-  }

-  // If there is a non-reversed interleaved load group with gaps, we will need
-  // to execute at least one scalar epilogue iteration. This will ensure that
-  // we don't speculatively access memory out-of-bounds. Note that we only need
-  // to look for a member at index factor - 1, since every group must have a
-  // member at index zero.
-  for (InterleaveGroup *Group : LoadGroups)
+    // If there is a non-reversed interleaved load group with gaps, we will need
+    // to execute at least one scalar epilogue iteration. This will ensure that
+    // we don't speculatively access memory out-of-bounds. Note that we only need
+    // to look for a member at index factor - 1, since every group must have a
+    // member at index zero.
     if (!Group->getMember(Group->getFactor() - 1)) {
       if (Group->isReverse()) {
         releaseGroup(Group);
@@ -6010,6 +6008,7 @@
         RequiresScalarEpilogue = true;
       }
     }
+  }
 }

 LoopVectorizationCostModel::VectorizationFactor

-----Original Message-----
From: Renato Golin [mailto:renato.golin at linaro.org] 
Sent: Sunday, October 30, 2016 17:03
To: Nuzman, Dorit <dorit.nuzman at intel.com>
Cc: LLVM Commits <llvm-commits at lists.llvm.org>
Subject: Re: [llvm] r285517 - [LoopVectorize] Make interleaved-accesses analysis less conservative about

On 30 October 2016 at 15:01, Renato Golin <renato.golin at linaro.org> wrote:
> http://lab.llvm.org:8011/builders/clang-native-arm-lnt/builds/157
>
> Please revert while we investigate.

Ha, you're faster than me. :)

Let me know if you need help to investigate. I'll pull the logs as soon as I can.

cheers,
--renato
---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


More information about the llvm-commits mailing list