[all-commits] [llvm/llvm-project] 8ae4b1: [SimplifyCFG] Don't hoist a musttail call separate...

Henry Jiang via All-commits all-commits at lists.llvm.org
Wed Jul 1 21:44:14 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8ae4b199cfb0005e79abedd8ea5d2846d791208c
      https://github.com/llvm/llvm-project/commit/8ae4b199cfb0005e79abedd8ea5d2846d791208c
  Author: Henry Jiang <henry_jiang2 at apple.com>
  Date:   2026-07-01 (Wed, 01 Jul 2026)

  Changed paths:
    M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
    M llvm/test/Transforms/SimplifyCFG/hoist-common-skip-pseudoprobe.ll
    M llvm/test/Transforms/SimplifyCFG/hoist-common-skip.ll

  Log Message:
  -----------
  [SimplifyCFG] Don't hoist a musttail call separately from the terminator (#207094)

SimplifyCFG can accidentally hoist `musttail` away from the `ret` if
`hoistCommonCodeFromSuccessor` skipped a differing instruction, causing
a misverify. So we need to guard the `musttail` call to make sure that the `ret` is
hoisted along with the call. This can only happen when no instruction
has been skipped so both successors be folded into the the predecessor,
leaving a valid `musttail` call.

Reproducer https://godbolt.org/z/3vsnz4hc7



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list