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

Michael Zolotukhin mzolotukhin at apple.com
Wed Jun 17 17:49:33 PDT 2015


Thanks for addressing my comments.

Am I getting it right, that in the test we want to be able to tell that the following two gep-expressions result in the same address?

  %arrayidx16 = getelementptr inbounds %struct.B, %struct.B* %add.ptr, i64 %idxprom15
  %ival = getelementptr inbounds %struct.B, %struct.B* %arrayidx16, i32 0, i32 0

If that's so, can't we just use SCEV for checking it? It would be more general, than checking for all operands being 0 etc.


REPOSITORY
  rL LLVM

================
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 }
----------------
This looks unused.

================
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
+
----------------
This looks unused.

http://reviews.llvm.org/D10281

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






More information about the llvm-commits mailing list