[SimplifyCFG] Skip hoisting common instructions that return token type
authorYuanfang Chen <yuanfang.chen@sony.com>
Tue, 5 Jul 2022 17:56:19 +0000 (10:56 -0700)
committerYuanfang Chen <yuanfang.chen@sony.com>
Tue, 5 Jul 2022 18:21:57 +0000 (11:21 -0700)
commitb170d856a3a303ab826f6896812bfd0ce05ec706
tree44a6f9c9caedabd9cea23344fa4a1e32ec7e9c7b
parentf2beca908d4ec409e4201ee08b1d4a7d9fcb1ab7
[SimplifyCFG] Skip hoisting common instructions that return token type

By LangRef, hoisting token-returning instructions obsures the origin
so it should be skipped. Found this issue while investigating a
CoroSplit pass crash.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D129025
llvm/lib/Transforms/Utils/SimplifyCFG.cpp
llvm/test/Transforms/SimplifyCFG/hoist-skip-token.ll [new file with mode: 0644]