[all-commits] [llvm/llvm-project] d4ccef: [InstCombine] 'hoist xor-by-constant from xor-by-v...

Roman Lebedev via All-commits all-commits at lists.llvm.org
Mon Dec 28 09:15:58 PST 2020


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d4ccef38d0bbcd70f56d586b4dfc988db863e388
      https://github.com/llvm/llvm-project/commit/d4ccef38d0bbcd70f56d586b4dfc988db863e388
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2020-12-28 (Mon, 28 Dec 2020)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
    M llvm/test/Transforms/InstCombine/hoist-xor-by-constant-from-xor-by-value.ll

  Log Message:
  -----------
  [InstCombine] 'hoist xor-by-constant from xor-by-value': ignore constantexprs

As it is being reported (in post-commit review) in
https://reviews.llvm.org/D93857
this fold (as i expected, but failed to come up with test coverage
despite trying) has issues with constant expressions.
Since we only care about true constants, which constantexprs are not,
don't perform such hoisting for constant expressions.




More information about the All-commits mailing list