brintos

brintos / llvm-project-archived public Read only

0
0
Text · 745 B · 8c7e727 Raw
24 lines · plain
1; RUN: llc  -verify-machineinstrs -relocation-model=pic %s -o - | FileCheck %s2target 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 setjmp6; is properly initialized.7; The test used to fail with the machine verifier complaining8; 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(ptr %tmp) {18entry:19  %tmp9 = call i32 @llvm.eh.sjlj.setjmp(ptr %tmp)20  ret i32 %tmp921}22 23declare i32 @llvm.eh.sjlj.setjmp(ptr)24