[all-commits] [llvm/llvm-project] 554b1b: [InstCombine] ~(C + X) --> ~C - X (PR50308)

Roman Lebedev via All-commits all-commits at lists.llvm.org
Wed May 12 06:11:49 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 554b1bced325a8d860ad00bd59020d66d01c95f8
      https://github.com/llvm/llvm-project/commit/554b1bced325a8d860ad00bd59020d66d01c95f8
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-05-12 (Wed, 12 May 2021)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
    M llvm/test/Transforms/InstCombine/not-add.ll

  Log Message:
  -----------
  [InstCombine] ~(C + X) --> ~C - X (PR50308)

We can not rely on (C+X)-->(X+C) already happening,
because we might not have visited that `add` yet.
The added testcase would get stuck in an endless combine loop.




More information about the All-commits mailing list