Home | History | Annotate | Download | only in PowerPC
      1 ; RUN: llc -filetype=obj <%s | llvm-objdump --disassemble - | FileCheck %s
      2 target datalayout = "e-m:e-i64:64-n32:64"
      3 target triple = "powerpc64le-unknown-linux-gnu"
      4 
      5 @ptr = common global i8* null, align 8
      6 
      7 ; Verify there's no junk between these two instructions from misemitted
      8 ; EH_SjLj_Setup.
      9 
     10 ; CHECK: li 3, 1
     11 ; CHECK: cmplwi	 3, 0
     12 
     13 define void @h() nounwind {
     14   %1 = load i8**, i8*** bitcast (i8** @ptr to i8***), align 8
     15   %2 = tail call i8* @llvm.frameaddress(i32 0)
     16   store i8* %2, i8** %1, align 8
     17   %3 = tail call i8* @llvm.stacksave()
     18   %4 = getelementptr inbounds i8*, i8** %1, i64 2
     19   store i8* %3, i8** %4, align 8
     20   %5 = bitcast i8** %1 to i8*
     21   %6 = tail call i32 @llvm.eh.sjlj.setjmp(i8* %5)
     22   %7 = icmp eq i32 %6, 0
     23   br i1 %7, label %9, label %8
     24 
     25 ; <label>:8:                                      ; preds = %0
     26   tail call void @g()
     27   br label %10
     28 
     29 ; <label>:9:                                      ; preds = %0
     30   tail call void @f()
     31   br label %10
     32 
     33 ; <label>:10:                                     ; preds = %9, %8
     34   ret void
     35 }
     36 
     37 ; Function Attrs: nounwind readnone
     38 declare i8* @llvm.frameaddress(i32)
     39 
     40 ; Function Attrs: nounwind
     41 declare i8* @llvm.stacksave()
     42 
     43 ; Function Attrs: nounwind
     44 declare i32 @llvm.eh.sjlj.setjmp(i8*)
     45 
     46 declare void @g()
     47 
     48 declare void @f()
     49