[all-commits] [llvm/llvm-project] 4faeb7: [InstCombine] Add test for missed opportunity to f...

Craig Topper via All-commits all-commits at lists.llvm.org
Fri Dec 15 21:42:57 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4faeb7dbe9a4d35ea3556a319a814fe7c5d6c27c
      https://github.com/llvm/llvm-project/commit/4faeb7dbe9a4d35ea3556a319a814fe7c5d6c27c
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2023-12-15 (Fri, 15 Dec 2023)

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

  Log Message:
  -----------
  [InstCombine] Add test for missed opportunity to fold 'or' into 'mul' operand. NFC

We are able to fold

or (mul X, Y), X --> mul X, (add Y, 1) (when the multiply has no common bits with X)

but we miss it if the mul operands are commuted.




More information about the All-commits mailing list