[all-commits] [llvm/llvm-project] 232698: [Local][InstCombine][GVN] Handle !noundef metadata...

luxufan via All-commits all-commits at lists.llvm.org
Wed Feb 1 22:27:25 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 232698dc171ed7e3639db4a18e6d1abfba89f68b
      https://github.com/llvm/llvm-project/commit/232698dc171ed7e3639db4a18e6d1abfba89f68b
  Author: luxufan <luxufan at iscas.ac.cn>
  Date:   2023-02-02 (Thu, 02 Feb 2023)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp
    M llvm/lib/Transforms/Utils/Local.cpp
    A llvm/test/Transforms/GVN/noundef.ll
    A llvm/test/Transforms/InstCombine/phi-load-metadata-4.ll

  Log Message:
  -----------
  [Local][InstCombine][GVN] Handle !noundef metadata in combineMetadata

Handle !noundef metadata in comhineMetadata. The behavior of violating
!noundef metadata is undefined behavior. So if K dominates J, we can
preserve it uncontionally, otherwise, we preserve it if both K and J
have !noundef metadata been set.

This patch also makes !noundef metadata added in KnownIDs when doing
instruction combine for phi node or global value numbering for loads.

Reviewed By: nikic

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




More information about the All-commits mailing list