[PATCH] D55169: [ConstantFolding] Handle leading zero-length elements in load folding
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 10 15:41:34 PST 2018
efriedma added inline comments.
================
Comment at: lib/Analysis/ConstantFolding.cpp:352
// castable to implement the "load" semantic model.
- C = C->getAggregateElement(0u);
+ unsigned Elem = 0;
+ Constant *ElemC;
----------------
This is probably an infinite loop on something like `[4294967296 x [0 x i32]]`. (An LLVM array can have up to 2^64 elements.) Not sure how much we care... it looks like there are overflows like this all over the place in LLVM.
Otherwise looks fine.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55169/new/
https://reviews.llvm.org/D55169
More information about the llvm-commits
mailing list