[all-commits] [llvm/llvm-project] 403810: [InstCombine] Sink pure instructions down to retur...

max-azul via All-commits all-commits at lists.llvm.org
Fri May 22 01:04:59 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 403810557be79e36d0153a04fefff4d72028b2b4
      https://github.com/llvm/llvm-project/commit/403810557be79e36d0153a04fefff4d72028b2b4
  Author: Max Kazantsev <mkazantsev at azul.com>
  Date:   2020-05-22 (Fri, 22 May 2020)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
    M llvm/test/Transforms/InstCombine/insert-extract-shuffle.ll
    M llvm/test/Transforms/InstCombine/overflow.ll
    M llvm/test/Transforms/InstCombine/sink_to_unreachable.ll
    M llvm/test/Transforms/PGOProfile/chr.ll
    M llvm/test/Transforms/SimplifyCFG/merge-cond-stores.ll

  Log Message:
  -----------
  [InstCombine] Sink pure instructions down to return and unreachable blocks

If the only user of `Instr` is in a return or unreachable block, we can
sink `Instr` to the`User` safely (unless it reads/writes memory).
Return or unreachable blocks are guaranteed to execute zero
or one time, and `Instr` always dominates `User`, so they either will
be executed together (execution of `User` always implies execution
of `Instr`) or not executed at all.

Differential Revision: https://reviews.llvm.org/D80120
Reviewed By: asbirlea, jdoerfert




More information about the All-commits mailing list