[PATCH] D14260: Optimize store of "bitcast" from vector to aggregate.
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 5 10:49:06 PDT 2016
majnemer added a comment.
It'd be nice to have tests that show that this does the right thing if we insertelement on the same index twice to make sure we get the correct element.
================
Comment at: lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp:896
@@ +895,3 @@
+/// Note that %U may contain non-undef values where %V1 has undef.
+static Value* likeBitCastFromVector(InstCombiner &IC, Value* V) {
+ Value *U = nullptr;
----------------
Pointers should lean right: `Value *V`.
================
Comment at: lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp:915
@@ +914,3 @@
+
+ VectorType *UT = cast<VectorType>(U->getType());
+ Type *VT = V->getType();
----------------
I'd use `auto *UT` here and do something similar bellow.
http://reviews.llvm.org/D14260
More information about the llvm-commits
mailing list