[all-commits] [llvm/llvm-project] 03dcd9: [InstCombine] Allow splats with poison/undef in ll...

jmciver via All-commits all-commits at lists.llvm.org
Tue Apr 11 01:03:27 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 03dcd9da1ae567b2c37c8c3838b2f8ea1095d835
      https://github.com/llvm/llvm-project/commit/03dcd9da1ae567b2c37c8c3838b2f8ea1095d835
  Author: John McIver <john.mciver.iii at gmail.com>
  Date:   2023-04-11 (Tue, 11 Apr 2023)

  Changed paths:
    M llvm/lib/Analysis/CmpInstAnalysis.cpp
    M llvm/test/Transforms/InstCombine/icmp-logical.ll
    M llvm/test/Transforms/InstCombine/signed-truncation-check.ll

  Log Message:
  -----------
  [InstCombine] Allow splats with poison/undef in llvm::decomposeBitTestICmp

This change is made to enable conversion of a masked icmp splat vector
containing poison/undef to an equality expression.

llvm::decomposeBitTestICmp Alive2 correctness examples using splat/masking vectors:

    SLT <    https://alive2.llvm.org/ce/z/pPTTHh
    SLE <=   https://alive2.llvm.org/ce/z/qQhAmU
    SGT >    https://alive2.llvm.org/ce/z/koFHzF
    SGE >=   https://alive2.llvm.org/ce/z/3SNz2S
    ULT <u   https://alive2.llvm.org/ce/z/W8ktzQ
    ULE <=u  https://alive2.llvm.org/ce/z/G5SdUY
    UGT >u   https://alive2.llvm.org/ce/z/WFwYxq
    UGE >=u  https://alive2.llvm.org/ce/z/DzJszP

Tests have been verified using Alive2:

    icmp-logical.ll: @nomask_splat_and_B_allones       https://alive2.llvm.org/ce/z/zmJwQU
    icmp-logical.ll: @nomask_splat_and_B_mixed         https://alive2.llvm.org/ce/z/ktzgzd
    signed-truncation-check.ll: @positive_vec_undef0   https://alive2.llvm.org/ce/z/-sTRLD

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




More information about the All-commits mailing list