Skip to content

Commit 7b03354

Browse files
committed
updatetests
1 parent 92c419c commit 7b03354

File tree

12 files changed

+378
-798
lines changed

12 files changed

+378
-798
lines changed

llvm/test/Instrumentation/MemorySanitizer/i386/avx-intrinsics-i386.ll

Lines changed: 83 additions & 146 deletions
Large diffs are not rendered by default.

llvm/test/Instrumentation/MemorySanitizer/i386/avx2-intrinsics-i386.ll

Lines changed: 102 additions & 201 deletions
Large diffs are not rendered by default.

llvm/test/Instrumentation/MemorySanitizer/i386/mmx-intrinsics.ll

Lines changed: 34 additions & 129 deletions
Large diffs are not rendered by default.

llvm/test/Instrumentation/MemorySanitizer/i386/msan_i386_bts_asm.ll

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ define dso_local i32 @main() sanitize_memory {
1919
; CHECK-NEXT: [[PARAM_ORIGIN:%.*]] = getelementptr { [100 x i64], [100 x i64], [100 x i64], [100 x i64], i64, [200 x i32], i32, i32 }, ptr [[TMP0]], i32 0, i32 5
2020
; CHECK-NEXT: [[RETVAL_ORIGIN:%.*]] = getelementptr { [100 x i64], [100 x i64], [100 x i64], [100 x i64], i64, [200 x i32], i32, i32 }, ptr [[TMP0]], i32 0, i32 6
2121
; CHECK-NEXT: [[TMP18:%.*]] = load i64, ptr [[VA_ARG_OVERFLOW_SIZE]], align 8
22-
; CHECK-NEXT: [[TMP19:%.*]] = add i64 0, [[TMP18]]
2322
; CHECK-NEXT: call void @llvm.donothing()
2423
; CHECK-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
2524
; CHECK-NEXT: call void @__msan_poison_alloca(ptr [[RETVAL]], i64 4, ptr @[[GLOB0:[0-9]+]])
@@ -58,11 +57,11 @@ define dso_local i32 @main() sanitize_memory {
5857
; CHECK-NEXT: [[_MSLD:%.*]] = load i64, ptr [[TMP15]], align 8
5958
; CHECK-NEXT: [[TMP17:%.*]] = load i32, ptr [[TMP16]], align 8
6059
; CHECK-NEXT: [[_MSCMP:%.*]] = icmp ne i64 [[_MSLD]], 0
61-
; CHECK-NEXT: br i1 [[_MSCMP]], label %[[BB20:.*]], label %[[BB21:.*]], !prof [[PROF1:![0-9]+]]
62-
; CHECK: [[BB20]]:
60+
; CHECK-NEXT: br i1 [[_MSCMP]], label %[[BB19:.*]], label %[[BB20:.*]], !prof [[PROF1:![0-9]+]]
61+
; CHECK: [[BB19]]:
6362
; CHECK-NEXT: call void @__msan_warning(i32 [[TMP17]]) #[[ATTR2:[0-9]+]]
64-
; CHECK-NEXT: br label %[[BB21]]
65-
; CHECK: [[BB21]]:
63+
; CHECK-NEXT: br label %[[BB20]]
64+
; CHECK: [[BB20]]:
6665
; CHECK-NEXT: call void asm "btsq $2, $1
6766
; CHECK-NEXT: [[TMP20:%.*]] = load i8, ptr [[BIT]], align 1
6867
; CHECK-NEXT: [[TMP21:%.*]] = call { ptr, ptr } @__msan_metadata_ptr_for_load_1(ptr [[BIT]])
@@ -72,11 +71,11 @@ define dso_local i32 @main() sanitize_memory {
7271
; CHECK-NEXT: [[TMP24:%.*]] = load i32, ptr [[TMP23]], align 4
7372
; CHECK-NEXT: [[_MSPROP:%.*]] = trunc i8 [[_MSLD1]] to i1
7473
; CHECK-NEXT: [[TOBOOL:%.*]] = trunc i8 [[TMP20]] to i1
75-
; CHECK-NEXT: br i1 [[_MSPROP]], label %[[BB27:.*]], label %[[BB28:.*]], !prof [[PROF1]]
76-
; CHECK: [[BB27]]:
74+
; CHECK-NEXT: br i1 [[_MSPROP]], label %[[BB26:.*]], label %[[BB27:.*]], !prof [[PROF1]]
75+
; CHECK: [[BB26]]:
7776
; CHECK-NEXT: call void @__msan_warning(i32 [[TMP24]]) #[[ATTR2]]
78-
; CHECK-NEXT: br label %[[BB28]]
79-
; CHECK: [[BB28]]:
77+
; CHECK-NEXT: br label %[[BB27]]
78+
; CHECK: [[BB27]]:
8079
; CHECK-NEXT: br i1 [[TOBOOL]], label %[[IF_THEN:.*]], label %[[IF_ELSE:.*]]
8180
; CHECK: [[IF_THEN]]:
8281
; CHECK-NEXT: store i32 0, ptr [[RETVAL_SHADOW]], align 8
@@ -97,7 +96,6 @@ define dso_local i32 @main() sanitize_memory {
9796
; CONS-NEXT: [[PARAM_ORIGIN:%.*]] = getelementptr { [100 x i64], [100 x i64], [100 x i64], [100 x i64], i64, [200 x i32], i32, i32 }, ptr [[TMP0]], i32 0, i32 5
9897
; CONS-NEXT: [[RETVAL_ORIGIN:%.*]] = getelementptr { [100 x i64], [100 x i64], [100 x i64], [100 x i64], i64, [200 x i32], i32, i32 }, ptr [[TMP0]], i32 0, i32 6
9998
; CONS-NEXT: [[TMP18:%.*]] = load i64, ptr [[VA_ARG_OVERFLOW_SIZE]], align 8
100-
; CONS-NEXT: [[TMP19:%.*]] = add i64 0, [[TMP18]]
10199
; CONS-NEXT: call void @llvm.donothing()
102100
; CONS-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
103101
; CONS-NEXT: call void @__msan_poison_alloca(ptr [[RETVAL]], i64 4, ptr @[[GLOB0:[0-9]+]])
@@ -138,11 +136,11 @@ define dso_local i32 @main() sanitize_memory {
138136
; CONS-NEXT: call void @__msan_instrument_asm_store(ptr [[BIT]], i64 1)
139137
; CONS-NEXT: call void @__msan_instrument_asm_store(ptr [[ADDR]], i64 8)
140138
; CONS-NEXT: [[_MSCMP:%.*]] = icmp ne i64 [[_MSLD]], 0
141-
; CONS-NEXT: br i1 [[_MSCMP]], label %[[BB20:.*]], label %[[BB21:.*]], !prof [[PROF1:![0-9]+]]
142-
; CONS: [[BB20]]:
139+
; CONS-NEXT: br i1 [[_MSCMP]], label %[[BB19:.*]], label %[[BB20:.*]], !prof [[PROF1:![0-9]+]]
140+
; CONS: [[BB19]]:
143141
; CONS-NEXT: call void @__msan_warning(i32 [[TMP17]]) #[[ATTR2:[0-9]+]]
144-
; CONS-NEXT: br label %[[BB21]]
145-
; CONS: [[BB21]]:
142+
; CONS-NEXT: br label %[[BB20]]
143+
; CONS: [[BB20]]:
146144
; CONS-NEXT: call void asm "btsq $2, $1
147145
; CONS-NEXT: [[TMP20:%.*]] = load i8, ptr [[BIT]], align 1
148146
; CONS-NEXT: [[TMP21:%.*]] = call { ptr, ptr } @__msan_metadata_ptr_for_load_1(ptr [[BIT]])
@@ -152,11 +150,11 @@ define dso_local i32 @main() sanitize_memory {
152150
; CONS-NEXT: [[TMP24:%.*]] = load i32, ptr [[TMP23]], align 4
153151
; CONS-NEXT: [[_MSPROP:%.*]] = trunc i8 [[_MSLD1]] to i1
154152
; CONS-NEXT: [[TOBOOL:%.*]] = trunc i8 [[TMP20]] to i1
155-
; CONS-NEXT: br i1 [[_MSPROP]], label %[[BB27:.*]], label %[[BB28:.*]], !prof [[PROF1]]
156-
; CONS: [[BB27]]:
153+
; CONS-NEXT: br i1 [[_MSPROP]], label %[[BB26:.*]], label %[[BB27:.*]], !prof [[PROF1]]
154+
; CONS: [[BB26]]:
157155
; CONS-NEXT: call void @__msan_warning(i32 [[TMP24]]) #[[ATTR2]]
158-
; CONS-NEXT: br label %[[BB28]]
159-
; CONS: [[BB28]]:
156+
; CONS-NEXT: br label %[[BB27]]
157+
; CONS: [[BB27]]:
160158
; CONS-NEXT: br i1 [[TOBOOL]], label %[[IF_THEN:.*]], label %[[IF_ELSE:.*]]
161159
; CONS: [[IF_THEN]]:
162160
; CONS-NEXT: store i32 0, ptr [[RETVAL_SHADOW]], align 8

llvm/test/Instrumentation/MemorySanitizer/i386/msan_i386intrinsics.ll

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ define void @StoreIntrinsic(ptr %p, <4 x float> %x) nounwind uwtable sanitize_me
1313
; CHECK-LABEL: define void @StoreIntrinsic(
1414
; CHECK-SAME: ptr [[P:%.*]], <4 x float> [[X:%.*]]) #[[ATTR0:[0-9]+]] {
1515
; CHECK-NEXT: [[TMP5:%.*]] = load i64, ptr @__msan_va_arg_overflow_size_tls, align 8
16-
; CHECK-NEXT: [[TMP6:%.*]] = add i64 0, [[TMP5]]
1716
; CHECK-NEXT: [[TMP1:%.*]] = load <4 x i32>, ptr inttoptr (i64 add (i64 ptrtoint (ptr @__msan_param_tls to i64), i64 8) to ptr), align 8
1817
; CHECK-NEXT: call void @llvm.donothing()
1918
; CHECK-NEXT: [[TMP2:%.*]] = ptrtoint ptr [[P]] to i64
@@ -26,7 +25,6 @@ define void @StoreIntrinsic(ptr %p, <4 x float> %x) nounwind uwtable sanitize_me
2625
; ORIGINS-LABEL: define void @StoreIntrinsic(
2726
; ORIGINS-SAME: ptr [[P:%.*]], <4 x float> [[X:%.*]]) #[[ATTR0:[0-9]+]] {
2827
; ORIGINS-NEXT: [[TMP10:%.*]] = load i64, ptr @__msan_va_arg_overflow_size_tls, align 8
29-
; ORIGINS-NEXT: [[TMP14:%.*]] = add i64 0, [[TMP10]]
3028
; ORIGINS-NEXT: [[TMP1:%.*]] = load <4 x i32>, ptr inttoptr (i64 add (i64 ptrtoint (ptr @__msan_param_tls to i64), i64 8) to ptr), align 8
3129
; ORIGINS-NEXT: [[TMP2:%.*]] = load i32, ptr inttoptr (i64 add (i64 ptrtoint (ptr @__msan_param_origin_tls to i64), i64 8) to ptr), align 4
3230
; ORIGINS-NEXT: call void @llvm.donothing()
@@ -39,17 +37,17 @@ define void @StoreIntrinsic(ptr %p, <4 x float> %x) nounwind uwtable sanitize_me
3937
; ORIGINS-NEXT: store <4 x i32> [[TMP1]], ptr [[TMP5]], align 1
4038
; ORIGINS-NEXT: [[TMP9:%.*]] = bitcast <4 x i32> [[TMP1]] to i128
4139
; ORIGINS-NEXT: [[_MSCMP:%.*]] = icmp ne i128 [[TMP9]], 0
42-
; ORIGINS-NEXT: br i1 [[_MSCMP]], label %[[BB12:.*]], label %[[BB16:.*]], !prof [[PROF1:![0-9]+]]
43-
; ORIGINS: [[BB12]]:
40+
; ORIGINS-NEXT: br i1 [[_MSCMP]], label %[[BB11:.*]], label %[[BB15:.*]], !prof [[PROF1:![0-9]+]]
41+
; ORIGINS: [[BB11]]:
4442
; ORIGINS-NEXT: store i32 [[TMP2]], ptr [[TMP8]], align 4
4543
; ORIGINS-NEXT: [[TMP11:%.*]] = getelementptr i32, ptr [[TMP8]], i32 1
4644
; ORIGINS-NEXT: store i32 [[TMP2]], ptr [[TMP11]], align 4
4745
; ORIGINS-NEXT: [[TMP12:%.*]] = getelementptr i32, ptr [[TMP8]], i32 2
4846
; ORIGINS-NEXT: store i32 [[TMP2]], ptr [[TMP12]], align 4
4947
; ORIGINS-NEXT: [[TMP13:%.*]] = getelementptr i32, ptr [[TMP8]], i32 3
5048
; ORIGINS-NEXT: store i32 [[TMP2]], ptr [[TMP13]], align 4
51-
; ORIGINS-NEXT: br label %[[BB16]]
52-
; ORIGINS: [[BB16]]:
49+
; ORIGINS-NEXT: br label %[[BB15]]
50+
; ORIGINS: [[BB15]]:
5351
; ORIGINS-NEXT: store <4 x float> [[X]], ptr [[P]], align 1
5452
; ORIGINS-NEXT: ret void
5553
;
@@ -67,7 +65,6 @@ define <16 x i8> @LoadIntrinsic(ptr %p) nounwind uwtable sanitize_memory {
6765
; CHECK-LABEL: define <16 x i8> @LoadIntrinsic(
6866
; CHECK-SAME: ptr [[P:%.*]]) #[[ATTR0]] {
6967
; CHECK-NEXT: [[TMP4:%.*]] = load i64, ptr @__msan_va_arg_overflow_size_tls, align 8
70-
; CHECK-NEXT: [[TMP5:%.*]] = add i64 0, [[TMP4]]
7168
; CHECK-NEXT: call void @llvm.donothing()
7269
; CHECK-NEXT: [[TMP1:%.*]] = ptrtoint ptr [[P]] to i64
7370
; CHECK-NEXT: [[TMP2:%.*]] = and i64 [[TMP1]], -2147483649
@@ -80,7 +77,6 @@ define <16 x i8> @LoadIntrinsic(ptr %p) nounwind uwtable sanitize_memory {
8077
; ORIGINS-LABEL: define <16 x i8> @LoadIntrinsic(
8178
; ORIGINS-SAME: ptr [[P:%.*]]) #[[ATTR0]] {
8279
; ORIGINS-NEXT: [[TMP8:%.*]] = load i64, ptr @__msan_va_arg_overflow_size_tls, align 8
83-
; ORIGINS-NEXT: [[TMP9:%.*]] = add i64 0, [[TMP8]]
8480
; ORIGINS-NEXT: call void @llvm.donothing()
8581
; ORIGINS-NEXT: [[TMP1:%.*]] = ptrtoint ptr [[P]] to i64
8682
; ORIGINS-NEXT: [[TMP2:%.*]] = and i64 [[TMP1]], -2147483649
@@ -113,7 +109,6 @@ define <8 x i16> @Pmulhuw128(<8 x i16> %a, <8 x i16> %b) nounwind uwtable saniti
113109
; CHECK-NEXT: [[TMP1:%.*]] = load <8 x i16>, ptr @__msan_param_tls, align 8
114110
; CHECK-NEXT: [[TMP2:%.*]] = load <8 x i16>, ptr inttoptr (i64 add (i64 ptrtoint (ptr @__msan_param_tls to i64), i64 16) to ptr), align 8
115111
; CHECK-NEXT: [[TMP3:%.*]] = load i64, ptr @__msan_va_arg_overflow_size_tls, align 8
116-
; CHECK-NEXT: [[TMP4:%.*]] = add i64 0, [[TMP3]]
117112
; CHECK-NEXT: call void @llvm.donothing()
118113
; CHECK-NEXT: [[_MSPROP:%.*]] = or <8 x i16> [[TMP1]], [[TMP2]]
119114
; CHECK-NEXT: [[CALL:%.*]] = call <8 x i16> @llvm.x86.sse2.pmulhu.w(<8 x i16> [[A]], <8 x i16> [[B]])
@@ -127,7 +122,6 @@ define <8 x i16> @Pmulhuw128(<8 x i16> %a, <8 x i16> %b) nounwind uwtable saniti
127122
; ORIGINS-NEXT: [[TMP3:%.*]] = load <8 x i16>, ptr inttoptr (i64 add (i64 ptrtoint (ptr @__msan_param_tls to i64), i64 16) to ptr), align 8
128123
; ORIGINS-NEXT: [[TMP4:%.*]] = load i32, ptr inttoptr (i64 add (i64 ptrtoint (ptr @__msan_param_origin_tls to i64), i64 16) to ptr), align 4
129124
; ORIGINS-NEXT: [[TMP8:%.*]] = load i64, ptr @__msan_va_arg_overflow_size_tls, align 8
130-
; ORIGINS-NEXT: [[TMP9:%.*]] = add i64 0, [[TMP8]]
131125
; ORIGINS-NEXT: call void @llvm.donothing()
132126
; ORIGINS-NEXT: [[_MSPROP:%.*]] = or <8 x i16> [[TMP1]], [[TMP3]]
133127
; ORIGINS-NEXT: [[TMP5:%.*]] = bitcast <8 x i16> [[TMP3]] to i128

0 commit comments

Comments
 (0)