[all-commits] [llvm/llvm-project] 4ac4e5: [InstCombine] Improve TryToSinkInstruction with mu...

annamthomas via All-commits all-commits at lists.llvm.org
Wed Sep 15 13:40:07 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4ac4e52189aa6d80c3d59dc2c8f7dcc0cb7f9d58
      https://github.com/llvm/llvm-project/commit/4ac4e52189aa6d80c3d59dc2c8f7dcc0cb7f9d58
  Author: Anna Thomas <anna at azul.com>
  Date:   2021-09-15 (Wed, 15 Sep 2021)

  Changed paths:
    M llvm/include/llvm/IR/Value.h
    M llvm/lib/IR/Value.cpp
    M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
    M llvm/lib/Transforms/Utils/AssumeBundleBuilder.cpp
    M llvm/test/Transforms/InstCombine/icmp-mul-zext.ll
    M llvm/test/Transforms/InstCombine/sink_instruction.ll

  Log Message:
  -----------
  [InstCombine] Improve TryToSinkInstruction with multiple uses

This patch allows sinking an instruction which can have multiple uses in a
single user. We were previously over-restrictive by looking for exactly one use,
rather than one user.

Also, the API for retrieving undroppable user has been updated accordingly since
in both usecases (Attributor and InstCombine), we seem to care about the user,
rather than the use.

Reviewed-By: nikic

Differential Revision: https://reviews.llvm.org/D109700




More information about the All-commits mailing list