[all-commits] [llvm/llvm-project] ce192c: [InstCombine] Use poison constant to represent the...

Juneyoung Lee via All-commits all-commits at lists.llvm.org
Sun Jun 20 17:59:10 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ce192ced2b901be67444c481ab5ca0d731e6d982
      https://github.com/llvm/llvm-project/commit/ce192ced2b901be67444c481ab5ca0d731e6d982
  Author: Juneyoung Lee <aqjune at gmail.com>
  Date:   2021-06-21 (Mon, 21 Jun 2021)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
    M llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp
    M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
    M llvm/test/Transforms/GVN/PRE/2017-06-28-pre-load-dbgloc.ll
    M llvm/test/Transforms/InstCombine/atomic.ll
    M llvm/test/Transforms/InstCombine/builtin-object-size-ptr.ll
    M llvm/test/Transforms/InstCombine/getelementptr.ll
    M llvm/test/Transforms/InstCombine/load.ll
    M llvm/test/Transforms/InstCombine/pr44245.ll
    M llvm/test/Transforms/InstCombine/store.ll

  Log Message:
  -----------
  [InstCombine] Use poison constant to represent the result of unreachable instrs

This patch updates InstCombine to use poison constant to represent the resulting value of (either semantically or syntactically) unreachable instrs, or a don't-care value of an unreachable store instruction.

This allows more aggressive folding of unused results, as shown in llvm/test/Transforms/InstCombine/getelementptr.ll .

Reviewed By: nikic

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




More information about the All-commits mailing list