[PATCH] Update InstCombine to transform aggregate loads into scalar loads.
Amaury SECHET
deadalnix+llvmreview at gmail.com
Sun Apr 5 16:21:25 PDT 2015
================
Comment at: lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp:317
@@ -320,1 +316,3 @@
+static LoadInst *combineLoadToNewValue(InstCombiner &IC, LoadInst &LI, Value *V,
+ Type *NewTy, const Twine& Suffix = "") {
SmallVector<std::pair<unsigned, MDNode *>, 8> MD;
----------------
joker.eph wrote:
> Is there an invariant between V and NewTy here?
> Should we add:
>
> ```
> assert((V->getType() == NewTy->getPointerTo(LI.getPointerAddressSpace())) && "V type mismatches NewTy");
> ```
No, but they should be the same size. Adding this invariant.
http://reviews.llvm.org/D8339
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list