diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-02 12:46:23 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-02 12:46:23 +0000 |
commit | edad5bcb76bf472a1487c0f3dd94a5914213a647 (patch) | |
tree | 63c3f98843d0debbfd390005cf8e05250cd3fe28 /lib/IR/ConstantFold.cpp | |
parent | 0bc1bd0d3931803dc6a26d35758f93527359bcdb (diff) |
Notes
Diffstat (limited to 'lib/IR/ConstantFold.cpp')
-rw-r--r-- | lib/IR/ConstantFold.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/IR/ConstantFold.cpp b/lib/IR/ConstantFold.cpp index 311b0a76ce8a..996331e68e83 100644 --- a/lib/IR/ConstantFold.cpp +++ b/lib/IR/ConstantFold.cpp @@ -2199,6 +2199,9 @@ Constant *llvm::ConstantFoldGetElementPtr(Type *PointeeTy, Constant *C, Unknown = true; continue; } + if (!isa<ConstantInt>(Idxs[i - 1])) + // FIXME: add the support of cosntant vector index. + continue; if (InRangeIndex && i == *InRangeIndex + 1) { // If an index is marked inrange, we cannot apply this canonicalization to // the following index, as that will cause the inrange index to point to |