• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -mtriple=thumbv7-w64-mingw32 < %s -o - | FileCheck --check-prefix=MINGW %s
2
3declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture)
4declare dso_local void @other(i8*)
5declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture)
6
7define dso_local void @func() sspstrong {
8entry:
9; MINGW-LABEL: func:
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]]]
14; MINGW: bl other
15; MINGW: ldr {{r[0-9]+}}, {{\[}}[[REG2]]]
16; MINGW: bl __stack_chk_fail
17
18  %c = alloca i8, align 1
19  call void @llvm.lifetime.start.p0i8(i64 1, i8* nonnull %c)
20  call void @other(i8* nonnull %c)
21  call void @llvm.lifetime.end.p0i8(i64 1, i8* nonnull %c)
22  ret void
23}
24