[PATCH] D146723: [SimplifyCFG] Don't merge invoke if this makes immarg non-constant (PR61265)

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 23 07:26:34 PDT 2023


nikic created this revision.
nikic added a reviewer: mkazantsev.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
nikic requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Don't merge invokes if this replaces constant operands with phis in a place where this is not legal.

@mkazantsev Could you please check the change to merge-deopt-bundle-constants.ll? Was this test added to check that differing deopt bundles aren't merged but then never fixed, or was it added to check that they are merged? If the latter, then I'll adjust canReplaceOperandWithVariable() to special-case deopt.

Fixes https://github.com/llvm/llvm-project/issues/61265.


https://reviews.llvm.org/D146723

Files:
  llvm/lib/Transforms/Utils/SimplifyCFG.cpp
  llvm/test/Transforms/SimplifyCFG/X86/merge-compatible-invokes-of-landingpad.ll
  llvm/test/Transforms/SimplifyCFG/merge-deopt-bundle-constants.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146723.507734.patch
Type: text/x-patch
Size: 9742 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230323/1b0ae7fc/attachment.bin>


More information about the llvm-commits mailing list