[PATCH] D20663: [ConstantFold] Fix incorrect index rewrites for GEPs
Adam Nemet via llvm-commits
llvm-commits at lists.llvm.org
Thu May 26 00:13:31 PDT 2016
anemet added inline comments.
================
Comment at: lib/IR/ConstantFold.cpp:2196-2197
@@ -2195,4 +2195,4 @@
if (ConstantInt *CI = dyn_cast<ConstantInt>(Idxs[i])) {
- if (isa<ArrayType>(Ty) || isa<VectorType>(Ty))
+ if (isa<ArrayType>(Ty))
if (CI->getSExtValue() > 0 &&
!isIndexInRangeOfSequentialType(cast<SequentialType>(Ty), CI)) {
----------------
majnemer wrote:
> These conditions can now be merged.
Thanks! I'll do this in a separate commit because clang-format creates a big churn.
http://reviews.llvm.org/D20663
More information about the llvm-commits
mailing list