[PATCH] Update InstCombine to transform aggregate loads into scalar loads.

David Majnemer david.majnemer at gmail.com
Tue May 5 15:04:18 PDT 2015


================
Comment at: lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp:514-515
@@ +513,4 @@
+    if (ST->getNumElements() == 1) {
+      unsigned i = 0;
+      LoadInst *NewLoad = combineLoadToNewType(IC, LI, ST->getTypeAtIndex(i),
+                                               ".unpack");
----------------
deadalnix wrote:
> majnemer wrote:
> > Did you intend to use `i` for any particular purpose?  If not, please fold it into your call to `getTypeAtIndex`.
> Does not work. getTypeAtIndex has 2 overload, and passing 0 directly is ambiguous (in C++ 0 can also be a null pointer).
`getTypeAtIndex(0U)` should work.

http://reviews.llvm.org/D8339

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list