[all-commits] [llvm/llvm-project] 4973ce: ~(C + X) --> ~C - X (PR50308)

Roman Lebedev via All-commits all-commits at lists.llvm.org
Wed May 19 20:02:50 PDT 2021


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

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

  Log Message:
  -----------
  ~(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.

(cherry-picked from 554b1bced325)




More information about the All-commits mailing list