[all-commits] [llvm/llvm-project] d05d4e: [NFC][InstCombine] Autogenerate checklines in a fe...

Roman Lebedev via All-commits all-commits at lists.llvm.org
Sat Aug 7 07:33:12 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d05d4e7f7ebb0c7e61de0857b226710f01aaa13f
      https://github.com/llvm/llvm-project/commit/d05d4e7f7ebb0c7e61de0857b226710f01aaa13f
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-08-07 (Sat, 07 Aug 2021)

  Changed paths:
    M llvm/test/Transforms/InstCombine/exact.ll
    M llvm/test/Transforms/InstCombine/sext.ll

  Log Message:
  -----------
  [NFC][InstCombine] Autogenerate checklines in a few tests being affected by an upcoming change


  Commit: d88d279e765c31f2dcbf81256e75642ba3ad51f1
      https://github.com/llvm/llvm-project/commit/d88d279e765c31f2dcbf81256e75642ba3ad51f1
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-08-07 (Sat, 07 Aug 2021)

  Changed paths:
    A llvm/test/Transforms/InstCombine/low-bit-splat.ll

  Log Message:
  -----------
  [NFC][InstCombine] Add tests for low bit splatting pattern (PR51305)


  Commit: e71870512fd896bf6cf34e8ae650f4cf20923258
      https://github.com/llvm/llvm-project/commit/e71870512fd896bf6cf34e8ae650f4cf20923258
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-08-07 (Sat, 07 Aug 2021)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
    M llvm/test/Transforms/InstCombine/exact.ll
    M llvm/test/Transforms/InstCombine/low-bit-splat.ll
    M llvm/test/Transforms/InstCombine/sext.ll

  Log Message:
  -----------
  [InstCombine] Prefer `-(x & 1)` as the low bit splatting pattern (PR51305)

Both patterns are equivalent (https://alive2.llvm.org/ce/z/jfCViF),
so we should have a preference. It seems like mask+negation is better
than two shifts.


  Commit: c6ff867f92f67c6451ed1709f2af66211cb7b901
      https://github.com/llvm/llvm-project/commit/c6ff867f92f67c6451ed1709f2af66211cb7b901
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-08-07 (Sat, 07 Aug 2021)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
    M llvm/test/Transforms/InstCombine/reduction-xor-sext-zext-i1.ll

  Log Message:
  -----------
  [NFC][InstCombine] Simplify emitted IR for `vector_reduce_xor(?ext(<n x i1>))`

Now that we canonicalize low bit splatting to the form we were emitting
here ourselves, emit simpler IR that will be canonicalized later.

See 1e801439be26569c9ede6fd309a645b00adb656c for proofs:
https://alive2.llvm.org/ce/z/MjCm5W (self)
https://alive2.llvm.org/ce/z/kgqF4M (skipped zext)
https://alive2.llvm.org/ce/z/pgy3HP (skipped sext)


  Commit: 0a241e90d4931a764109da70c2322a0a9386b1a7
      https://github.com/llvm/llvm-project/commit/0a241e90d4931a764109da70c2322a0a9386b1a7
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-08-07 (Sat, 07 Aug 2021)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp

  Log Message:
  -----------
  [NFC][InstCombine] `vector_reduce_xor(?ext(<n x i1>))` --> `?ext(vector_reduce_add(<n x i1>))`

Instead of expanding it ourselves,
we can just forward to `?ext(vector_reduce_add(<n x i1>))`, as per alive2:
https://alive2.llvm.org/ce/z/ymz7zE (self)
https://alive2.llvm.org/ce/z/eKu2v2 (skipped zext)
https://alive2.llvm.org/ce/z/c3BXgc (skipped sext)


Compare: https://github.com/llvm/llvm-project/compare/ffc3fb665d0a...0a241e90d493


More information about the All-commits mailing list