[all-commits] [llvm/llvm-project] a04fad: [InstCombine] add tests for demanded bits of add w...

Marc Auberer via All-commits all-commits at lists.llvm.org
Sun Sep 11 03:44:18 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a04fada354db6b545faa88a082bafa52a862d0e1
      https://github.com/llvm/llvm-project/commit/a04fada354db6b545faa88a082bafa52a862d0e1
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2022-09-11 (Sun, 11 Sep 2022)

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

  Log Message:
  -----------
  [InstCombine] add tests for demanded bits of add with multi-use; NFC


  Commit: a91effa0b8b1c3de30b3986c1ad3764b9bb1ed7a
      https://github.com/llvm/llvm-project/commit/a91effa0b8b1c3de30b3986c1ad3764b9bb1ed7a
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2022-09-11 (Sun, 11 Sep 2022)

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

  Log Message:
  -----------
  [InstCombine] add tests for mul-by-neg-pow2; NFC


  Commit: 09cdddea0c4d284c2c22f5dfade40a60850c5ea7
      https://github.com/llvm/llvm-project/commit/09cdddea0c4d284c2c22f5dfade40a60850c5ea7
  Author: Marc Auberer <contact at marc-auberer.com>
  Date:   2022-09-11 (Sun, 11 Sep 2022)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
    M llvm/test/Transforms/InstCombine/add_or_sub.ll

  Log Message:
  -----------
  [InstCombine] Fold x + (x | -x) to x & (x - 1)

Fixes #57531

This transformation may be particularly useful on x86-64,
because x & (x - 1) can be performed by a single blsr instruction.

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


Compare: https://github.com/llvm/llvm-project/compare/52a374e938ed...09cdddea0c4d


More information about the All-commits mailing list