[all-commits] [llvm/llvm-project] 982cbe: [InstCombine] Fold logical and/or of range icmps w...

Nikita Popov via All-commits all-commits at lists.llvm.org
Fri Apr 29 05:42:57 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 982cbed81920b474d41b63760cbde68680b15966
      https://github.com/llvm/llvm-project/commit/982cbed81920b474d41b63760cbde68680b15966
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-04-29 (Fri, 29 Apr 2022)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineInternal.h
    M llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
    M llvm/test/Transforms/InstCombine/and-or-icmps.ll

  Log Message:
  -----------
  [InstCombine] Fold logical and/or of range icmps with nowrap flags

This is an edge-case where we don't convert to bitwise and/or based
on implies poison reasoning, so explicitly try to perform the fold
in logical form. The transform itself is poison-safe, as both icmps
are based on the same value and any nowrap flags are discarded as
part of the fold (https://alive2.llvm.org/ce/z/aCwC8b for the used
example).




More information about the All-commits mailing list