[all-commits] [llvm/llvm-project] c1c313: [InstCombine] add tests for and-of-negated-lowbitm...

Sanjay Patel via All-commits all-commits at lists.llvm.org
Sun Jul 3 09:27:12 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c1c3134ac422c51c635ea7f28c37838b3805c912
      https://github.com/llvm/llvm-project/commit/c1c3134ac422c51c635ea7f28c37838b3805c912
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2022-07-03 (Sun, 03 Jul 2022)

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

  Log Message:
  -----------
  [InstCombine] add tests for and-of-negated-lowbitmask; NFC


  Commit: f9f40aa10d9862b8db1b99bb9e7f5898a90b35f7
      https://github.com/llvm/llvm-project/commit/f9f40aa10d9862b8db1b99bb9e7f5898a90b35f7
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2022-07-03 (Sun, 03 Jul 2022)

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

  Log Message:
  -----------
  [InstCombine] fold negated low-bit-mask to cmp+select

(-(X & 1)) & Y --> (X & 1) == 0 ? 0 : Y
https://alive2.llvm.org/ce/z/rhpH3i

This is noted as a missing IR canonicalization in issue #55618.
We already managed to fix codegen to the expected form.


Compare: https://github.com/llvm/llvm-project/compare/e1f61d864214...f9f40aa10d98


More information about the All-commits mailing list