[llvm-dev] What instructions end a basic block?

Cranmer, Joshua via llvm-dev llvm-dev at lists.llvm.org
Mon Jan 28 08:44:22 PST 2019

What you are looking for is the list of terminator instructions: https://llvm.org/docs/LangRef.html#terminator-instructions

This is ret, br, switch, indirectbr, unreachable, invoke, resume, catchswitch, catchret, and cleanupret. Note that every instruction from invoke on in that list is related to exception handling.

-----Original Message-----
From: llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] On Behalf Of Peng Yu via llvm-dev
Sent: Monday, January 28, 2019 11:41
To: llvm-dev <llvm-dev at lists.llvm.org>
Subject: [llvm-dev] What instructions end a basic block?


I'd like to understand all the instructions that can end a basic block.

So far, after analyzing a .ll file converted from .bc, I found the following 4 instructions. Are there other instructions that I miss?

- br
- ret
- switch
- unreachable

LLVM Developers mailing list
llvm-dev at lists.llvm.org

More information about the llvm-dev mailing list