[PATCH] D11918: Constant propagation after hiting assume(icmp)

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 10 15:50:10 PDT 2015


Not just that.
llvm.assume asserts whatever the condition is, is true.
PropagateEquality will propagate equalities like (A < B) == true as
well, by replacing all dominated instances of A>= B == false.

So you should be able to "propagate" basically all the ICMP variants.


On Mon, Aug 10, 2015 at 3:43 PM, Piotr Padlewski <prazek at google.com> wrote:
> Prazek marked an inline comment as done.
>
> ================
> Comment at: lib/Transforms/Scalar/GVN.cpp:2231
> @@ +2230,3 @@
> +      if (ICmpInst *ICmpI = dyn_cast<ICmpInst>(V)) {
> +        if (ICmpI->getSignedPredicate() == ICmpInst::Predicate::ICMP_EQ) {
> +
> ----------------
> dberlin wrote:
>> Why only ICMP_EQ?
> You mean to add fcmp also?
>
>
> http://reviews.llvm.org/D11918
>
>
>


More information about the llvm-commits mailing list