[all-commits] [llvm/llvm-project] 624989: ConstantFolding: Guard use of getFunction

David Stuttard via All-commits all-commits at lists.llvm.org
Wed Nov 30 06:13:35 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 62498962e42dc53975e8fea11cb54bce44082649
      https://github.com/llvm/llvm-project/commit/62498962e42dc53975e8fea11cb54bce44082649
  Author: David Stuttard <david.stuttard at amd.com>
  Date:   2022-11-30 (Wed, 30 Nov 2022)

  Changed paths:
    M llvm/lib/Analysis/ConstantFolding.cpp

  Log Message:
  -----------
  ConstantFolding: Guard use of getFunction

Add additional guards for a use of getFunction on an Instruction
In some cases constanfFoldCanonicalize can be called with a cloned instruction
that doesn't have a parent (or associated function), causing a seg fault.

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




More information about the All-commits mailing list