[PATCH] Use Store Size not Alloc Size when Coercing

James Molloy james.molloy at arm.com
Thu Aug 28 02:01:13 PDT 2014


Hi Thomas,

This generally looks good to me with one change.

Cheers,

James

================
Comment at: lib/CodeGen/CGCall.cpp:647
@@ -646,2 +646,3 @@
   // If the first elt is at least as large as what we're looking for, or if the
-  // first element is the same size as the whole struct, we can enter it.
+  // first element is the same size as the whole struct, we can enter it. Use
+  // the store size and not the alloca size here to ensure we will actually load
----------------
This comment is confusing. "Use the store size and not the alloca size here to ensure we will actually load the whole object" - But the alloca size is always greater than or equal to the store size. So the comment seems wrong - if we use the alloca size, we are also guaranteed to load the whole object.

Also please terminate sentences with a full-stop (.).

http://reviews.llvm.org/D5092






More information about the cfe-commits mailing list