[all-commits] [llvm/llvm-project] 1d007d: [InstCombine] add tests for bitwise logic with boo...

RotateRight via All-commits all-commits at lists.llvm.org
Sat Nov 20 09:33:42 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1d007d0e5a929c3f5cb25aea18d6c8a16326c02e
      https://github.com/llvm/llvm-project/commit/1d007d0e5a929c3f5cb25aea18d6c8a16326c02e
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2021-11-20 (Sat, 20 Nov 2021)

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

  Log Message:
  -----------
  [InstCombine] add tests for bitwise logic with bool op; NFC


  Commit: 337948ac6e2260fc4d5a1901b4f667a2a0a52ee3
      https://github.com/llvm/llvm-project/commit/337948ac6e2260fc4d5a1901b4f667a2a0a52ee3
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2021-11-20 (Sat, 20 Nov 2021)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineInternal.h
    M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
    M llvm/test/Transforms/InstCombine/and.ll
    M llvm/test/Transforms/InstCombine/or.ll

  Log Message:
  -----------
  [InstCombine] add folds for binop with sexted bool and constant operands

This is a generalization/extension of the existing and/or
folds noted with TODO comments. Those have a one-use
constraint that is not necessary.

Potential follow-ups are noted by the TODO comments in
the new function. We can also call this function from
other binop visit* functions, but we need to add tests
first.

This solves:
https://llvm.org/PR52543

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


Compare: https://github.com/llvm/llvm-project/compare/401b76fdf2b3...337948ac6e22


More information about the All-commits mailing list