[all-commits] [llvm/llvm-project] bb12de: [InstCombine] Refactor and/or of icmp with constan...

Nikita Popov via All-commits all-commits at lists.llvm.org
Tue Nov 9 12:06:04 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bb12dededeb6558ddd352b40268692041e0fa02c
      https://github.com/llvm/llvm-project/commit/bb12dededeb6558ddd352b40268692041e0fa02c
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2021-11-09 (Tue, 09 Nov 2021)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp

  Log Message:
  -----------
  [InstCombine] Refactor and/or of icmp with constant (NFCI)

Rather than testing for many specific combinations of predicates
and values, compute the exact icmp regions for both comparisons
and check whether they union/intersect exactly. If they do,
construct the equivalent icmp for the new range. Assuming that the
existing code handled all possible cases, this should be NFC.

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




More information about the All-commits mailing list