Skip to content

Commit 6b9a9cf

Browse files
authored
[msan][test] Add another target("aarch64.svcount") test case (llvm#164343)
This shows a crash that happens because MSan tries to check the shadow of a target("aarch64.svcount")-sized argument. This is the followup to llvm#164315. This also does a drive-by fix of those test cases, to remove FileCheck (otherwise, even if opt passed, the test would still XFAIL because FileCheck cannot find any CHECK: assertions). Forked from llvm/test/CodeGen/AArch64/sme2-intrinsics-add.ll
1 parent d55b10a commit 6b9a9cf

File tree

4 files changed

+358
-2
lines changed

4 files changed

+358
-2
lines changed

llvm/test/Instrumentation/MemorySanitizer/AArch64/sme-aarch64-svcount-mini.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2-
; RUN: opt -S -passes=msan -mattr=+sme -o - %s | FileCheck %s
2+
; RUN: opt -S -passes=msan -mattr=+sme -o - %s
33

44
; XFAIL: *
55

llvm/test/Instrumentation/MemorySanitizer/AArch64/sme-aarch64-svcount.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2-
; RUN: opt -S -passes=msan -mattr=+sme -o - %s | FileCheck %s
2+
; RUN: opt -S -passes=msan -mattr=+sme -o - %s
33

44
; XFAIL: *
55

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2+
; RUN: opt -S -passes=msan -mattr=+sme2 -mattr=+sme-i16i64 -mattr=+sme-f64f64 -o - %s
3+
4+
; XFAIL: *
5+
6+
; Forked from llvm/test/CodeGen/AArch64/sme2-intrinsics-add.ll
7+
; Manually reduced to show MSan leads to a compiler crash
8+
9+
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
10+
target triple = "aarch64--linux-android9001"
11+
12+
define void @multi_vector_add_za_vg1x4_f32_tuple(i64 %stride, ptr %ptr) sanitize_memory {
13+
%1 = tail call target("aarch64.svcount") @llvm.aarch64.sve.ptrue.c8()
14+
%2 = tail call { <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float> } @llvm.aarch64.sve.ld1.pn.x4.nxv4f32(target("aarch64.svcount") %1, ptr %ptr)
15+
ret void
16+
}

0 commit comments

Comments
 (0)