[PATCH] D32850: [ArgPromotion] Fix a truncated variable
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 4 02:12:29 PDT 2017
mstorsjo created this revision.
Herald added subscribers: rengolin, aemerson.
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.
https://reviews.llvm.org/D32850
Files:
lib/Transforms/IPO/ArgumentPromotion.cpp
Index: lib/Transforms/IPO/ArgumentPromotion.cpp
===================================================================
--- lib/Transforms/IPO/ArgumentPromotion.cpp
+++ lib/Transforms/IPO/ArgumentPromotion.cpp
@@ -247,7 +247,7 @@
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 =
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32850.97795.patch
Type: text/x-patch
Size: 623 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170504/7fe02683/attachment.bin>
More information about the llvm-commits
mailing list