[PATCH] D13886: Loop Vectorizer - skiping "bitcast" allows to vectorize more loops

NAKAMURA Takumi via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 27 09:17:04 PDT 2015


chapuni added a subscriber: chapuni.
chapuni added a comment.

Seems this caused miscompilation for lib/ExecutionEngine/Interpreter/Execution.cpp
Investigating.


================
Comment at: ../lib/Transforms/Vectorize/LoopVectorize.cpp:262
@@ +261,3 @@
+  if (isa<GetElementPtrInst>(Ptr))
+    return cast<GetElementPtrInst>(Ptr);
+
----------------
```
if (auto GEP = dyn_cast<GetElementPtrInst>(Ptr)) return GEP;
```

================
Comment at: ../lib/Transforms/Vectorize/LoopVectorize.cpp:266
@@ +265,3 @@
+      isa<GetElementPtrInst>(cast<BitCastInst>(Ptr)->getOperand(0)))
+    return cast<GetElementPtrInst>(cast<BitCastInst>(Ptr)->getOperand(0));
+  return nullptr;
----------------
```
if (auto BC = dyn_cast<BCI>(Ptr)) if (auto GEP = dyn_cast<GEP>(BC->getOperand(0))) return GEP;
```


Repository:
  rL LLVM

http://reviews.llvm.org/D13886





More information about the llvm-commits mailing list