[PATCH] [LoopAccesses] Modify test to also check symbolic strides with memchecks

Adam Nemet anemet at apple.com
Mon Feb 16 14:20:04 PST 2015


Hi hfinkel, aschwaighofer, nadav,

See the comment in the code.

This is part of the patchset that converts LoopAccessAnalysis into an
actual analysis pass.

http://reviews.llvm.org/D7685

Files:
  test/Transforms/LoopVectorize/version-mem-access.ll

Index: test/Transforms/LoopVectorize/version-mem-access.ll
===================================================================
--- test/Transforms/LoopVectorize/version-mem-access.ll
+++ test/Transforms/LoopVectorize/version-mem-access.ll
@@ -2,10 +2,16 @@
 
 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
 
+; Check that we version this loop with speculating the value 1 for symbolic
+; strides.  This also checks that the symbolic stride information is correctly
+; propagated to the memcheck generation.  Without this the loop wouldn't
+; vectorize because we couldn't determine the array bounds for the required
+; memchecks.
+
 ; CHECK-LABEL: test
-define void @test(i32* noalias %A, i64 %AStride,
-                  i32* noalias %B, i32 %BStride,
-                  i32* noalias %C, i64 %CStride, i32 %N) {
+define void @test(i32*  %A, i64 %AStride,
+                  i32*  %B, i32 %BStride,
+                  i32*  %C, i64 %CStride, i32 %N) {
 entry:
   %cmp13 = icmp eq i32 %N, 0
   br i1 %cmp13, label %for.end, label %for.body.preheader

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7685.20054.patch
Type: text/x-patch
Size: 1063 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150216/93c2922f/attachment.bin>


More information about the llvm-commits mailing list