1 ; RUN: llc < %s -mtriple=arm-none-linux-gnueabi
4 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64"
5 %struct.ArmPTD = type { i32 }
6 %struct.RegisterSave = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
7 %struct.SHARED_AREA = type { i32, ptr, ptr, ptr, %struct.ArmPTD, ptr, ptr, i32, [1024 x i8], i32, i32, i32, i32, i32, i8, i8, i16, i32, i32, i32, i32, [16 x i8], i32, i32, i32, i8, i8, i8, i32, i16, i32, i64, i32, i32, i32, i32, i32, i32, ptr, i32, [256 x i8], i32, i32, i32, [20 x i8], %struct.RegisterSave, { %struct.WorldSwitchV5 }, [4 x i32] }
8 %struct.WorldSwitchV5 = type { i32, i32, i32, i32, i32, i32, i32 }
10 define void @SomeCall(i32 %num) nounwind {
12 tail call void asm sideeffect "mcr p15, 0, $0, c7, c10, 4 \0A\09", "r,~{memory}"(i32 0) nounwind
13 tail call void asm sideeffect "mcr p15,0,$0,c7,c14,0", "r,~{memory}"(i32 0) nounwind
14 %0 = load ptr, ptr null, align 4 ; <ptr> [#uses=1]
15 %1 = ptrtoint ptr %0 to i32 ; <i32> [#uses=1]
16 %2 = lshr i32 %1, 20 ; <i32> [#uses=1]
17 %3 = tail call i32 @SetCurrEntry(i32 %2, i32 0) nounwind ; <i32> [#uses=0]
18 tail call void @ClearStuff(i32 0) nounwind
22 declare i32 @SetCurrEntry(i32, i32)
24 declare void @ClearStuff(i32)