X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=lib%2FIR%2FConstantFold.cpp;h=131c5c51790414c6b1c81e27aaa3a1710c22d042;hp=5dd075a76905ca408ede83765f31480df0c07e03;hb=996ace13c0eca0ce1c21df9d7b84966416dd1c21;hpb=3f1c66ca7df09f54022f19f5233901dc049d5a0f diff --git a/lib/IR/ConstantFold.cpp b/lib/IR/ConstantFold.cpp index 5dd075a7690..131c5c51790 100644 --- a/lib/IR/ConstantFold.cpp +++ b/lib/IR/ConstantFold.cpp @@ -1999,9 +1999,8 @@ static bool isInBoundsIndices(ArrayRef Idxs) { /// \brief Test whether a given ConstantInt is in-range for a SequentialType. static bool isIndexInRangeOfSequentialType(SequentialType *STy, const ConstantInt *CI) { - if (auto *PTy = dyn_cast(STy)) - // Only handle pointers to sized types, not pointers to functions. - return PTy->getElementType()->isSized(); + if (isa(STy)) + return true; uint64_t NumElements = 0; // Determine the number of elements in our sequential type.