[all-commits] [llvm/llvm-project] 1d25d0: [NFC][InstCombine] Add tests for negation of old-s...

Roman Lebedev via All-commits all-commits at lists.llvm.org
Wed Aug 5 11:48:17 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 1d25d0734a15d03f1356735719e04a517a1a8a96
      https://github.com/llvm/llvm-project/commit/1d25d0734a15d03f1356735719e04a517a1a8a96
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2020-08-05 (Wed, 05 Aug 2020)

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

  Log Message:
  -----------
  [NFC][InstCombine] Add tests for negation of old-style [n]abs, select-of-op-vs-negation-of-op


  Commit: f3056dcc02d5dcde1669f61084a940e1ded3dfda
      https://github.com/llvm/llvm-project/commit/f3056dcc02d5dcde1669f61084a940e1ded3dfda
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2020-08-05 (Wed, 05 Aug 2020)

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

  Log Message:
  -----------
  [InstCombine] Negator: -(cond ? x : -x)  -->  cond ? -x : x

We were errneously only doing that for old-style abs/nabs,
but we have no such legality check on the condition of the select.

https://rise4fun.com/Alive/xBHS


Compare: https://github.com/llvm/llvm-project/compare/43c0c9252a31...f3056dcc02d5


More information about the All-commits mailing list