1 ; RUN: llc -mtriple=thumbv7-w64-mingw32 < %s -o - | FileCheck --check-prefix=MINGW %s
3 declare void @llvm.lifetime.start.p0(i64, ptr nocapture)
4 declare dso_local void @other(ptr)
5 declare void @llvm.lifetime.end.p0(i64, ptr nocapture)
7 define dso_local void @func() sspstrong {
10 ; MINGW: movw [[REG:r[0-9]+]], :lower16:.refptr.__stack_chk_guard
11 ; MINGW: movt [[REG]], :upper16:.refptr.__stack_chk_guard
12 ; MINGW: ldr [[REG2:r[0-9]+]], [[[REG]]]
13 ; MINGW: ldr {{r[0-9]+}}, [[[REG2]]]
15 ; MINGW: movw [[REG3:r[0-9]+]], :lower16:.refptr.__stack_chk_guard
16 ; MINGW: movt [[REG3]], :upper16:.refptr.__stack_chk_guard
17 ; MINGW: ldr [[REG4:r[0-9]+]], [[[REG3]]]
18 ; MINGW: ldr {{r[0-9]+}}, [[[REG4]]]
19 ; MINGW: bl __stack_chk_fail
21 %c = alloca i8, align 1
22 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %c)
23 call void @other(ptr nonnull %c)
24 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %c)