diff options
author | Martin Storsjo <martin@martin.st> | 2017-05-04 10:54:35 +0000 |
---|---|---|
committer | Martin Storsjo <martin@martin.st> | 2017-05-04 10:54:35 +0000 |
commit | e81233d0edf0b1313a6cc219ff6d4a506dadd66b (patch) | |
tree | 4c83ccab3401da731290a8125d43d832b2b0d95d | |
parent | 9e2fea198c8ca45e1c1613797b0cb25d6f2742d7 (diff) | |
download | bcm5719-llvm-e81233d0edf0b1313a6cc219ff6d4a506dadd66b.tar.gz bcm5719-llvm-e81233d0edf0b1313a6cc219ff6d4a506dadd66b.zip |
[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: 302137
-rw-r--r-- | llvm/lib/Transforms/IPO/ArgumentPromotion.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp index 6408cad08d5..d8cf8d3f5da 100644 --- a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp +++ b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp @@ -247,7 +247,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 = |