brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 84bae7f Raw
45 lines · plain
1; RUN: opt -aa-pipeline=globals-aa,basic-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 8; CHECK-LABEL: @main()9define dso_local i32 @main() {10entry:11  %tmp0 = call ptr @llvm.stacksave() #112  %tmp6 = load i8, ptr @deallocCalled, align 113  %tobool = icmp ne i8 %tmp6, 014  br i1 %tobool, label %if.else, label %if.end15 16if.else:                                          ; preds = %entry17  call void @__assert_fail() #018  unreachable19 20; CHECK-LABEL: if.end:21; CHECK-NEXT: call void @llvm.stackrestore22; CHECK-NOT: load i8, ptr @deallocCalled23if.end:                                           ; preds = %entry24  call void @llvm.stackrestore(ptr %tmp0)25  %tmp7 = load i8, ptr @deallocCalled, align 126  %tobool3 = icmp ne i8 %tmp7, 027  br i1 %tobool3, label %if.end6, label %if.else528 29if.else5:                                         ; preds = %if.end30  call void @__assert_fail() #031  unreachable32 33if.end6:                                          ; preds = %if.end34  store i8 0, ptr @deallocCalled, align 135  ret i32 036}37 38declare ptr @llvm.stacksave() #139declare void @llvm.stackrestore(ptr) #140declare dso_local void @__assert_fail() #041 42attributes #0 = { noreturn nosync nounwind }43attributes #1 = { nosync nounwind }44 45