[all-commits] [llvm/llvm-project] 0af3e6: [InstCombine] Sink instructions with multiple user...

Andrew Wei via All-commits all-commits at lists.llvm.org
Thu Mar 17 21:09:55 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0af3e6a22da2eda5021b5fad656d0b9db7702e0a
      https://github.com/llvm/llvm-project/commit/0af3e6a22da2eda5021b5fad656d0b9db7702e0a
  Author: Andrew Wei <weiwei64 at huawei.com>
  Date:   2022-03-18 (Fri, 18 Mar 2022)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
    M llvm/test/Transforms/InstCombine/intptr7.ll
    M llvm/test/Transforms/InstCombine/lifetime-no-null-opt.ll
    M llvm/test/Transforms/InstCombine/lifetime.ll
    M llvm/test/Transforms/InstCombine/merging-multiple-stores-into-successor.ll
    M llvm/test/Transforms/InstCombine/pr33689_same_bitwidth.ll
    M llvm/test/Transforms/InstCombine/shift-by-signext.ll
    M llvm/test/Transforms/InstCombine/sink_instruction.ll
    M llvm/test/Transforms/LoopUnroll/runtime-unroll-remainder.ll
    M llvm/test/Transforms/LoopVectorize/X86/invariant-load-gather.ll
    M llvm/test/Transforms/LoopVectorize/X86/small-size.ll
    M llvm/test/Transforms/LoopVectorize/X86/x86-interleaved-store-accesses-with-gaps.ll
    M llvm/test/Transforms/LoopVectorize/first-order-recurrence.ll
    M llvm/test/Transforms/LoopVectorize/induction.ll
    M llvm/test/Transforms/LoopVectorize/interleaved-accesses.ll
    M llvm/test/Transforms/LowerMatrixIntrinsics/multiply-fused-dominance.ll
    M llvm/test/Transforms/PGOProfile/chr.ll

  Log Message:
  -----------
  [InstCombine] Sink instructions with multiple users in a successor block.

This patch tries to sink instructions when they are only used in a successor block.

This is a further enhancement patch based on Anna's commit:
D109700, which allows sinking an instruction having multiple uses in a single user.

In this patch, sink instructions with multiple users in a single successor block will be supported.
It could fix a known issue from rust:
  https://github.com/rust-lang/rust/issues/51346#issuecomment-394443610

Reviewed By: nikic, reames

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




More information about the All-commits mailing list