[all-commits] [llvm/llvm-project] 772c2f: [AArch64][RISCV][x86] add tests for masked val equ...

Sanjay Patel via All-commits all-commits at lists.llvm.org
Tue Dec 6 08:36:51 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 772c2f461b942032df8426a49077c37066783a68
      https://github.com/llvm/llvm-project/commit/772c2f461b942032df8426a49077c37066783a68
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2022-12-06 (Tue, 06 Dec 2022)

  Changed paths:
    A llvm/test/CodeGen/AArch64/signbit-test.ll
    A llvm/test/CodeGen/RISCV/signbit-test.ll
    A llvm/test/CodeGen/X86/signbit-test.ll

  Log Message:
  -----------
  [AArch64][RISCV][x86] add tests for masked val equality with 0; NFC


  Commit: adc7c589c3dd35af5991ee481fa4667094bca548
      https://github.com/llvm/llvm-project/commit/adc7c589c3dd35af5991ee481fa4667094bca548
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2022-12-06 (Tue, 06 Dec 2022)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
    M llvm/test/CodeGen/AArch64/signbit-test.ll
    M llvm/test/CodeGen/X86/btq.ll
    M llvm/test/CodeGen/X86/masked_compressstore.ll
    M llvm/test/CodeGen/X86/masked_expandload.ll
    M llvm/test/CodeGen/X86/masked_gather.ll
    M llvm/test/CodeGen/X86/masked_load.ll
    M llvm/test/CodeGen/X86/masked_store.ll
    M llvm/test/CodeGen/X86/masked_store_trunc.ll
    M llvm/test/CodeGen/X86/masked_store_trunc_ssat.ll
    M llvm/test/CodeGen/X86/masked_store_trunc_usat.ll
    M llvm/test/CodeGen/X86/omit-urem-of-power-of-two-or-zero-when-comparing-with-zero.ll
    M llvm/test/CodeGen/X86/signbit-test.ll
    M llvm/test/CodeGen/X86/test-vs-bittest.ll

  Log Message:
  -----------
  [SDAG] try to convert bit set/clear to signbit test when trunc is free

(X & Pow2MaskC) == 0 --> (trunc X) >= 0
(X & Pow2MaskC) != 0 --> (trunc X) <  0

This was noted as a regression in the post-commit feedback for D112634
(where we canonicalized IR differently).

For x86, this saves a few instruction bytes. AArch64 seems neutral.

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


Compare: https://github.com/llvm/llvm-project/compare/c5dbc28de227...adc7c589c3dd


More information about the All-commits mailing list