brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · eea54d4 Raw
57 lines · plain
1; RUN: llc -mtriple=thumbv7m-linux-gnu -verify-machineinstrs -o - %s | FileCheck %s --check-prefix=T22; RUN: llc -mtriple=thumbv6m-linux-gnu -verify-machineinstrs -o - %s | FileCheck %s --check-prefix=T13 4declare void @foo(double)5declare i32 @llvm.arm.space(i32, i32)6 7define i32 @test_tbh(i1 %tst, i32 %sw, i32 %l) {8  br label %complex9 10; T2-LABEL: test_tbh:11; T2: [[ANCHOR:.LCPI[0-9_]+]]:12; T2: tbh [pc, r{{[0-9]+}}, lsl #1]13; T2-NEXT: @ %bb.{{[0-9]+}}14; T2-NEXT: LJTI15; T2-NEXT: .short	(.LBB0_[[x:[0-9]+]]-([[ANCHOR]]+4))/216; T2-NEXT: .short	(.LBB0_{{[0-9]+}}-([[ANCHOR]]+4))/217; T2-NEXT: .short	(.LBB0_{{[0-9]+}}-([[ANCHOR]]+4))/218; T2-NEXT: .short	(.LBB0_[[x]]-([[ANCHOR]]+4))/219 20; T1-LABEL: test_tbh:21; T1: lsls [[x:r[0-9]+]], r4, #122; T1: add [[x]], pc23; T1: ldrh [[x]], [[[x]], #4]24; T1: lsls [[x]], [[x]], #125; T1: [[ANCHOR:.LCPI[0-9_]+]]:26; T1: add pc, [[x]]27; T1-NEXT: @ %bb.228; T1-NEXT: .p2align 229; T1-NEXT: LJTI30; T1-NEXT: .short	(.LBB0_[[x:[0-9]+]]-([[ANCHOR]]+4))/231; T1-NEXT: .short	(.LBB0_{{[0-9]+}}-([[ANCHOR]]+4))/232; T1-NEXT: .short	(.LBB0_{{[0-9]+}}-([[ANCHOR]]+4))/233; T1-NEXT: .short	(.LBB0_[[x]]-([[ANCHOR]]+4))/234 35complex:36  call void @foo(double 12345.0)37  switch i32 %sw, label %second [ i32 0, label %other38                                  i32 1, label %third39                                  i32 2, label %end40                                  i32 3, label %other ]41 42second:43  ret i32 4344third:45  call i32 @llvm.arm.space(i32 970, i32 undef)46  ret i32 047 48other:49  call void @bar()50  unreachable51 52end:53  ret i32 4254}55 56declare void @bar()57