[LLVMdev] Syntax of 'br', 'switch' and 'indirectbr'
Jianzhou Zhao
jianzhou at seas.upenn.edu
Sat Mar 6 21:18:43 PST 2010
Hi,
The 'br' instruction has the syntax:
br i1 <cond>, label <iftrue>, label <iffalse>
br label <dest> ;
Unconditional branch
If we know <cond>'s type must be 'i1', <iftrue><iffalse><dest> have to
be of type 'label',
why does the syntax have to specify them? lib/AsmParser/LLParser.cpp
also checks
these restrictions when reading a *.ll.
I have the same questions for the 'label type' of 'switch' and 'indirectbr'.
Thanks.
--
Jianzhou
More information about the llvm-dev
mailing list