[llvm] [llvm][WebAssembly] mark BR_TABLE as isIndirectBranch (PR #73391)
Xu Jun via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 10 06:16:38 PST 2023
xujuntwt95329 wrote:
> Why do you think `BR_TABLE` is an indirect branch? It takes destination BBs. The only difference from a simple `BR` or `BR_IF` is it takes variable number of them.
I got this description from the WebAssembly spec:
> Branch instructions come in several flavors:
`br` performs an `unconditional branch`,
`br_if` performs a `conditional branch`, and
`br_table` performs an `indirect branch` through an operand indexing into the label vector that is an immediate to the instruction, or to a default target if the operand is out of bounds.
https://webassembly.github.io/spec/core/syntax/instructions.html#control-instructions
https://github.com/llvm/llvm-project/pull/73391
More information about the llvm-commits
mailing list