[all-commits] [llvm/llvm-project] 388698: [X86] Add tests for `(atomicrmw xor p, Imm)`; NFC

goldsteinn via All-commits all-commits at lists.llvm.org
Sun May 7 17:12:27 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 38869852177ca263e29b4f437eb3610ace842924
      https://github.com/llvm/llvm-project/commit/38869852177ca263e29b4f437eb3610ace842924
  Author: Noah Goldstein <goldstein.w.n at gmail.com>
  Date:   2023-05-07 (Sun, 07 May 2023)

  Changed paths:
    A llvm/test/CodeGen/X86/atomic-xor.ll

  Log Message:
  -----------
  [X86] Add tests for `(atomicrmw xor p, Imm)`; NFC

Reviewed By: RKSimon

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


  Commit: 3e998ede64e0667ac2cf04e05c41988a71bc044c
      https://github.com/llvm/llvm-project/commit/3e998ede64e0667ac2cf04e05c41988a71bc044c
  Author: Noah Goldstein <goldstein.w.n at gmail.com>
  Date:   2023-05-07 (Sun, 07 May 2023)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/atomic-bit-test.ll
    M llvm/test/CodeGen/X86/atomic-xor.ll

  Log Message:
  -----------
  [X86] Lower used `(atomicrmw xor p, SignBit)` as `(atomicrmw add p, SignBit)`

`(xor X, SignBit)` == `(add X, SignBit)`. For atomics whose result is
used, the `add` option is preferable because of the `xadd` instruction
which allows us to avoid either a CAS loop or a `btc; setcc; shl`.

Reviewed By: RKSimon

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


  Commit: 7b1f123b15da70ee73b0106b7eda2ec116f81d50
      https://github.com/llvm/llvm-project/commit/7b1f123b15da70ee73b0106b7eda2ec116f81d50
  Author: Noah Goldstein <goldstein.w.n at gmail.com>
  Date:   2023-05-07 (Sun, 07 May 2023)

  Changed paths:
    A llvm/test/Analysis/ValueTracking/knownbits-rem-lowbits.ll

  Log Message:
  -----------
  [KnownBits] Add tests for getting lowbits of `rem X, Y`; NFC

Reviewed By: foad

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


  Commit: 7770b0abfdab60e11fe26010c616ceb9b106a9ef
      https://github.com/llvm/llvm-project/commit/7770b0abfdab60e11fe26010c616ceb9b106a9ef
  Author: Noah Goldstein <goldstein.w.n at gmail.com>
  Date:   2023-05-07 (Sun, 07 May 2023)

  Changed paths:
    M llvm/include/llvm/Support/KnownBits.h
    M llvm/lib/Support/KnownBits.cpp
    M llvm/test/Analysis/ValueTracking/knownbits-rem-lowbits.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/masked-call.ll

  Log Message:
  -----------
  [KnownBits] Improve `KnownBits::rem(X, Y)` in cases where we can deduce low-bits of output

The first `cttz(Y)` bits in `X` are translated 1-1 in the output.

Alive2 Links:
    https://alive2.llvm.org/ce/z/Qc47p7
    https://alive2.llvm.org/ce/z/19ut5H

Reviewed By: RKSimon

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


Compare: https://github.com/llvm/llvm-project/compare/ad5bed5372f3...7770b0abfdab


More information about the All-commits mailing list