Otherwise we may end up making the blockaddress invalid and passing it to other functions.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Should we be replacing the blockaddress with a Constant 1 in such cases? We do that elsewhere in a couple places. @efriedma ?
Oh, that's what the previous behavior of llvm/test/Transforms/LoopDeletion/blockaddress.ll was testing.
Ah, this test was precommitted recently: https://github.com/llvm/llvm-project/commit/4d85859ff48d16fc0ca8199676f7417a2c6dfe43
In general, transformations are allowed to delete unreachable blocks that have their address taken. See https://llvm.org/docs/LangRef.html#addresses-of-basic-blocks etc. So I don't see a bug here.
https://crsrc.org/c/base/debug/stack_trace.cc;drc=dd12c1c88dda05cccfb2bf9b9c9341ca8bdb3d1b;l=395
we're comparing the pc against two labels in a function to maybe skip stack frames. I guess label addresses aren't meant to do that? http://theochem.ki.ku.dk/on_line_docs/gcc/gcc_4.html suggests that they're only used for computed gotos?