[all-commits] [llvm/llvm-project] 0ac84a: [InstSimplify] Add tests for simplifying `(icmp ({...

goldsteinn via All-commits all-commits at lists.llvm.org
Mon Apr 3 09:05:52 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0ac84ab1cb554ec79d09531c724bfdb15e9d5cb9
      https://github.com/llvm/llvm-project/commit/0ac84ab1cb554ec79d09531c724bfdb15e9d5cb9
  Author: Noah Goldstein <goldstein.w.n at gmail.com>
  Date:   2023-04-03 (Mon, 03 Apr 2023)

  Changed paths:
    A llvm/test/Transforms/InstSimplify/vec-icmp-of-cast.ll

  Log Message:
  -----------
  [InstSimplify] Add tests for simplifying `(icmp ({z|s}ext X), C)` where `C` is vector; NFC

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


  Commit: 87c97d052cfd6dc0c03e5e36be1315f659f9f0ac
      https://github.com/llvm/llvm-project/commit/87c97d052cfd6dc0c03e5e36be1315f659f9f0ac
  Author: Noah Goldstein <goldstein.w.n at gmail.com>
  Date:   2023-04-03 (Mon, 03 Apr 2023)

  Changed paths:
    M llvm/lib/Analysis/InstructionSimplify.cpp
    M llvm/test/Transforms/InstSimplify/vec-icmp-of-cast.ll

  Log Message:
  -----------
  [InstSimplify] Extend simplifications for `(icmp ({z|s}ext X), C)` where `C` is vector

Previous logic only applied for `ConstantInt` which misses all vector
cases. New code works for splat/non-splat vectors as well. No change
to the underlying simplifications.

Reviewed By: nikic

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


  Commit: 63243b94cd4cb23a9c145fd129f24ed47be1883d
      https://github.com/llvm/llvm-project/commit/63243b94cd4cb23a9c145fd129f24ed47be1883d
  Author: Noah Goldstein <goldstein.w.n at gmail.com>
  Date:   2023-04-03 (Mon, 03 Apr 2023)

  Changed paths:
    A llvm/test/CodeGen/X86/ternlog.ll
    A llvm/test/Transforms/InstCombine/X86/x86-ternlog.ll

  Log Message:
  -----------
  [X86] Add tests for simplifying pternlog intrinsics; NFC

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


  Commit: cacc0033b12b2e6400eedd6e449644e87ec3099b
      https://github.com/llvm/llvm-project/commit/cacc0033b12b2e6400eedd6e449644e87ec3099b
  Author: Noah Goldstein <goldstein.w.n at gmail.com>
  Date:   2023-04-03 (Mon, 03 Apr 2023)

  Changed paths:
    M llvm/lib/Target/X86/X86InstCombineIntrinsic.cpp
    M llvm/test/CodeGen/X86/ternlog.ll
    M llvm/test/Transforms/InstCombine/X86/x86-ternlog.ll
    M llvm/unittests/Transforms/CMakeLists.txt
    A llvm/unittests/Transforms/InstCombine/CMakeLists.txt
    A llvm/unittests/Transforms/InstCombine/X86/CMakeLists.txt
    A llvm/unittests/Transforms/InstCombine/X86/TernlogTest.cpp

  Log Message:
  -----------
  [X86] Simplify some `pternlog` intrinsics

Currently `pternlog` intrinsics stay as a function call and are unable
to merge with other bin-ops / constant-fold.

This commit adds support for reducing all `pternlog` intrinsics to
their base logic-ops so that they can be further reduced in other
passes.

Since the x86 backend doesn't do a great job creating `vpternlog`
instructions from stray logic ops, the current logic only simplifies
in the cases were we obviously will be able to do as good or
better. As the x86 backend improves, more cases can be simplified.

Reviewed By: pengfei

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


Compare: https://github.com/llvm/llvm-project/compare/0e28fe62c756...cacc0033b12b


More information about the All-commits mailing list