[PATCH] CVP: Improve handling of Selects used as incoming PHI values
Björn Steinbrink
bsteinbr at gmail.com
Wed Apr 29 11:23:25 PDT 2015
================
Comment at: lib/Transforms/Scalar/CorrelatedValuePropagation.cpp:118
@@ +117,3 @@
+ ConstantInt::getTrue(Condition->getType()),
+ P->getIncomingBlock(i), BB, P)) {
+ case LazyValueInfo::True:
----------------
reames wrote:
> I wonder whether a wrapper function on LVI which just take an ICmpInst would be more clear here. The comparison of against true is slightly opaque at first.
Actually, I can just use `getConstantOnEdge`, which is easier to read and better at handling the vector types. Not sure what made me think that I could not use that. With the predicate approach, the `false` case matches all vectors except for the one with all ones, which is why I had excluded the vector types. I'm currently struggling at coming up with a test for the vector types though.
http://reviews.llvm.org/D9051
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list