[all-commits] [llvm/llvm-project] 9b6493: [NFC] Added tests for PR48604

Dávid Bolvanský via All-commits all-commits at lists.llvm.org
Thu Dec 31 05:08:28 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 9b6493946307c321cacc5d1da53bbae5a1acda24
      https://github.com/llvm/llvm-project/commit/9b6493946307c321cacc5d1da53bbae5a1acda24
  Author: Dávid Bolvanský <david.bolvansky at gmail.com>
  Date:   2020-12-31 (Thu, 31 Dec 2020)

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

  Log Message:
  -----------
  [NFC] Added tests for PR48604


  Commit: 742ea77ca4c0ea10d8ccd160c7d7f4257d214ed0
      https://github.com/llvm/llvm-project/commit/742ea77ca4c0ea10d8ccd160c7d7f4257d214ed0
  Author: Dávid Bolvanský <david.bolvansky at gmail.com>
  Date:   2020-12-31 (Thu, 31 Dec 2020)

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

  Log Message:
  -----------
  [InstCombine] Transform (A + B) - (A | B) to A & B (PR48604)

define i32 @src(i32 %x, i32 %y) {
%0:
  %a = add i32 %x, %y
  %o = or i32 %x, %y
  %r = sub i32 %a, %o
  ret i32 %r
}
=>
define i32 @tgt(i32 %x, i32 %y) {
%0:
  %b = and i32 %x, %y
  ret i32 %b
}
Transformation seems to be correct!

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


Compare: https://github.com/llvm/llvm-project/compare/8bee4d4e8f54...742ea77ca4c0


More information about the All-commits mailing list