brintos

brintos / llvm-project-archived public Read only

0
0
Text · 990 B · 5183b62 Raw
31 lines · plain
1; Regression test for a compiler bug that caused a crash when instrumenting code2; using musttail.3 4; RUN: opt -S -passes=hwasan -hwasan-use-stack-safety=0 %s -o - | FileCheck %s5 6target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"7target triple = "aarch64"8 9define dso_local noundef i32 @_Z3bari(i32 noundef %0) sanitize_hwaddress {10  %2 = alloca i32, align 411  store i32 %0, ptr %2, align 412  %3 = load i32, ptr %2, align 413  ret i32 %314}15 16define dso_local noundef i32 @_Z3fooi(i32 noundef %0) sanitize_hwaddress {17  %2 = alloca i32, align 418  %3 = alloca i32, align 419  store i32 %0, ptr %2, align 420  store volatile i32 5, ptr %3, align 421  %4 = load i32, ptr %2, align 422  %5 = load volatile i32, ptr %3, align 423  %6 = add nsw i32 %4, %524  ; Check we untag before the musttail.25  ; CHECK: call void @llvm.memset.p0.i6426  ; CHECK: musttail call27  ; CHECK-NOT: call void @llvm.memset.p0.i6428  %7 = musttail call noundef i32 @_Z3bari(i32 noundef %6)29  ret i32 %730}31