brintos

brintos / llvm-project-archived public Read only

0
0
Text · 734 B · 7b32e8c Raw
21 lines · plain
1; RUN: llc -O3 %s -o - | FileCheck %s2target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"3target triple = "aarch64-linux-gnu"4 5; Make sure we correctly lower stack guards even if __stack_chk_guard6; is an alias.  (The alias is created by GlobalMerge.)7; CHECK: adrp {{.*}}, __stack_chk_guard8; CHECK: ldr {{.*}}, [{{.*}}, :lo12:__stack_chk_guard]9; CHECK: __stack_chk_guard = .L_MergedGlobals+410 11@__stack_chk_guard = internal global [8 x i32] zeroinitializer, align 412@x = internal global i32 0, align 413 14define i32 @b() nounwind sspstrong {15entry:16  %z = alloca [10 x i32], align 417  %call = call i32 @a(ptr @__stack_chk_guard, ptr nonnull @x, ptr nonnull %z) #318  ret i32 %call19}20declare i32 @a(ptr, ptr, ptr)21