[all-commits] [llvm/llvm-project] 482d65: [NFC][InstCombine] Add test coverage for PR47997

Roman Lebedev via All-commits all-commits at lists.llvm.org
Tue Nov 3 05:07:27 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 482d65331bab5f007408ad573f8b613d6adcf4f3
      https://github.com/llvm/llvm-project/commit/482d65331bab5f007408ad573f8b613d6adcf4f3
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2020-11-03 (Tue, 03 Nov 2020)

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

  Log Message:
  -----------
  [NFC][InstCombine] Add test coverage for PR47997


  Commit: 67be050acc3497213b0560812afa26091449c04a
      https://github.com/llvm/llvm-project/commit/67be050acc3497213b0560812afa26091449c04a
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2020-11-03 (Tue, 03 Nov 2020)

  Changed paths:
    M llvm/test/Transforms/InstCombine/sub-of-negatible.ll

  Log Message:
  -----------
  [NFC][InstCombine] Negator: add test coverage for `(?? - (C - %y))` pattern (PR47997)


  Commit: f8cf6d027b54e0c2a3804e272a6d3ace95952ef9
      https://github.com/llvm/llvm-project/commit/f8cf6d027b54e0c2a3804e272a6d3ace95952ef9
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2020-11-03 (Tue, 03 Nov 2020)

  Changed paths:
    M llvm/test/Transforms/InstCombine/sub-of-negatible.ll

  Log Message:
  -----------
  [NFC][InstCombine] Negator: add test coverage for `(?? - (%y + C))` pattern (PR47997)


  Commit: e465f9c3036b28bdbdbef03eee8fd022a3b6dcbf
      https://github.com/llvm/llvm-project/commit/e465f9c3036b28bdbdbef03eee8fd022a3b6dcbf
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2020-11-03 (Tue, 03 Nov 2020)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineNegator.cpp
    M llvm/test/Transforms/InstCombine/icmp.ll
    M llvm/test/Transforms/InstCombine/sub-of-negatible.ll

  Log Message:
  -----------
  [InstCombine] Negator: - (C - %x) --> %x - C (PR47997)

This relaxes one-use restriction on that `sub` fold,
since apparently the addition of Negator broke
preexisting `C-(C2-X) --> X+(C-C2)` (with C=0) fold.


  Commit: c009d11bdac4a7f4a3a8ae85e42da053828a6f24
      https://github.com/llvm/llvm-project/commit/c009d11bdac4a7f4a3a8ae85e42da053828a6f24
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2020-11-03 (Tue, 03 Nov 2020)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
    M llvm/test/Transforms/InstCombine/sub-of-negatible.ll

  Log Message:
  -----------
  [InstCombine] Perform  C-(X+C2) --> (C-C2)-X  transform before using Negator

In particular, it makes it fire for C=0, because negator doesn't want
to perform that fold since in general it's not beneficial.


Compare: https://github.com/llvm/llvm-project/compare/d68bed0fa94e...c009d11bdac4


More information about the All-commits mailing list