[PATCH] D17873: [InstCombine] (icmp sgt smin(PosA, B) 0) -> (icmp sgt B 0)
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 3 18:17:03 PST 2016
reames added inline comments.
================
Comment at: lib/Transforms/InstCombine/InstCombineCompares.cpp:3183
@@ +3182,3 @@
+ case SPF_SMIN:
+ if (isKnownNonNegative(A, DL))
+ return new ICmpInst(I.getPredicate(), B, CI);
----------------
sanjoy wrote:
> I think this needs to be `isKnownPositive`, since `(sgt (smin 0 1) 0)` == `false` but `(sgt 1 0)` == `true`.
You are correct.
http://reviews.llvm.org/D17873
More information about the llvm-commits
mailing list