• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc  -verify-machineinstrs -relocation-model=pic %s -o - | FileCheck %s
2target datalayout = "e-m:o-p:32:32-f64:32:64-f80:128-n8:16:32-S128"
3target triple = "i386-apple-macosx"
4
5; Check that the register used as base pointer for setjmp
6; is properly initialized.
7; The test used to fail with the machine verifier complaining
8; that the global base pointer is not initialized.
9; PR26742.
10;
11; CHECK: test:
12; CHECK: calll [[BP_SETUP_LABEL:L[$0-9a-zA-Z_-]+]]
13; CHECK: [[BP_SETUP_LABEL]]:
14; CHECK-NEXT: popl [[BP:%[a-z]+]]
15;
16; CHECK: leal [[BLOCK_ADDR:LBB[$0-9a-zA-Z_-]+]]-[[BP_SETUP_LABEL]]([[BP]]),
17define i32 @test(i8* %tmp) {
18entry:
19  %tmp9 = call i32 @llvm.eh.sjlj.setjmp(i8* %tmp)
20  ret i32 %tmp9
21}
22
23declare i32 @llvm.eh.sjlj.setjmp(i8*)
24