[PATCH] D119393: [test] Rework memaccess-clobber.ll

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 10 09:14:29 PST 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGbe2227b6c7af: [hwasan][test] Rework memaccess-clobber.ll (authored by aeubanks).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119393/new/

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.407565.patch
Type: text/x-patch
Size: 1577 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220210/9e5a771e/attachment.bin>


More information about the llvm-commits mailing list