[all-commits] [llvm/llvm-project] 2f5fdb: [MergeFunc] Don't assume constant metadata operands

Nikita Popov via All-commits all-commits at lists.llvm.org
Thu Mar 23 09:35:10 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2f5fdbfab8c63047bd4ebef154258868065168b3
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M llvm/include/llvm/Transforms/Utils/FunctionComparator.h
    M llvm/lib/Transforms/Utils/FunctionComparator.cpp
    M llvm/test/Transforms/MergeFunc/mergefunc-preserve-nonnull.ll

  Log Message:
  [MergeFunc] Don't assume constant metadata operands

We should not call mdconst::extract, unless we know that the
metadata in question is ConstantAsMetadata.

For now we consider all other metadata as equal. The noalias test
shows that this is not correct, but at least it doesn't crash

More information about the All-commits mailing list