168 changes: 84 additions & 84 deletions llvm/test/Instrumentation/MemorySanitizer/sse-intrinsics-x86.ll

Large diffs are not rendered by default.

414 changes: 207 additions & 207 deletions llvm/test/Instrumentation/MemorySanitizer/sse2-intrinsics-x86.ll

Large diffs are not rendered by default.

146 changes: 73 additions & 73 deletions llvm/test/Instrumentation/MemorySanitizer/sse41-intrinsics-x86.ll

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions llvm/test/Instrumentation/MemorySanitizer/store-long-origin.ll
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ target triple = "x86_64-unknown-linux-gnu"

; Test origin for longer stores.

define void @Store8(i64* nocapture %p, i64 %x) sanitize_memory {
define void @Store8(ptr nocapture %p, i64 %x) sanitize_memory {
entry:
store i64 %x, i64* %p, align 8
store i64 %x, ptr %p, align 8
ret void
}

Expand All @@ -20,71 +20,71 @@ entry:
; CHECK: store i64 {{.*}}, align 8
; CHECK: ret void

define void @Store8_align4(i64* nocapture %p, i64 %x) sanitize_memory {
define void @Store8_align4(ptr nocapture %p, i64 %x) sanitize_memory {
entry:
store i64 %x, i64* %p, align 4
store i64 %x, ptr %p, align 4
ret void
}

; Two 4-byte origin stores
; CHECK-LABEL: define void @Store8_align4(
; CHECK: store i64 {{.*}}, align 4
; CHECK: store i32 {{.*}}, align 4
; CHECK: getelementptr i32, i32* {{.*}}, i32 1
; CHECK: getelementptr i32, ptr {{.*}}, i32 1
; CHECK: store i32 {{.*}}, align 4
; CHECK: store i64 {{.*}}, align 4
; CHECK: ret void

%struct.S = type { i32, i32, i32 }

define void @StoreAgg(%struct.S* nocapture %p, %struct.S %x) sanitize_memory {
define void @StoreAgg(ptr nocapture %p, %struct.S %x) sanitize_memory {
entry:
store %struct.S %x, %struct.S* %p, align 4
store %struct.S %x, ptr %p, align 4
ret void
}

; Three 4-byte origin stores
; CHECK-LABEL: define void @StoreAgg(
; CHECK: store { i32, i32, i32 } {{.*}}, align 4
; CHECK: store i32 {{.*}}, align 4
; CHECK: getelementptr i32, i32* {{.*}}, i32 1
; CHECK: getelementptr i32, ptr {{.*}}, i32 1
; CHECK: store i32 {{.*}}, align 4
; CHECK: getelementptr i32, i32* {{.*}}, i32 2
; CHECK: getelementptr i32, ptr {{.*}}, i32 2
; CHECK: store i32 {{.*}}, align 4
; CHECK: store %struct.S {{.*}}, align 4
; CHECK: ret void


define void @StoreAgg8(%struct.S* nocapture %p, %struct.S %x) sanitize_memory {
define void @StoreAgg8(ptr nocapture %p, %struct.S %x) sanitize_memory {
entry:
store %struct.S %x, %struct.S* %p, align 8
store %struct.S %x, ptr %p, align 8
ret void
}

; 8-byte + 4-byte origin stores
; CHECK-LABEL: define void @StoreAgg8(
; CHECK: store { i32, i32, i32 } {{.*}}, align 8
; CHECK: store i64 {{.*}}, align 8
; CHECK: getelementptr i32, i32* {{.*}}, i32 2
; CHECK: getelementptr i32, ptr {{.*}}, i32 2
; CHECK: store i32 {{.*}}, align 8
; CHECK: store %struct.S {{.*}}, align 8
; CHECK: ret void


%struct.Q = type { i64, i64, i64 }
define void @StoreAgg24(%struct.Q* nocapture %p, %struct.Q %x) sanitize_memory {
define void @StoreAgg24(ptr nocapture %p, %struct.Q %x) sanitize_memory {
entry:
store %struct.Q %x, %struct.Q* %p, align 8
store %struct.Q %x, ptr %p, align 8
ret void
}

; 3 8-byte origin stores
; CHECK-LABEL: define void @StoreAgg24(
; CHECK: store { i64, i64, i64 } {{.*}}, align 8
; CHECK: store i64 {{.*}}, align 8
; CHECK: getelementptr i64, i64* {{.*}}, i32 1
; CHECK: getelementptr i64, ptr {{.*}}, i32 1
; CHECK: store i64 {{.*}}, align 8
; CHECK: getelementptr i64, i64* {{.*}}, i32 2
; CHECK: getelementptr i64, ptr {{.*}}, i32 2
; CHECK: store i64 {{.*}}, align 8
; CHECK: store %struct.Q {{.*}}, align 8
; CHECK: ret void
10 changes: 5 additions & 5 deletions llvm/test/Instrumentation/MemorySanitizer/store-origin.ll
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ target triple = "x86_64-unknown-linux-gnu"
; Check that debug info for origin propagation code is set correctly.

; Function Attrs: nounwind
define void @Store(i32* nocapture %p, i32 %x) #0 !dbg !4 {
define void @Store(ptr nocapture %p, i32 %x) #0 !dbg !4 {
entry:
tail call void @llvm.dbg.value(metadata i32* %p, i64 0, metadata !11, metadata !DIExpression()), !dbg !16
tail call void @llvm.dbg.value(metadata ptr %p, i64 0, metadata !11, metadata !DIExpression()), !dbg !16
tail call void @llvm.dbg.value(metadata i32 %x, i64 0, metadata !12, metadata !DIExpression()), !dbg !16
store i32 %x, i32* %p, align 4, !dbg !17, !tbaa !18
store i32 %x, ptr %p, align 4, !dbg !17, !tbaa !18
ret void, !dbg !22
}

Expand Down Expand Up @@ -58,9 +58,9 @@ attributes #1 = { nounwind readnone }
; CHECK-MSAN: [[ORIGIN:%[0-9a-z]+]] = load {{.*}} @__msan_param_origin_tls

; CHECK-KMSAN: %param_shadow
; CHECK-KMSAN: load i32, i32*
; CHECK-KMSAN: load i32, ptr
; CHECK-KMSAN: %param_origin
; CHECK-KMSAN: [[ORIGIN:%[0-9a-z]+]] = load i32, i32*
; CHECK-KMSAN: [[ORIGIN:%[0-9a-z]+]] = load i32, ptr

; CHECK: store {{.*}}!dbg ![[DBG:[0-9]+]]
; CHECK: icmp
Expand Down
30 changes: 15 additions & 15 deletions llvm/test/Instrumentation/MemorySanitizer/str-nobuiltin.ll
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
target triple = "x86_64-unknown-linux-gnu"

declare i8* @memchr(i8* %a, i32 %b, i64 %c)
declare i32 @memcmp(i8* %a, i8* %b, i64 %c)
declare i32 @strcmp(i8* %a, i8* %b)
declare i8* @strcpy(i8* %a, i8* %b)
declare i8* @stpcpy(i8* %a, i8* %b)
declare i64 @strlen(i8* %a)
declare i64 @strnlen(i8* %a, i64 %b)
declare ptr @memchr(ptr %a, i32 %b, i64 %c)
declare i32 @memcmp(ptr %a, ptr %b, i64 %c)
declare i32 @strcmp(ptr %a, ptr %b)
declare ptr @strcpy(ptr %a, ptr %b)
declare ptr @stpcpy(ptr %a, ptr %b)
declare i64 @strlen(ptr %a)
declare i64 @strnlen(ptr %a, i64 %b)

; CHECK: call{{.*}}@memchr{{.*}} #[[ATTR:[0-9]+]]
; CHECK: call{{.*}}@memcmp{{.*}} #[[ATTR]]
Expand All @@ -21,13 +21,13 @@ declare i64 @strnlen(i8* %a, i64 %b)
; CHECK: call{{.*}}@strnlen{{.*}} #[[ATTR]]
; attributes #[[ATTR]] = { nobuiltin }

define void @f1(i8* %a, i8* %b) nounwind uwtable sanitize_memory {
tail call i8* @memchr(i8* %a, i32 1, i64 12)
tail call i32 @memcmp(i8* %a, i8* %b, i64 12)
tail call i32 @strcmp(i8* %a, i8* %b)
tail call i8* @strcpy(i8* %a, i8* %b)
tail call i8* @stpcpy(i8* %a, i8* %b)
tail call i64 @strlen(i8* %a)
tail call i64 @strnlen(i8* %a, i64 12)
define void @f1(ptr %a, ptr %b) nounwind uwtable sanitize_memory {
tail call ptr @memchr(ptr %a, i32 1, i64 12)
tail call i32 @memcmp(ptr %a, ptr %b, i64 12)
tail call i32 @strcmp(ptr %a, ptr %b)
tail call ptr @strcpy(ptr %a, ptr %b)
tail call ptr @stpcpy(ptr %a, ptr %b)
tail call i64 @strlen(ptr %a)
tail call i64 @strnlen(ptr %a, i64 12)
ret void
}
4 changes: 2 additions & 2 deletions llvm/test/Instrumentation/MemorySanitizer/unreachable.ll
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ target triple = "x86_64-unknown-linux-gnu"

; Test that MemorySanitizer correctly handles unreachable blocks.

define i32 @Func(i32* %p) nounwind uwtable {
define i32 @Func(ptr %p) nounwind uwtable {
entry:
br label %exit

unreachable:
%x = load i32, i32* %p
%x = load i32, ptr %p
br label %exit

exit:
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/Instrumentation/MemorySanitizer/unsized_type.ll
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

declare token @llvm.coro.id(i32, i8* readnone, i8* nocapture readonly, i8*)
declare token @llvm.coro.id(i32, ptr readnone, ptr nocapture readonly, ptr)
declare i1 @llvm.coro.alloc(token)

define void @foo() sanitize_memory {
entry:
%id = call token @llvm.coro.id(i32 0, i8* null, i8* null, i8* null)
%id = call token @llvm.coro.id(i32 0, ptr null, ptr null, ptr null)
%dyn.alloc.reqd = call i1 @llvm.coro.alloc(token %id)
ret void
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ define <4 x i32> @testUndef(<4 x i32> %vec, i32 %x) sanitize_memory {
; CHECK: call void @__msan_warning_noreturn
; CHECK: ret <4 x i32>

declare <256 x i16> @llvm.masked.load.v256i16.p0v256i16(<256 x i16>*, i32, <256 x i1>, <256 x i16>)
define <256 x i16> @testCombine(<256 x i16>* %vec, <256 x i1> %mask) sanitize_memory {
%vec1 = call <256 x i16> @llvm.masked.load.v256i16.p0v256i16(<256 x i16>* %vec, i32 16, <256 x i1> %mask, <256 x i16> zeroinitializer)
declare <256 x i16> @llvm.masked.load.v256i16.p0(ptr, i32, <256 x i1>, <256 x i16>)
define <256 x i16> @testCombine(ptr %vec, <256 x i1> %mask) sanitize_memory {
%vec1 = call <256 x i16> @llvm.masked.load.v256i16.p0(ptr %vec, i32 16, <256 x i1> %mask, <256 x i16> zeroinitializer)
ret <256 x i16> %vec1
}
; CHECK-LABEL: @testCombine(
Expand Down