summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Stellard <tstellar@redhat.com>2017-05-23 17:30:58 +0000
committerTom Stellard <tstellar@redhat.com>2017-05-23 17:30:58 +0000
commitfba307477fa4acb9218bcf44e759831a3f2ba0dd (patch)
treecb947174ef6494a15675907298ae2716de5906e1
parentbaeb745dde25b135d7a94dec2e5b05f76086bdf1 (diff)
Merging r302137:
------------------------------------------------------------------------ r302137 | mstorsjo | 2017-05-04 06:54:35 -0400 (Thu, 04 May 2017) | 9 lines [ArgPromotion] Fix a truncated variable This fixes a regression since SVN rev 273808 (which was supposed to not change functionality). The regression caused miscompilations (noted in the wild when targeting AArch64) on platforms with 32 bit long. Differential Revision: https://reviews.llvm.org/D32850 ------------------------------------------------------------------------ llvm-svn: 303661
-rw-r--r--llvm/lib/Transforms/IPO/ArgumentPromotion.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
index 65b7bad3b1ed..fdb76f881602 100644
--- a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
+++ b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
@@ -826,7 +826,7 @@ DoPromotion(Function *F, SmallPtrSetImpl<Argument *> &ArgsToPromote,
if (!ArgIndex.second.empty()) {
Ops.reserve(ArgIndex.second.size());
Type *ElTy = V->getType();
- for (unsigned long II : ArgIndex.second) {
+ for (auto II : ArgIndex.second) {
// Use i32 to index structs, and i64 for others (pointers/arrays).
// This satisfies GEP constraints.
Type *IdxTy = (ElTy->isStructTy() ?