[llvm] [LangRef] callbr result can be used in all successors (PR #91167)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Sun May 5 23:27:26 PDT 2024


https://github.com/nikic created https://github.com/llvm/llvm-project/pull/91167

Originally, the callbr result could only be used on the fallthrough destination. This limitation has been lifted, and the result is now also available on the indirect destinations. However, LangRef was not updated to reflect this.

>From b30b51d183fbef732270808d53e66c8b80614805 Mon Sep 17 00:00:00 2001
From: Nikita Popov <npopov at redhat.com>
Date: Mon, 6 May 2024 15:25:54 +0900
Subject: [PATCH] [LangRef] callbr result can be used in all successors

Originally, the callbr result could only be used on the fallthrough
destination. This limitation has been lifted, and the result is
now also available on the indirect destinations. However, LangRef
was not updated to reflect this.
---
 llvm/docs/LangRef.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst
index 6291a4e57919a5..95937ffd062c6d 100644
--- a/llvm/docs/LangRef.rst
+++ b/llvm/docs/LangRef.rst
@@ -9113,8 +9113,8 @@ instruction in most regards. The primary difference is that it
 establishes an association with additional labels to define where control
 flow goes after the call.
 
-The output values of a '``callbr``' instruction are available only to
-the '``fallthrough``' block, not to any '``indirect``' blocks(s).
+The output values of a '``callbr``' instruction are available both on the
+the '``fallthrough``' block, and any '``indirect``' blocks(s).
 
 The only use of this today is to implement the "goto" feature of gcc inline
 assembly where additional labels can be provided as locations for the inline



More information about the llvm-commits mailing list