[all-commits] [llvm/llvm-project] ad8776: [SimplifyCFG] HoistThenElseCodeToIf(): don't hoist...

Roman Lebedev via All-commits all-commits at lists.llvm.org
Sun Jun 20 02:22:46 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ad87761925c2790aab272138b5bbbde4a93e0383
      https://github.com/llvm/llvm-project/commit/ad87761925c2790aab272138b5bbbde4a93e0383
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-06-20 (Sun, 20 Jun 2021)

  Changed paths:
    M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
    M llvm/test/CodeGen/AArch64/inlineasm-S-constraint.ll
    A llvm/test/Transforms/SimplifyCFG/hoist-from-addresstaken-block.ll

  Log Message:
  -----------
  [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.




More information about the All-commits mailing list