brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 1a0b4c6 Raw
53 lines · plain
1; RUN: opt -aa-pipeline=globals-aa -passes='require<globals-aa>,gvn' -S < %s | FileCheck %s2 3target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"4target triple = "x86_64-unknown-linux-gnu"5 6@deallocCalled = internal global i8 0, align 17@.objc_method_list = internal global { ptr } { ptr  @_i_Associated__dealloc }, align 88@._OBJC_CLASS_Associated = global { ptr } { ptr @.objc_method_list }, align 89@._OBJC_INIT_CLASS_Associated = global ptr @._OBJC_CLASS_Associated10@llvm.used = appending global [1 x ptr] [ptr @._OBJC_INIT_CLASS_Associated]11 12define internal ptr @_i_Associated__dealloc() {13entry:14  store i8 1, ptr @deallocCalled, align 115  ret ptr null16}17 18; CHECK-LABEL: @main()19define dso_local i32 @main() {20entry:21  %tmp0 = call ptr @llvm.stacksave() #122  %tmp6 = load i8, ptr @deallocCalled, align 123  %tobool = icmp ne i8 %tmp6, 024  br i1 %tobool, label %if.else, label %if.end25 26if.else:                                          ; preds = %entry27  call void @__assert_fail() #028  unreachable29 30; CHECK-LABEL: if.end:31; CHECK-NEXT: call void @llvm.stackrestore32if.end:                                           ; preds = %entry33  call void @llvm.stackrestore(ptr %tmp0)34  %tmp7 = load i8, ptr @deallocCalled, align 135  %tobool3 = icmp ne i8 %tmp7, 036  br i1 %tobool3, label %if.end6, label %if.else537 38if.else5:                                         ; preds = %if.end39  call void @__assert_fail() #040  unreachable41 42if.end6:                                          ; preds = %if.end43  store i8 0, ptr @deallocCalled, align 144  ret i32 045}46 47declare ptr @llvm.stacksave() #148declare void @llvm.stackrestore(ptr) #149declare dso_local void @__assert_fail() #050 51attributes #0 = { noreturn nounwind }52attributes #1 = { nounwind }53