llvm.org GIT mirror llvm / 898f336
Mark 'branch indirect' instruction as an indirect branch. Not having it confused assembly printing of jumptables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141862 91177308-0d34-0410-b5e6-96231b3b80d8 Kalle Raiskila 9 years ago
2 changed file(s) with 10 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
34663466 [/* no pattern */]>;
34673467
34683468 // Indirect branch
3469 def BI:
3470 BIForm<0b00010101100, "bi\t$func", [(brind R32C:$func)]>;
3469 let isIndirectBranch = 1 in {
3470 def BI:
3471 BIForm<0b00010101100, "bi\t$func", [(brind R32C:$func)]>;
3472 }
34713473 }
34723474
34733475 // Conditional branches:
33 entry:
44 ;CHECK: ai {{\$.}}, $3, -1
55 ;CHECK: clgti {{\$., \$.}}, 3
6 ;CHECK: brnz {{\$.}},.LBB0_2
7 switch i32 %param, label %bb1 [
8 i32 1, label %bb3
6 ;CHECK: brnz {{\$.}},.LBB0_
7 switch i32 %param, label %bb2 [
8 i32 1, label %bb1
99 i32 2, label %bb2
1010 i32 3, label %bb3
11 i32 4, label %bb1
11 i32 4, label %bb2
1212 ]
13
13 ;CHECK-NOT: # BB#2
1414 bb1:
1515 ret i32 1
1616 bb2:
1717 ret i32 2
1818 bb3:
19 ret i32 3
19 ret i32 %param
2020 }