[PATCH] D119393: [test] Rework memaccess-clobber.ll
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 9 17:06:11 PST 2022
aeubanks created this revision.
Herald added subscribers: asbirlea, george.burgess.iv.
Herald added a reviewer: ctetreau.
Herald added a reviewer: ctetreau.
aeubanks requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Previously memaccess-clobber.ll relied on both legacy PM-specific things
like `-analyze` and MemoryDependenceAnalysis, which are both deprecated.
This uses MemorySSA, which is the cool new thing that a bunch of passes
have migrated to.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D119393
Files:
llvm/test/Instrumentation/HWAddressSanitizer/memaccess-clobber.ll
Index: llvm/test/Instrumentation/HWAddressSanitizer/memaccess-clobber.ll
===================================================================
--- llvm/test/Instrumentation/HWAddressSanitizer/memaccess-clobber.ll
+++ llvm/test/Instrumentation/HWAddressSanitizer/memaccess-clobber.ll
@@ -1,6 +1,6 @@
; Make sure memaccess checks preceed the following reads.
;
-; RUN: opt < %s -S -enable-new-pm=0 -hwasan -hwasan-use-stack-safety=0 -basic-aa -memdep -print-memdeps -analyze -mtriple aarch64-linux-android30 | FileCheck %s
+; RUN: opt < %s -disable-output 2>&1 -passes='hwasan,print<memoryssa>' -hwasan-use-stack-safety=0 -mtriple aarch64-linux-android30 | FileCheck %s
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
target triple = "aarch64--linux-android10000"
@@ -10,11 +10,14 @@
define i32 @test_alloca() sanitize_hwaddress {
entry:
%x = alloca i32, align 4
+ ; CHECK: call void @use32
call void @use32(i32* nonnull %x)
- ; CHECK: Clobber from: call void @llvm.hwasan.check.memaccess.shortgranule
- ; CHECK-NEXT: load i32, i32* %x.hwasan, align 4
+ ; CHECK: [[A:[0-9]+]] = MemoryDef({{[0-9]+}})
+ ; CHECK-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules
+ ; CHECK: MemoryUse([[A]])
+ ; CHECK-NEXT: load i32, i32* %x.hwasan
%y = load i32, i32* %x
- ; CHECK: Clobber from: %y = load i32, i32* %x.hwasan, align 4
- ; CHECK-NEXT: call void @llvm.memset.p0i8.i64(i8* align 1 {{.*}}, i8 0, i64 1, i1 false)
+ ; CHECK: {{[0-9]+}} = MemoryDef([[A]])
+ ; CHECK-NEXT: call void @llvm.memset.p0i8.i64
ret i32 %y
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119393.407354.patch
Type: text/x-patch
Size: 1577 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220210/56fbe5b0/attachment.bin>
More information about the llvm-commits
mailing list