diff options
| author | Nick Desaulniers <ndesaulniers@google.com> | 2019-09-25 22:28:27 +0000 |
|---|---|---|
| committer | Nick Desaulniers <ndesaulniers@google.com> | 2019-09-25 22:28:27 +0000 |
| commit | 93d87260f1f7b5ec6775fe88891e47a57e6392d6 (patch) | |
| tree | 00cec6aacace958a220e73a6e01671176798fb8b /llvm/docs | |
| parent | 6023cf223446e3f7038d4b867635f47b2d26e194 (diff) | |
| download | bcm5719-llvm-93d87260f1f7b5ec6775fe88891e47a57e6392d6.tar.gz bcm5719-llvm-93d87260f1f7b5ec6775fe88891e47a57e6392d6.zip | |
[Verifier] add invariant check for callbr
Summary:
The list of indirect labels should ALWAYS have their blockaddresses as
argument operands to the callbr (but not necessarily the other way
around). Add an invariant that checks this.
The verifier catches a bad test case that was added recently in r368478.
I think that was a simple mistake, and the test was made less strict in
regards to the precise addresses (as those weren't specifically the
point of the test).
This invariant will be used to find a reported bug.
Link: https://www.spinics.net/lists/arm-kernel/msg753473.html
Link: https://github.com/ClangBuiltLinux/linux/issues/649
Reviewers: craig.topper, void, chandlerc
Reviewed By: void
Subscribers: ychen, lebedev.ri, javed.absar, kristof.beyls, hiraditya, llvm-commits, srhines
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67196
llvm-svn: 372923
Diffstat (limited to 'llvm/docs')
| -rw-r--r-- | llvm/docs/LangRef.rst | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst index ac1db593ac8..59c4469fb9f 100644 --- a/llvm/docs/LangRef.rst +++ b/llvm/docs/LangRef.rst @@ -7070,7 +7070,7 @@ Syntax: :: <result> = callbr [cconv] [ret attrs] [addrspace(<num>)] <ty>|<fnty> <fnptrval>(<function args>) [fn attrs] - [operand bundles] to label <normal label> or jump [other labels] + [operand bundles] to label <normal label> [other labels] Overview: """"""""" @@ -7114,7 +7114,8 @@ This instruction requires several arguments: #. '``normal label``': the label reached when the called function executes a '``ret``' instruction. #. '``other labels``': the labels reached when a callee transfers control - to a location other than the normal '``normal label``' + to a location other than the normal '``normal label``'. The blockaddress + constant for these should also be in the list of '``function args``'. #. The optional :ref:`function attributes <fnattrs>` list. #. The optional :ref:`operand bundles <opbundles>` list. @@ -7136,7 +7137,7 @@ Example: .. code-block:: text callbr void asm "", "r,x"(i32 %x, i8 *blockaddress(@foo, %fail)) - to label %normal or jump [label %fail] + to label %normal [label %fail] .. _i_resume: |

