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

hfinkel at anl.gov hfinkel at anl.gov
Mon Jun 22 16:20:26 PDT 2015


Please make sure to upload patches with full context.


REPOSITORY
  rL LLVM

================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:1562
@@ +1561,3 @@
+      const APInt &APStepVal = C->getValue()->getValue();
+      int64_t StepVal = APStepVal.getSExtValue();
+      int64_t ElemSize =
----------------
This can just be:

  int64_t StepVal = C->getValue()->getSExtValue();

================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:1567
@@ +1566,3 @@
+        return 1;
+      else if (StepVal == -ElemSize)
+        return -1;
----------------
Don't put an 'else' if the 'if' unconditionally returns.

http://llvm.org/docs/CodingStandards.html#don-t-use-else-after-a-return

http://reviews.llvm.org/D10281

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






More information about the llvm-commits mailing list