[PATCH] Extend LoopVectorizationLegality::isConsecutivePtr to handle multiple level GEPs

Wei Mi wmi at google.com
Wed Jun 17 23:57:49 PDT 2015


REPOSITORY
  rL LLVM

================
Comment at: test/Transforms/LoopVectorize/pr23580.ll:2
@@ +1,3 @@
+; PR23580
+; RUN: opt < %s -loop-rotate -loop-vectorize -instcombine -S | FileCheck %s
+
----------------
mzolotukhin wrote:
> Can we just run `-loop-rotate` manually on the test and use the output as the new test (we won't need to run `-loop-rotate` there)?
> And why do we need `-instcombine`? Could we just check vectorizer's output?
I fix it and use the IR after -loop-rotate. I keep -instcombine because it makes the generated IR a lot simpler and may be helpful for checking the output. 

================
Comment at: test/Transforms/LoopVectorize/pr23580.ll:7-8
@@ +6,4 @@
+
+%struct.anon = type { [0 x %class.C] }
+%class.C = type { i8 }
+%struct.B = type { i16 }
----------------
mzolotukhin wrote:
> This looks unused.
Fixed.

================
Comment at: test/Transforms/LoopVectorize/pr23580.ll:14
@@ +13,3 @@
+ at a = global i32 0, align 4
+ at d = internal global %struct.anon zeroinitializer, align 1
+
----------------
mzolotukhin wrote:
> This looks unused.
Fixed. Thanks for catching it.

http://reviews.llvm.org/D10281

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list