[all-commits] [llvm/llvm-project] b155c8: [InstCombine] add tests for icmp with constant off...

RotateRight via All-commits all-commits at lists.llvm.org
Wed Jul 14 09:12:21 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b155c871f2e21beed45d15a25f7c84fb4f0c1d93
      https://github.com/llvm/llvm-project/commit/b155c871f2e21beed45d15a25f7c84fb4f0c1d93
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2021-07-14 (Wed, 14 Jul 2021)

  Changed paths:
    M llvm/test/Transforms/InstCombine/icmp-add.ll

  Log Message:
  -----------
  [InstCombine] add tests for icmp with constant offset and no-wrap flags; NFC


  Commit: ca6e117d86341682e20025f204294c0ca78c355e
      https://github.com/llvm/llvm-project/commit/ca6e117d86341682e20025f204294c0ca78c355e
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2021-07-14 (Wed, 14 Jul 2021)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
    M llvm/test/Transforms/InstCombine/icmp-add.ll

  Log Message:
  -----------
  [InstCombine] reorder icmp with offset folds for better results

This set of folds was added recently with:
c7b658aeb526
0c400e895306
40b752d28d95

...and I noted that this wasn't likely to fire in code derived
from C/C++ source because of nsw in particular. But I didn't
notice that I had placed the code above the no-wrap block
of transforms.

This is likely the cause of regressions noted from the previous
commit because -- as shown in the test diffs -- we may have
transformed into a compare with an arbitrary constant rather
than a simpler signbit test.


Compare: https://github.com/llvm/llvm-project/compare/efaf3099c8ce...ca6e117d8634


More information about the All-commits mailing list