Author: tstellar Date: Tue May 23 12:30:58 2017 New Revision: 303661 URL: http://llvm.org/viewvc/llvm-project?rev=303661&view=rev Log: 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 ------------------------------------------------------------------------ Modified: llvm/branches/release_40/lib/Transforms/IPO/ArgumentPromotion.cpp Modified: llvm/branches/release_40/lib/Transforms/IPO/ArgumentPromotion.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_40/lib/Transforms/IPO/ArgumentPromotion.cpp?rev=303661&r1=303660&r2=303661&view=diff ============================================================================== --- llvm/branches/release_40/lib/Transforms/IPO/ArgumentPromotion.cpp (original) +++ llvm/branches/release_40/lib/Transforms/IPO/ArgumentPromotion.cpp Tue May 23 12:30:58 2017 @@ -826,7 +826,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 = (ElTy->isStructTy() ? _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits