[all-commits] [llvm/llvm-project] 3aff78: [InstCombine] Pre-commit test for D130103.

Craig Topper via All-commits all-commits at lists.llvm.org
Wed Jul 20 11:01:19 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3aff7870a75d63a9b8e738f20d10e3e8d49c7820
      https://github.com/llvm/llvm-project/commit/3aff7870a75d63a9b8e738f20d10e3e8d49c7820
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2022-07-20 (Wed, 20 Jul 2022)

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

  Log Message:
  -----------
  [InstCombine] Pre-commit test for D130103.


  Commit: d76c8f51276fdd7829d5743b5b7874a76cd4b518
      https://github.com/llvm/llvm-project/commit/d76c8f51276fdd7829d5743b5b7874a76cd4b518
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2022-07-20 (Wed, 20 Jul 2022)

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

  Log Message:
  -----------
  [InstCombine] Add mul with negated power of 2 constant to canEvaluateShifted.

If we are right shifting a multiply by a negated power of 2 where
the power of 2 is the same as the shift amount, we can replace with
a negate followed by an And.

New tests have not been committed yet but the patch shows the diffs.
Let me know if you want any changes or additional tests.

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


Compare: https://github.com/llvm/llvm-project/compare/19d4f5e6495c...d76c8f51276f


More information about the All-commits mailing list