[all-commits] [llvm/llvm-project] b17855: [InstCombine] Improve simplify demanded bits workl...

Nikita Popov via All-commits all-commits at lists.llvm.org
Fri Feb 21 09:51:49 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: b178555318cdccecc9d3fb4af89b4a765cb0e48c
      https://github.com/llvm/llvm-project/commit/b178555318cdccecc9d3fb4af89b4a765cb0e48c
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2020-02-21 (Fri, 21 Feb 2020)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
    M llvm/test/Transforms/InstCombine/2010-11-01-lshr-mask.ll

  Log Message:
  -----------
  [InstCombine] Improve simplify demanded bits worklist management

This fixes a small mistake from D72944: The worklist add should
happen before assigning the new operand, not after.

In case an actual replacement happens, the old operand needs to
be added for DCE. If no actual replacement happens, then old/new
are the same, so it doesn't matter.

This drops one iteration from the annotated test case.




More information about the All-commits mailing list