1 ; RUN: llc -mtriple=thumbv7m-linux-gnu -verify-machineinstrs -o - %s | FileCheck %s --check-prefix=T2
2 ; RUN: llc -mtriple=thumbv6m-linux-gnu -verify-machineinstrs -o - %s | FileCheck %s --check-prefix=T1
4 declare void @foo(double)
5 declare i32 @llvm.arm.space(i32, i32)
7 define i32 @test_tbh(i1 %tst, i32 %sw, i32 %l) {
11 ; T2: [[ANCHOR:.LCPI[0-9_]+]]:
12 ; T2: tbh [pc, r{{[0-9]+}}, lsl #1]
13 ; T2-NEXT: @ %bb.{{[0-9]+}}
15 ; T2-NEXT: .short (.LBB0_[[x:[0-9]+]]-([[ANCHOR]]+4))/2
16 ; T2-NEXT: .short (.LBB0_{{[0-9]+}}-([[ANCHOR]]+4))/2
17 ; T2-NEXT: .short (.LBB0_{{[0-9]+}}-([[ANCHOR]]+4))/2
18 ; T2-NEXT: .short (.LBB0_[[x]]-([[ANCHOR]]+4))/2
21 ; T1: lsls [[x:r[0-9]+]], r4, #1
23 ; T1: ldrh [[x]], {{\[}}[[x]], #4]
24 ; T1: lsls [[x]], [[x]], #1
25 ; T1: [[ANCHOR:.LCPI[0-9_]+]]:
30 ; T1-NEXT: .short (.LBB0_[[x:[0-9]+]]-([[ANCHOR]]+4))/2
31 ; T1-NEXT: .short (.LBB0_{{[0-9]+}}-([[ANCHOR]]+4))/2
32 ; T1-NEXT: .short (.LBB0_{{[0-9]+}}-([[ANCHOR]]+4))/2
33 ; T1-NEXT: .short (.LBB0_[[x]]-([[ANCHOR]]+4))/2
36 call void @foo(double 12345.0)
37 switch i32 %sw, label %second [ i32 0, label %other
45 call i32 @llvm.arm.space(i32 970, i32 undef)