[all-commits] [llvm/llvm-project] cf1d9f: [InstSimplify] Fold icmp with dominating assume

Nikita Popov via All-commits all-commits at lists.llvm.org
Fri Jul 3 09:55:15 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: cf1d9f9f49ae62ab4c7bb685d786a8daa7bc1d4a
      https://github.com/llvm/llvm-project/commit/cf1d9f9f49ae62ab4c7bb685d786a8daa7bc1d4a
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2020-07-03 (Fri, 03 Jul 2020)

  Changed paths:
    M llvm/lib/Analysis/InstructionSimplify.cpp
    M llvm/test/Transforms/InstSimplify/assume_icmp.ll

  Log Message:
  -----------
  [InstSimplify] Fold icmp with dominating assume

If we assume(x > y), then we should be able to fold the basic
implications of that, like x >= y. This already happens if either
one of the operands is constant (LVI) or if the conditions are
exactly the same (GVN), but not if we have an implication with
non-constant operands. Support this by querying AssumptionCache.

Fixes https://bugs.llvm.org/show_bug.cgi?id=40149.

Differential Revision: https://reviews.llvm.org/D82717




More information about the All-commits mailing list