[all-commits] [llvm/llvm-project] 6482f3: [NFC][InstCombine] Add more exhaustive test covera...

Roman Lebedev via All-commits all-commits at lists.llvm.org
Tue Oct 27 04:44:38 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 6482f3239af193e00b30c0a8f1459be4f22cb141
      https://github.com/llvm/llvm-project/commit/6482f3239af193e00b30c0a8f1459be4f22cb141
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2020-10-27 (Tue, 27 Oct 2020)

  Changed paths:
    M llvm/test/Transforms/InstCombine/canonicalize-ashr-shl-to-masking.ll
    M llvm/test/Transforms/InstCombine/canonicalize-lshr-shl-to-masking.ll

  Log Message:
  -----------
  [NFC][InstCombine] Add more exhaustive test coverage for `(x >>? X1) << C2` pattern (PR37872)


  Commit: 90152a602c127e1572d67139b07f09fa37047ed0
      https://github.com/llvm/llvm-project/commit/90152a602c127e1572d67139b07f09fa37047ed0
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2020-10-27 (Tue, 27 Oct 2020)

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

  Log Message:
  -----------
  [NFC][InstCombine] Autogenerate cast.ll test


  Commit: 5e3a8953ace7f5783ef592f1786d7f10610648ad
      https://github.com/llvm/llvm-project/commit/5e3a8953ace7f5783ef592f1786d7f10610648ad
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2020-10-27 (Tue, 27 Oct 2020)

  Changed paths:
    M llvm/test/Transforms/PhaseOrdering/basic.ll

  Log Message:
  -----------
  [NFC][PhaseOrdering] Autogenerate basic.ll test


  Commit: 0ac56e8eaaeb41b59a952fa465872f647c930347
      https://github.com/llvm/llvm-project/commit/0ac56e8eaaeb41b59a952fa465872f647c930347
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2020-10-27 (Tue, 27 Oct 2020)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
    M llvm/test/Transforms/InstCombine/2010-11-01-lshr-mask.ll
    M llvm/test/Transforms/InstCombine/apint-shift.ll
    M llvm/test/Transforms/InstCombine/canonicalize-ashr-shl-to-masking.ll
    M llvm/test/Transforms/InstCombine/canonicalize-lshr-shl-to-masking.ll
    M llvm/test/Transforms/InstCombine/cast.ll
    M llvm/test/Transforms/InstCombine/gep-combine-loop-invariant.ll
    M llvm/test/Transforms/InstCombine/known-signbit-shift.ll
    M llvm/test/Transforms/InstCombine/shift.ll
    M llvm/test/Transforms/InstCombine/trunc.ll

  Log Message:
  -----------
  [InstCombine] Fold `(X >>? C1) << C2` patterns to shift+bitmask (PR37872)

This is essentially finalizes a revert of rL155136,
because nowadays the situation has improved, SCEV can model
all these patterns well, and we canonicalize rotate-like patterns
into a funnel shift intrinsics in InstCombine.
So this should not cause any pessimization.

I've verified the canonicalize-{a,l}shr-shl-to-masking.ll transforms
with alive, which confirms that we can freely preserve exact-ness,
and no-wrap flags.

Profs:
* base: https://rise4fun.com/Alive/gPQ
* exact-ness preservation: https://rise4fun.com/Alive/izi
* nuw preservation: https://rise4fun.com/Alive/DmD
* nsw preservation: https://rise4fun.com/Alive/SLN6N
* nuw nsw preservation: https://rise4fun.com/Alive/Qp7

Refs. https://reviews.llvm.org/D46760


Compare: https://github.com/llvm/llvm-project/compare/c5fa6bae12ff...0ac56e8eaaeb


More information about the All-commits mailing list