[llvm] r302137 - [ArgPromotion] Fix a truncated variable
Martin Storsjo via llvm-commits
llvm-commits at lists.llvm.org
Thu May 4 03:54:37 PDT 2017
Author: mstorsjo
Date: Thu May 4 05:54:35 2017
New Revision: 302137
URL: http://llvm.org/viewvc/llvm-project?rev=302137&view=rev
Log:
[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
Modified:
llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp
Modified: llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp?rev=302137&r1=302136&r2=302137&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp Thu May 4 05:54:35 2017
@@ -247,7 +247,7 @@ doPromotion(Function *F, SmallPtrSetImpl
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 =
More information about the llvm-commits
mailing list