HomePhabricator

[SimplifyCFG] HoistThenElseCodeToIf(): don't hoist if either block has it's…

Authored by lebedev.ri on Jun 20 2021, 2:18 AM.

Description

[SimplifyCFG] HoistThenElseCodeToIf(): don't hoist if either block has it's address taken

This problem is exposed by D104598, after it tail-merges ret in
@test_inline_constraint_S_label, the verifier would start complaining
invalid operand for inline asm constraint 'S'.

Essentially, taking address of a block is mismodelled in IR.
It should probably be an explicit instruction, a first one in block,
that isn't identical to any other instruction of the same type,
so that it can't be hoisted.

Details

Committed
lebedev.riJun 20 2021, 2:18 AM
Parents
rG09e8c0d5aaef: [InstSimplify] icmp poison, X -> poison
Branches
Unknown
Tags
Unknown