[all-commits] [llvm/llvm-project] a4bb08: [InstCombine] Add tests for `(icmp eq/ne bitrevers...

goldsteinn via All-commits all-commits at lists.llvm.org
Mon Mar 6 18:31:23 PST 2023


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

  Changed paths:
    M llvm/test/Transforms/InstCombine/cmp-intrinsic.ll

  Log Message:
  -----------
  [InstCombine] Add tests for `(icmp eq/ne bitreverse(x), C)`; NFC

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


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

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
    M llvm/test/Transforms/InstCombine/cmp-intrinsic.ll

  Log Message:
  -----------
  [InstCombine] Add transform `(icmp eq/ne bitreverse(x), C)` -> `(icmp eq/ne x, bitreverse(C))`

EQ: https://alive2.llvm.org/ce/z/TESofr
NE: https://alive2.llvm.org/ce/z/mwloaT

Reviewed By: nikic

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


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

  Changed paths:
    M llvm/test/Transforms/InstSimplify/shift.ll

  Log Message:
  -----------
  [InstSimplify] Add tests for `(shl nuw nsw X, BitWidth - 1)` -> `0`; NFC

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


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

  Changed paths:
    M llvm/lib/Analysis/InstructionSimplify.cpp
    M llvm/test/Transforms/InstSimplify/shift.ll

  Log Message:
  -----------
  [InstSimplify] Simplify `(shl nsw nuw X, BitWidth - 1)` -> `0`

https://alive2.llvm.org/ce/z/uFy5zT

Reviewed By: nikic, spatel

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


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

  Changed paths:
    M llvm/test/Transforms/InstCombine/shift.ll

  Log Message:
  -----------
  [InstCombine] Add tests for transform `(shift X,(Or Y, BitWidth-1))`; NFC

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


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

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
    M llvm/test/Transforms/InstCombine/shift.ll

  Log Message:
  -----------
  [InstCombine] Transform `(shift X,Or(Y,BitWidth-1))` -> `(shift X,BitWidth-1)`

shl : https://alive2.llvm.org/ce/z/_B7Qca
lshr: https://alive2.llvm.org/ce/z/6eXz_W
ashr: https://alive2.llvm.org/ce/z/oGEx-q

Reviewed By: nikic

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


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

  Changed paths:
    M llvm/test/CodeGen/X86/combine-add.ll
    M llvm/test/CodeGen/X86/combine-and.ll

  Log Message:
  -----------
  [X86] Add test for `~x & x` -> `0` and `~x + x` -> `-1` in DAG Lowering; NFC

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


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

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/test/CodeGen/X86/combine-and.ll
    M llvm/test/CodeGen/X86/fold-masked-merge.ll
    M llvm/test/CodeGen/X86/setcc-combine.ll

  Log Message:
  -----------
  [DAGCombiner] Add fold for `~x & x` -> `0`

This is generally done by the InstCombine, but can be emitted as an
intermediate step and is cheap to handle.

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


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

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/test/CodeGen/X86/combine-add.ll

  Log Message:
  -----------
  [DAGCombiner] Add fold for `~x + x` -> `-1`

This is generally done by the InstCombine, but can be emitted as an
intermediate step and is cheap to handle.

Reviewed By: RKSimon

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


Compare: https://github.com/llvm/llvm-project/compare/8aef04fa69a2...c1ecd0a3f49a


More information about the All-commits mailing list