[PATCH] D20077: [Inliner] don't assume that a Constant alloca size is a ConstantInt (PR27277)
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Mon May 9 13:45:07 PDT 2016
majnemer added a subscriber: majnemer.
================
Comment at: lib/Analysis/InlineCost.cpp:335
@@ +334,3 @@
+ Constant *Size = SimplifiedValues.lookup(I.getArraySize());
+ if (Size && !isa<UndefValue>(Size)) {
+ assert(isa<ConstantInt>(Size) && "Allocation size not a constant int?");
----------------
This is wrong. This could will crash if it is a `ConstantExpr`.
http://reviews.llvm.org/D20077
More information about the llvm-commits
mailing list