summaryrefslogtreecommitdiffstats
path: root/test/Instrumentation
diff options
context:
space:
mode:
authorPirama Arumuga Nainar <pirama@google.com>2015-04-08 08:55:49 -0700
committerPirama Arumuga Nainar <pirama@google.com>2015-04-09 15:04:38 -0700
commit4c5e43da7792f75567b693105cc53e3f1992ad98 (patch)
tree1b2c9792582e12f5af0b1512e3094425f0dc0df9 /test/Instrumentation
parentc75239e6119d0f9a74c57099d91cbc9bde56bf33 (diff)
downloadexternal_llvm-4c5e43da7792f75567b693105cc53e3f1992ad98.zip
external_llvm-4c5e43da7792f75567b693105cc53e3f1992ad98.tar.gz
external_llvm-4c5e43da7792f75567b693105cc53e3f1992ad98.tar.bz2
Update aosp/master llvm for rebase to r233350
Change-Id: I07d935f8793ee8ec6b7da003f6483046594bca49
Diffstat (limited to 'test/Instrumentation')
-rw-r--r--test/Instrumentation/AddressSanitizer/X86/bug_11395.ll10
-rw-r--r--test/Instrumentation/AddressSanitizer/asan-vs-gvn.ll8
-rw-r--r--test/Instrumentation/AddressSanitizer/basic.ll14
-rw-r--r--test/Instrumentation/AddressSanitizer/debug_info.ll42
-rw-r--r--test/Instrumentation/AddressSanitizer/do-not-instrument-promotable-allocas.ll21
-rw-r--r--test/Instrumentation/AddressSanitizer/experiment-call.ll113
-rw-r--r--test/Instrumentation/AddressSanitizer/experiment.ll113
-rw-r--r--test/Instrumentation/AddressSanitizer/freebsd.ll2
-rw-r--r--test/Instrumentation/AddressSanitizer/global_metadata.ll4
-rw-r--r--test/Instrumentation/AddressSanitizer/instrument-dynamic-allocas.ll5
-rw-r--r--test/Instrumentation/AddressSanitizer/instrument-stack.ll48
-rw-r--r--test/Instrumentation/AddressSanitizer/instrument_global.ll10
-rw-r--r--test/Instrumentation/AddressSanitizer/instrument_load_then_store.ll2
-rw-r--r--test/Instrumentation/AddressSanitizer/instrumentation-with-call-threshold.ll8
-rw-r--r--test/Instrumentation/AddressSanitizer/lifetime-uar.ll4
-rw-r--r--test/Instrumentation/AddressSanitizer/lifetime.ll5
-rw-r--r--test/Instrumentation/AddressSanitizer/stack-poisoning.ll4
-rw-r--r--test/Instrumentation/AddressSanitizer/stack_dynamic_alloca.ll6
-rw-r--r--test/Instrumentation/AddressSanitizer/stack_layout.ll18
-rw-r--r--test/Instrumentation/AddressSanitizer/test64.ll2
-rw-r--r--test/Instrumentation/AddressSanitizer/ubsan.ll8
-rw-r--r--test/Instrumentation/BoundsChecking/many-trap.ll4
-rw-r--r--test/Instrumentation/BoundsChecking/phi.ll24
-rw-r--r--test/Instrumentation/BoundsChecking/simple-32.ll8
-rw-r--r--test/Instrumentation/BoundsChecking/simple.ll48
-rw-r--r--test/Instrumentation/DataFlowSanitizer/abilist.ll12
-rw-r--r--test/Instrumentation/DataFlowSanitizer/debug-nonzero-labels.ll4
-rw-r--r--test/Instrumentation/DataFlowSanitizer/debug.ll16
-rw-r--r--test/Instrumentation/DataFlowSanitizer/load.ll58
-rw-r--r--test/Instrumentation/DataFlowSanitizer/store.ll52
-rw-r--r--test/Instrumentation/InstrProfiling/linkage.ll10
-rw-r--r--test/Instrumentation/InstrProfiling/noruntime.ll4
-rw-r--r--test/Instrumentation/InstrProfiling/platform.ll2
-rw-r--r--test/Instrumentation/InstrProfiling/profiling.ll10
-rw-r--r--test/Instrumentation/MemorySanitizer/array_types.ll16
-rw-r--r--test/Instrumentation/MemorySanitizer/atomics.ll24
-rw-r--r--test/Instrumentation/MemorySanitizer/check_access_address.ll4
-rw-r--r--test/Instrumentation/MemorySanitizer/instrumentation-with-call-threshold.ll2
-rw-r--r--test/Instrumentation/MemorySanitizer/missing_origin.ll2
-rw-r--r--test/Instrumentation/MemorySanitizer/msan_basic.ll62
-rw-r--r--test/Instrumentation/MemorySanitizer/store-long-origin.ll12
-rw-r--r--test/Instrumentation/MemorySanitizer/store-origin.ll24
-rw-r--r--test/Instrumentation/MemorySanitizer/unreachable.ll2
-rw-r--r--test/Instrumentation/MemorySanitizer/vector_cvt.ll2
-rw-r--r--test/Instrumentation/SanitizerCoverage/cmp-tracing.ll13
-rw-r--r--test/Instrumentation/SanitizerCoverage/coverage-dbg.ll30
-rw-r--r--test/Instrumentation/SanitizerCoverage/coverage.ll33
-rw-r--r--test/Instrumentation/SanitizerCoverage/coverage2-dbg.ll22
-rw-r--r--test/Instrumentation/ThreadSanitizer/atomic.ll40
-rw-r--r--test/Instrumentation/ThreadSanitizer/capture.ll4
-rw-r--r--test/Instrumentation/ThreadSanitizer/no_sanitize_thread.ll8
-rw-r--r--test/Instrumentation/ThreadSanitizer/read_before_write.ll4
-rw-r--r--test/Instrumentation/ThreadSanitizer/read_from_global.ll12
-rw-r--r--test/Instrumentation/ThreadSanitizer/tsan-vs-gvn.ll4
-rw-r--r--test/Instrumentation/ThreadSanitizer/tsan_basic.ll4
-rw-r--r--test/Instrumentation/ThreadSanitizer/unaligned.ll20
-rw-r--r--test/Instrumentation/ThreadSanitizer/vptr_read.ll2
57 files changed, 701 insertions, 344 deletions
diff --git a/test/Instrumentation/AddressSanitizer/X86/bug_11395.ll b/test/Instrumentation/AddressSanitizer/X86/bug_11395.ll
index 3f944c3..dc943fe 100644
--- a/test/Instrumentation/AddressSanitizer/X86/bug_11395.ll
+++ b/test/Instrumentation/AddressSanitizer/X86/bug_11395.ll
@@ -38,7 +38,7 @@ target triple = "i386-unknown-linux-gnu"
define void @ff_mlp_init_x86(%struct.DSPContext* nocapture %c, %struct.AVCodecContext* nocapture %avctx) nounwind sanitize_address {
entry:
- %mlp_filter_channel = getelementptr inbounds %struct.DSPContext* %c, i32 0, i32 131
+ %mlp_filter_channel = getelementptr inbounds %struct.DSPContext, %struct.DSPContext* %c, i32 0, i32 131
store void (i32*, i32*, i32, i32, i32, i32, i32, i32*)* @mlp_filter_channel_x86, void (i32*, i32*, i32, i32, i32, i32, i32, i32*)** %mlp_filter_channel, align 4, !tbaa !0
ret void
}
@@ -52,11 +52,11 @@ entry:
%iirjump = alloca i8*, align 4
store i32 %filter_shift, i32* %filter_shift.addr, align 4, !tbaa !3
store i32 %mask, i32* %mask.addr, align 4, !tbaa !3
- %arrayidx = getelementptr inbounds [9 x i8*]* @firtable, i32 0, i32 %firorder
- %0 = load i8** %arrayidx, align 4, !tbaa !0
+ %arrayidx = getelementptr inbounds [9 x i8*], [9 x i8*]* @firtable, i32 0, i32 %firorder
+ %0 = load i8*, i8** %arrayidx, align 4, !tbaa !0
store i8* %0, i8** %firjump, align 4, !tbaa !0
- %arrayidx1 = getelementptr inbounds [5 x i8*]* @iirtable, i32 0, i32 %iirorder
- %1 = load i8** %arrayidx1, align 4, !tbaa !0
+ %arrayidx1 = getelementptr inbounds [5 x i8*], [5 x i8*]* @iirtable, i32 0, i32 %iirorder
+ %1 = load i8*, i8** %arrayidx1, align 4, !tbaa !0
store i8* %1, i8** %iirjump, align 4, !tbaa !0
%sub = sub nsw i32 0, %blocksize
store i32 %sub, i32* %blocksize.addr, align 4, !tbaa !3
diff --git a/test/Instrumentation/AddressSanitizer/asan-vs-gvn.ll b/test/Instrumentation/AddressSanitizer/asan-vs-gvn.ll
index 75adf40..b5ef8f2 100644
--- a/test/Instrumentation/AddressSanitizer/asan-vs-gvn.ll
+++ b/test/Instrumentation/AddressSanitizer/asan-vs-gvn.ll
@@ -15,9 +15,9 @@ target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f3
define i32 @test_widening_bad(i8* %P) nounwind ssp noredzone sanitize_address {
entry:
- %tmp = load i8* getelementptr inbounds (%struct_of_7_bytes_4_aligned* @f, i64 0, i32 1), align 4
+ %tmp = load i8, i8* getelementptr inbounds (%struct_of_7_bytes_4_aligned, %struct_of_7_bytes_4_aligned* @f, i64 0, i32 1), align 4
%conv = zext i8 %tmp to i32
- %tmp1 = load i8* getelementptr inbounds (%struct_of_7_bytes_4_aligned* @f, i64 0, i32 3), align 1
+ %tmp1 = load i8, i8* getelementptr inbounds (%struct_of_7_bytes_4_aligned, %struct_of_7_bytes_4_aligned* @f, i64 0, i32 3), align 1
%conv2 = zext i8 %tmp1 to i32
%add = add nsw i32 %conv, %conv2
ret i32 %add
@@ -38,9 +38,9 @@ define void @end_test_widening_bad() {
define i32 @test_widening_ok(i8* %P) nounwind ssp noredzone sanitize_address {
entry:
- %tmp = load i8* getelementptr inbounds (%struct_of_7_bytes_4_aligned* @f, i64 0, i32 1), align 4
+ %tmp = load i8, i8* getelementptr inbounds (%struct_of_7_bytes_4_aligned, %struct_of_7_bytes_4_aligned* @f, i64 0, i32 1), align 4
%conv = zext i8 %tmp to i32
- %tmp1 = load i8* getelementptr inbounds (%struct_of_7_bytes_4_aligned* @f, i64 0, i32 2), align 1
+ %tmp1 = load i8, i8* getelementptr inbounds (%struct_of_7_bytes_4_aligned, %struct_of_7_bytes_4_aligned* @f, i64 0, i32 2), align 1
%conv2 = zext i8 %tmp1 to i32
%add = add nsw i32 %conv, %conv2
ret i32 %add
diff --git a/test/Instrumentation/AddressSanitizer/basic.ll b/test/Instrumentation/AddressSanitizer/basic.ll
index 8020660..21153ae 100644
--- a/test/Instrumentation/AddressSanitizer/basic.ll
+++ b/test/Instrumentation/AddressSanitizer/basic.ll
@@ -12,7 +12,7 @@ define i32 @test_load(i32* %a) sanitize_address {
; CHECK: lshr i64 %[[LOAD_ADDR]], 3
; CHECK: {{or|add}}
; CHECK: %[[LOAD_SHADOW_PTR:[^ ]*]] = inttoptr
-; CHECK: %[[LOAD_SHADOW:[^ ]*]] = load i8* %[[LOAD_SHADOW_PTR]]
+; CHECK: %[[LOAD_SHADOW:[^ ]*]] = load i8, i8* %[[LOAD_SHADOW_PTR]]
; CHECK: icmp ne i8
; CHECK: br i1 %{{.*}}, label %{{.*}}, label %{{.*}}!prof ![[PROF:[0-9]+]]
;
@@ -28,13 +28,13 @@ define i32 @test_load(i32* %a) sanitize_address {
; CHECK: unreachable
;
; The actual load.
-; CHECK: %tmp1 = load i32* %a
+; CHECK: %tmp1 = load i32, i32* %a
; CHECK: ret i32 %tmp1
entry:
- %tmp1 = load i32* %a, align 4
+ %tmp1 = load i32, i32* %a, align 4
ret i32 %tmp1
}
@@ -45,7 +45,7 @@ define void @test_store(i32* %a) sanitize_address {
; CHECK: lshr i64 %[[STORE_ADDR]], 3
; CHECK: {{or|add}}
; CHECK: %[[STORE_SHADOW_PTR:[^ ]*]] = inttoptr
-; CHECK: %[[STORE_SHADOW:[^ ]*]] = load i8* %[[STORE_SHADOW_PTR]]
+; CHECK: %[[STORE_SHADOW:[^ ]*]] = load i8, i8* %[[STORE_SHADOW_PTR]]
; CHECK: icmp ne i8
; CHECK: br i1 %{{.*}}, label %{{.*}}, label %{{.*}}
;
@@ -103,7 +103,7 @@ entry:
define void @i40test(i40* %a, i40* %b) nounwind uwtable sanitize_address {
entry:
- %t = load i40* %a
+ %t = load i40, i40* %a
store i40 %t, i40* %b, align 8
ret void
}
@@ -129,7 +129,7 @@ define void @i64test_align1(i64* %b) nounwind uwtable sanitize_address {
define void @i80test(i80* %a, i80* %b) nounwind uwtable sanitize_address {
entry:
- %t = load i80* %a
+ %t = load i80, i80* %a
store i80 %t, i80* %b, align 8
ret void
}
@@ -144,7 +144,7 @@ define void @i80test(i80* %a, i80* %b) nounwind uwtable sanitize_address {
; asan should not instrument functions with available_externally linkage.
define available_externally i32 @f_available_externally(i32* %a) sanitize_address {
entry:
- %tmp1 = load i32* %a
+ %tmp1 = load i32, i32* %a
ret i32 %tmp1
}
; CHECK-LABEL: @f_available_externally
diff --git a/test/Instrumentation/AddressSanitizer/debug_info.ll b/test/Instrumentation/AddressSanitizer/debug_info.ll
index c0939c5..da18b4b 100644
--- a/test/Instrumentation/AddressSanitizer/debug_info.ll
+++ b/test/Instrumentation/AddressSanitizer/debug_info.ll
@@ -10,13 +10,13 @@ define i32 @_Z3zzzi(i32 %p) nounwind uwtable sanitize_address {
entry:
%p.addr = alloca i32, align 4
%r = alloca i32, align 4
- store i32 %p, i32* %p.addr, align 4
- call void @llvm.dbg.declare(metadata i32* %p.addr, metadata !10, metadata !{!"0x102"}), !dbg !11
- call void @llvm.dbg.declare(metadata i32* %r, metadata !12, metadata !{!"0x102"}), !dbg !14
- %0 = load i32* %p.addr, align 4, !dbg !14
+ store volatile i32 %p, i32* %p.addr, align 4
+ call void @llvm.dbg.declare(metadata i32* %p.addr, metadata !10, metadata !MDExpression()), !dbg !11
+ call void @llvm.dbg.declare(metadata i32* %r, metadata !12, metadata !MDExpression()), !dbg !14
+ %0 = load i32, i32* %p.addr, align 4, !dbg !14
%add = add nsw i32 %0, 1, !dbg !14
- store i32 %add, i32* %r, align 4, !dbg !14
- %1 = load i32* %r, align 4, !dbg !15
+ store volatile i32 %add, i32* %r, align 4, !dbg !14
+ %1 = load i32, i32* %r, align 4, !dbg !15
ret i32 %1, !dbg !15
}
@@ -33,30 +33,30 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!17}
-!0 = !{!"0x11\004\00clang version 3.3 (trunk 169314)\001\00\000\00\000", !16, !1, !1, !3, !1, null} ; [ DW_TAG_compile_unit ] [/usr/local/google/llvm_cmake_clang/tmp/debuginfo/a.cc] [DW_LANG_C_plus_plus]
+!0 = !MDCompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (trunk 169314)", isOptimized: true, emissionKind: 0, file: !16, enums: !1, retainedTypes: !1, subprograms: !3, globals: !1)
!1 = !{i32 0}
!3 = !{!5}
-!5 = !{!"0x2e\00zzz\00zzz\00_Z3zzzi\001\000\001\000\006\00256\000\001", !16, !6, !7, null, i32 (i32)* @_Z3zzzi, null, null, !1} ; [ DW_TAG_subprogram ] [line 1] [def] [zzz]
-!6 = !{!"0x29", !16} ; [ DW_TAG_file_type ]
-!7 = !{!"0x15\00\000\000\000\000\000\000", i32 0, null, null, !8, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!5 = !MDSubprogram(name: "zzz", linkageName: "_Z3zzzi", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !16, scope: !6, type: !7, function: i32 (i32)* @_Z3zzzi, variables: !1)
+!6 = !MDFile(filename: "a.cc", directory: "/usr/local/google/llvm_cmake_clang/tmp/debuginfo")
+!7 = !MDSubroutineType(types: !8)
!8 = !{!9, !9}
-!9 = !{!"0x24\00int\000\0032\0032\000\000\005", null, null} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed]
-!10 = !{!"0x101\00p\0016777217\000", !5, !6, !9} ; [ DW_TAG_arg_variable ] [p] [line 1]
+!9 = !MDBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!10 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "p", line: 1, arg: 1, scope: !5, file: !6, type: !9)
!11 = !MDLocation(line: 1, scope: !5)
-!12 = !{!"0x100\00r\002\000", !13, !6, !9} ; [ DW_TAG_auto_variable ] [r] [line 2]
+!12 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "r", line: 2, scope: !13, file: !6, type: !9)
; Verify that debug descriptors for argument and local variable will be replaced
; with descriptors that end with OpDeref (encoded as 2).
-; CHECK: ![[ARG_ID]] = {{.*}} ; [ DW_TAG_arg_variable ] [p] [line 1]
-; CHECK: ![[OPDEREF]] = !{!"0x102\006"}
-; CHECK: ![[VAR_ID]] = {{.*}} ; [ DW_TAG_auto_variable ] [r] [line 2]
+; CHECK: ![[ARG_ID]] = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "p", arg: 1,{{.*}} line: 1
+; CHECK: ![[OPDEREF]] = !MDExpression(DW_OP_deref)
+; CHECK: ![[VAR_ID]] = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "r",{{.*}} line: 2
; Verify that there are no more variable descriptors.
-; CHECK-NOT: DW_TAG_arg_variable
-; CHECK-NOT: DW_TAG_auto_variable
+; CHECK-NOT: !MDLocalVariable(tag: DW_TAG_arg_variable
+; CHECK-NOT: !MDLocalVariable(tag: DW_TAG_auto_variable
-!13 = !{!"0xb\001\000\000", !16, !5} ; [ DW_TAG_lexical_block ] [/usr/local/google/llvm_cmake_clang/tmp/debuginfo/a.cc]
+!13 = distinct !MDLexicalBlock(line: 1, column: 0, file: !16, scope: !5)
!14 = !MDLocation(line: 2, scope: !13)
!15 = !MDLocation(line: 3, scope: !13)
-!16 = !{!"a.cc", !"/usr/local/google/llvm_cmake_clang/tmp/debuginfo"}
-!17 = !{i32 1, !"Debug Info Version", i32 2}
+!16 = !MDFile(filename: "a.cc", directory: "/usr/local/google/llvm_cmake_clang/tmp/debuginfo")
+!17 = !{i32 1, !"Debug Info Version", i32 3}
diff --git a/test/Instrumentation/AddressSanitizer/do-not-instrument-promotable-allocas.ll b/test/Instrumentation/AddressSanitizer/do-not-instrument-promotable-allocas.ll
new file mode 100644
index 0000000..9b1e241
--- /dev/null
+++ b/test/Instrumentation/AddressSanitizer/do-not-instrument-promotable-allocas.ll
@@ -0,0 +1,21 @@
+; RUN: opt < %s -asan -asan-module -asan-instrument-allocas=1 -S | FileCheck %s --check-prefix=CHECK
+
+target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-apple-macosx10.10.0"
+
+define i32 @test_promotable_allocas() sanitize_address {
+entry:
+; CHECK: %0 = alloca i32, align 4
+; CHECK: store i32 0, i32* %0, align 4
+; CHECK: %1 = load i32, i32* %0, align 4
+; CHECK: ret i32 %1
+
+; CHECK-NOT: __asan_stack_malloc_0
+; CHECK-NOT: icmp
+; CHECK-NOT: call void @__asan_report_store4
+
+ %0 = alloca i32, align 4
+ store i32 0, i32* %0, align 4
+ %1 = load i32, i32* %0, align 4
+ ret i32 %1
+}
diff --git a/test/Instrumentation/AddressSanitizer/experiment-call.ll b/test/Instrumentation/AddressSanitizer/experiment-call.ll
new file mode 100644
index 0000000..0e339cc
--- /dev/null
+++ b/test/Instrumentation/AddressSanitizer/experiment-call.ll
@@ -0,0 +1,113 @@
+; Test optimization experiments.
+; -asan-force-experiment flag turns all memory accesses into experiments.
+; RUN: opt < %s -asan -asan-module -asan-force-experiment=42 -asan-instrumentation-with-call-threshold=0 -S | FileCheck %s
+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"
+
+define void @load1(i8* %p) sanitize_address {
+entry:
+ %t = load i8, i8* %p, align 1
+ ret void
+; CHECK-LABEL: define void @load1
+; CHECK: __asan_exp_load1{{.*}} i32 42
+; CHECK: ret void
+}
+
+define void @load2(i16* %p) sanitize_address {
+entry:
+ %t = load i16, i16* %p, align 2
+ ret void
+; CHECK-LABEL: define void @load2
+; CHECK: __asan_exp_load2{{.*}} i32 42
+; CHECK: ret void
+}
+
+define void @load4(i32* %p) sanitize_address {
+entry:
+ %t = load i32, i32* %p, align 4
+ ret void
+; CHECK-LABEL: define void @load4
+; CHECK: __asan_exp_load4{{.*}} i32 42
+; CHECK: ret void
+}
+
+define void @load8(i64* %p) sanitize_address {
+entry:
+ %t = load i64, i64* %p, align 8
+ ret void
+; CHECK-LABEL: define void @load8
+; CHECK: __asan_exp_load8{{.*}} i32 42
+; CHECK: ret void
+}
+
+define void @load16(i128* %p) sanitize_address {
+entry:
+ %t = load i128, i128* %p, align 16
+ ret void
+; CHECK-LABEL: define void @load16
+; CHECK: __asan_exp_load16{{.*}} i32 42
+; CHECK: ret void
+}
+
+define void @loadN(i48* %p) sanitize_address {
+entry:
+ %t = load i48, i48* %p, align 1
+ ret void
+; CHECK-LABEL: define void @loadN
+; CHECK: __asan_exp_loadN{{.*}} i32 42
+; CHECK: ret void
+}
+
+define void @store1(i8* %p) sanitize_address {
+entry:
+ store i8 1, i8* %p, align 1
+ ret void
+; CHECK-LABEL: define void @store1
+; CHECK: __asan_exp_store1{{.*}} i32 42
+; CHECK: ret void
+}
+
+define void @store2(i16* %p) sanitize_address {
+entry:
+ store i16 1, i16* %p, align 2
+ ret void
+; CHECK-LABEL: define void @store2
+; CHECK: __asan_exp_store2{{.*}} i32 42
+; CHECK: ret void
+}
+
+define void @store4(i32* %p) sanitize_address {
+entry:
+ store i32 1, i32* %p, align 4
+ ret void
+; CHECK-LABEL: define void @store4
+; CHECK: __asan_exp_store4{{.*}} i32 42
+; CHECK: ret void
+}
+
+define void @store8(i64* %p) sanitize_address {
+entry:
+ store i64 1, i64* %p, align 8
+ ret void
+; CHECK-LABEL: define void @store8
+; CHECK: __asan_exp_store8{{.*}} i32 42
+; CHECK: ret void
+}
+
+define void @store16(i128* %p) sanitize_address {
+entry:
+ store i128 1, i128* %p, align 16
+ ret void
+; CHECK-LABEL: define void @store16
+; CHECK: __asan_exp_store16{{.*}} i32 42
+; CHECK: ret void
+}
+
+define void @storeN(i48* %p) sanitize_address {
+entry:
+ store i48 1, i48* %p, align 1
+ ret void
+; CHECK-LABEL: define void @storeN
+; CHECK: __asan_exp_storeN{{.*}} i32 42
+; CHECK: ret void
+}
diff --git a/test/Instrumentation/AddressSanitizer/experiment.ll b/test/Instrumentation/AddressSanitizer/experiment.ll
new file mode 100644
index 0000000..aaa125f
--- /dev/null
+++ b/test/Instrumentation/AddressSanitizer/experiment.ll
@@ -0,0 +1,113 @@
+; Test optimization experiments.
+; -asan-force-experiment flag turns all memory accesses into experiments.
+; RUN: opt < %s -asan -asan-module -asan-force-experiment=42 -S | FileCheck %s
+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"
+
+define void @load1(i8* %p) sanitize_address {
+entry:
+ %t = load i8, i8* %p, align 1
+ ret void
+; CHECK-LABEL: define void @load1
+; CHECK: __asan_report_exp_load1{{.*}} i32 42
+; CHECK: ret void
+}
+
+define void @load2(i16* %p) sanitize_address {
+entry:
+ %t = load i16, i16* %p, align 2
+ ret void
+; CHECK-LABEL: define void @load2
+; CHECK: __asan_report_exp_load2{{.*}} i32 42
+; CHECK: ret void
+}
+
+define void @load4(i32* %p) sanitize_address {
+entry:
+ %t = load i32, i32* %p, align 4
+ ret void
+; CHECK-LABEL: define void @load4
+; CHECK: __asan_report_exp_load4{{.*}} i32 42
+; CHECK: ret void
+}
+
+define void @load8(i64* %p) sanitize_address {
+entry:
+ %t = load i64, i64* %p, align 8
+ ret void
+; CHECK-LABEL: define void @load8
+; CHECK: __asan_report_exp_load8{{.*}} i32 42
+; CHECK: ret void
+}
+
+define void @load16(i128* %p) sanitize_address {
+entry:
+ %t = load i128, i128* %p, align 16
+ ret void
+; CHECK-LABEL: define void @load16
+; CHECK: __asan_report_exp_load16{{.*}} i32 42
+; CHECK: ret void
+}
+
+define void @loadN(i48* %p) sanitize_address {
+entry:
+ %t = load i48, i48* %p, align 1
+ ret void
+; CHECK-LABEL: define void @loadN
+; CHECK: __asan_report_exp_load_n{{.*}} i32 42
+; CHECK: ret void
+}
+
+define void @store1(i8* %p) sanitize_address {
+entry:
+ store i8 1, i8* %p, align 1
+ ret void
+; CHECK-LABEL: define void @store1
+; CHECK: __asan_report_exp_store1{{.*}} i32 42
+; CHECK: ret void
+}
+
+define void @store2(i16* %p) sanitize_address {
+entry:
+ store i16 1, i16* %p, align 2
+ ret void
+; CHECK-LABEL: define void @store2
+; CHECK: __asan_report_exp_store2{{.*}} i32 42
+; CHECK: ret void
+}
+
+define void @store4(i32* %p) sanitize_address {
+entry:
+ store i32 1, i32* %p, align 4
+ ret void
+; CHECK-LABEL: define void @store4
+; CHECK: __asan_report_exp_store4{{.*}} i32 42
+; CHECK: ret void
+}
+
+define void @store8(i64* %p) sanitize_address {
+entry:
+ store i64 1, i64* %p, align 8
+ ret void
+; CHECK-LABEL: define void @store8
+; CHECK: __asan_report_exp_store8{{.*}} i32 42
+; CHECK: ret void
+}
+
+define void @store16(i128* %p) sanitize_address {
+entry:
+ store i128 1, i128* %p, align 16
+ ret void
+; CHECK-LABEL: define void @store16
+; CHECK: __asan_report_exp_store16{{.*}} i32 42
+; CHECK: ret void
+}
+
+define void @storeN(i48* %p) sanitize_address {
+entry:
+ store i48 1, i48* %p, align 1
+ ret void
+; CHECK-LABEL: define void @storeN
+; CHECK: __asan_report_exp_store_n{{.*}} i32 42
+; CHECK: ret void
+}
diff --git a/test/Instrumentation/AddressSanitizer/freebsd.ll b/test/Instrumentation/AddressSanitizer/freebsd.ll
index 359529f..5178432 100644
--- a/test/Instrumentation/AddressSanitizer/freebsd.ll
+++ b/test/Instrumentation/AddressSanitizer/freebsd.ll
@@ -10,7 +10,7 @@
define i32 @read_4_bytes(i32* %a) sanitize_address {
entry:
- %tmp1 = load i32* %a, align 4
+ %tmp1 = load i32, i32* %a, align 4
ret i32 %tmp1
}
diff --git a/test/Instrumentation/AddressSanitizer/global_metadata.ll b/test/Instrumentation/AddressSanitizer/global_metadata.ll
index 3901745..2d09073 100644
--- a/test/Instrumentation/AddressSanitizer/global_metadata.ll
+++ b/test/Instrumentation/AddressSanitizer/global_metadata.ll
@@ -27,7 +27,7 @@ target triple = "x86_64-unknown-linux-gnu"
; Function Attrs: nounwind sanitize_address
define internal void @__cxx_global_var_init() #0 section ".text.startup" {
entry:
- %0 = load i32* @global, align 4
+ %0 = load i32, i32* @global, align 4
store i32 %0, i32* @dyn_init_global, align 4
ret void
}
@@ -36,7 +36,7 @@ entry:
define void @_Z4funcv() #1 {
entry:
%literal = alloca i8*, align 8
- store i8* getelementptr inbounds ([14 x i8]* @.str, i32 0, i32 0), i8** %literal, align 8
+ store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i32 0, i32 0), i8** %literal, align 8
ret void
}
diff --git a/test/Instrumentation/AddressSanitizer/instrument-dynamic-allocas.ll b/test/Instrumentation/AddressSanitizer/instrument-dynamic-allocas.ll
index 25807bb..18a86a9 100644
--- a/test/Instrumentation/AddressSanitizer/instrument-dynamic-allocas.ll
+++ b/test/Instrumentation/AddressSanitizer/instrument-dynamic-allocas.ll
@@ -15,10 +15,11 @@ entry:
; CHECK-NOALLOCA-NOT: store i32 -875836469
%0 = alloca i32, align 4
%1 = alloca i8*
- store i32 %len, i32* %0, align 4
- %2 = load i32* %0, align 4
+ store volatile i32 %len, i32* %0, align 4
+ %2 = load i32, i32* %0, align 4
%3 = zext i32 %2 to i64
%4 = alloca i8, i64 %3, align 32
+ store volatile i8 0, i8* %4
ret void
}
diff --git a/test/Instrumentation/AddressSanitizer/instrument-stack.ll b/test/Instrumentation/AddressSanitizer/instrument-stack.ll
new file mode 100644
index 0000000..52978d9
--- /dev/null
+++ b/test/Instrumentation/AddressSanitizer/instrument-stack.ll
@@ -0,0 +1,48 @@
+; This test checks that we are not instrumenting direct inbound stack accesses.
+; RUN: opt < %s -asan -asan-module -asan-opt-stack -S | FileCheck %s
+
+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-S128"
+target triple = "x86_64-unknown-linux-gnu"
+
+;@sink = global i32* null, align 4
+
+; Ignore direct inbounds stack access.
+define void @foo() uwtable sanitize_address {
+entry:
+ %a = alloca i32, align 4
+ store i32 42, i32* %a, align 4
+ ret void
+; CHECK-LABEL: define void @foo
+; CHECK-NOT: __asan_report
+; CHECK: ret void
+}
+
+; Don't ignore dynamic indexing.
+define void @baz(i64 %i) sanitize_address {
+entry:
+ %a = alloca [10 x i32], align 4
+ %e = getelementptr inbounds [10 x i32], [10 x i32]* %a, i32 0, i64 %i
+ store i32 42, i32* %e, align 4
+ ret void
+; CHECK-LABEL: define void @baz
+; CHECK: __asan_report
+; CHECK: ret void
+}
+
+define void @bar() sanitize_address {
+entry:
+ %a = alloca [10 x i32], align 4
+ %e = getelementptr inbounds [10 x i32], [10 x i32]* %a, i32 0, i64 12
+ store i32 42, i32* %e, align 4
+ ret void
+; CHECK-LABEL: define void @bar
+; CHECK: __asan_report
+; CHECK: ret void
+}
+
+define void @endoftests() sanitize_address {
+entry:
+ ret void
+; CHECK-LABEL: define void @endoftests
+}
+
diff --git a/test/Instrumentation/AddressSanitizer/instrument_global.ll b/test/Instrumentation/AddressSanitizer/instrument_global.ll
index 259c815..7df3d22 100644
--- a/test/Instrumentation/AddressSanitizer/instrument_global.ll
+++ b/test/Instrumentation/AddressSanitizer/instrument_global.ll
@@ -20,7 +20,7 @@ target triple = "x86_64-unknown-linux-gnu"
; GlobSt is declared here, and has static initializer -- ok to optimize.
define i32 @AccessGlobSt_0_2() sanitize_address {
entry:
- %0 = load i32* getelementptr inbounds ([10 x i32]* @GlobSt, i64 0, i64 2), align 8
+ %0 = load i32, i32* getelementptr inbounds ([10 x i32], [10 x i32]* @GlobSt, i64 0, i64 2), align 8
ret i32 %0
; CHECK-LABEL: define i32 @AccessGlobSt_0_2
; CHECK-NOT: __asan_report
@@ -30,7 +30,7 @@ entry:
; GlobSt is accessed out of bounds -- can't optimize
define i32 @AccessGlobSt_0_12() sanitize_address {
entry:
- %0 = load i32* getelementptr inbounds ([10 x i32]* @GlobSt, i64 0, i64 12), align 8
+ %0 = load i32, i32* getelementptr inbounds ([10 x i32], [10 x i32]* @GlobSt, i64 0, i64 12), align 8
ret i32 %0
; CHECK-LABEL: define i32 @AccessGlobSt_0_12
; CHECK: __asan_report
@@ -40,7 +40,7 @@ entry:
; GlobSt is accessed with Gep that has non-0 first index -- can't optimize.
define i32 @AccessGlobSt_1_2() sanitize_address {
entry:
- %0 = load i32* getelementptr inbounds ([10 x i32]* @GlobSt, i64 1, i64 2), align 8
+ %0 = load i32, i32* getelementptr inbounds ([10 x i32], [10 x i32]* @GlobSt, i64 1, i64 2), align 8
ret i32 %0
; CHECK-LABEL: define i32 @AccessGlobSt_1_2
; CHECK: __asan_report
@@ -50,7 +50,7 @@ entry:
; GlobDy is declared with dynamic initializer -- can't optimize.
define i32 @AccessGlobDy_0_2() sanitize_address {
entry:
- %0 = load i32* getelementptr inbounds ([10 x i32]* @GlobDy, i64 0, i64 2), align 8
+ %0 = load i32, i32* getelementptr inbounds ([10 x i32], [10 x i32]* @GlobDy, i64 0, i64 2), align 8
ret i32 %0
; CHECK-LABEL: define i32 @AccessGlobDy_0_2
; CHECK: __asan_report
@@ -60,7 +60,7 @@ entry:
; GlobEx is an external global -- can't optimize.
define i32 @AccessGlobEx_0_2() sanitize_address {
entry:
- %0 = load i32* getelementptr inbounds ([10 x i32]* @GlobEx, i64 0, i64 2), align 8
+ %0 = load i32, i32* getelementptr inbounds ([10 x i32], [10 x i32]* @GlobEx, i64 0, i64 2), align 8
ret i32 %0
; CHECK-LABEL: define i32 @AccessGlobEx_0_2
; CHECK: __asan_report
diff --git a/test/Instrumentation/AddressSanitizer/instrument_load_then_store.ll b/test/Instrumentation/AddressSanitizer/instrument_load_then_store.ll
index 195785f..01a7a66 100644
--- a/test/Instrumentation/AddressSanitizer/instrument_load_then_store.ll
+++ b/test/Instrumentation/AddressSanitizer/instrument_load_then_store.ll
@@ -6,7 +6,7 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3
target triple = "x86_64-unknown-linux-gnu"
define void @IncrementMe(i32* %a) sanitize_address {
entry:
- %tmp1 = load i32* %a, align 4
+ %tmp1 = load i32, i32* %a, align 4
%tmp2 = add i32 %tmp1, 1
store i32 %tmp2, i32* %a, align 4
ret void
diff --git a/test/Instrumentation/AddressSanitizer/instrumentation-with-call-threshold.ll b/test/Instrumentation/AddressSanitizer/instrumentation-with-call-threshold.ll
index adb4341..8e0275d 100644
--- a/test/Instrumentation/AddressSanitizer/instrumentation-with-call-threshold.ll
+++ b/test/Instrumentation/AddressSanitizer/instrumentation-with-call-threshold.ll
@@ -20,10 +20,10 @@ entry:
; CHECK-CUSTOM-PREFIX: call void @__foo_load8
; CHECK-CUSTOM-PREFIX: call void @__foo_loadN
; CHECK-INLINE-NOT: call void @__asan_load
- %tmp1 = load i32* %a, align 4
- %tmp2 = load i64* %b, align 8
- %tmp3 = load i512* %c, align 32
- %tmp4 = load i80* %d, align 8
+ %tmp1 = load i32, i32* %a, align 4
+ %tmp2 = load i64, i64* %b, align 8
+ %tmp3 = load i512, i512* %c, align 32
+ %tmp4 = load i80, i80* %d, align 8
ret void
}
diff --git a/test/Instrumentation/AddressSanitizer/lifetime-uar.ll b/test/Instrumentation/AddressSanitizer/lifetime-uar.ll
index 25577de..efba8ce 100644
--- a/test/Instrumentation/AddressSanitizer/lifetime-uar.ll
+++ b/test/Instrumentation/AddressSanitizer/lifetime-uar.ll
@@ -17,8 +17,8 @@ entry:
; Memory is unpoisoned at llvm.lifetime.start
; CHECK: call void @__asan_unpoison_stack_memory(i64 %{{[^ ]+}}, i64 1)
- store i32 0, i32* %retval
- store i8 0, i8* %c, align 1
+ store volatile i32 0, i32* %retval
+ store volatile i8 0, i8* %c, align 1
call void @llvm.lifetime.end(i64 1, i8* %c)
; Memory is poisoned at llvm.lifetime.end
diff --git a/test/Instrumentation/AddressSanitizer/lifetime.ll b/test/Instrumentation/AddressSanitizer/lifetime.ll
index 175a07d..ac324a9 100644
--- a/test/Instrumentation/AddressSanitizer/lifetime.ll
+++ b/test/Instrumentation/AddressSanitizer/lifetime.ll
@@ -12,6 +12,7 @@ entry:
%i = alloca i32, align 4
%i.ptr = bitcast i32* %i to i8*
call void @llvm.lifetime.start(i64 -1, i8* %i.ptr)
+ store volatile i8 0, i8* %i.ptr
call void @llvm.lifetime.end(i64 -1, i8* %i.ptr)
; Check that lifetime with no size are ignored.
@@ -30,6 +31,7 @@ define void @lifetime() sanitize_address {
%i = alloca i32, align 4
%i.ptr = bitcast i32* %i to i8*
call void @llvm.lifetime.start(i64 3, i8* %i.ptr)
+ store volatile i8 0, i8* %i.ptr
; Memory is unpoisoned at llvm.lifetime.start
; CHECK: %[[VAR:[^ ]*]] = ptrtoint i32* %{{[^ ]+}} to i64
; CHECK-NEXT: call void @__asan_unpoison_stack_memory(i64 %[[VAR]], i64 3)
@@ -43,12 +45,14 @@ define void @lifetime() sanitize_address {
%arr = alloca [10 x i32], align 16
%arr.ptr = bitcast [10 x i32]* %arr to i8*
call void @llvm.lifetime.start(i64 40, i8* %arr.ptr)
+ store volatile i8 0, i8* %arr.ptr
; CHECK: call void @__asan_unpoison_stack_memory(i64 %{{[^ ]+}}, i64 40)
call void @llvm.lifetime.end(i64 40, i8* %arr.ptr)
; CHECK: call void @__asan_poison_stack_memory(i64 %{{[^ ]+}}, i64 40)
; One more lifetime start/end for the same variable %i.
call void @llvm.lifetime.start(i64 4, i8* %i.ptr)
+ store volatile i8 0, i8* %i.ptr
; CHECK: call void @__asan_unpoison_stack_memory(i64 %{{[^ ]+}}, i64 4)
call void @llvm.lifetime.end(i64 4, i8* %i.ptr)
; CHECK: call void @__asan_poison_stack_memory(i64 %{{[^ ]+}}, i64 4)
@@ -68,6 +72,7 @@ entry:
%i = alloca i64, align 4
%i.ptr = bitcast i64* %i to i8*
call void @llvm.lifetime.start(i64 8, i8* %i.ptr)
+ store volatile i8 0, i8* %i.ptr
; CHECK: __asan_unpoison_stack_memory
br i1 %x, label %bb0, label %bb1
diff --git a/test/Instrumentation/AddressSanitizer/stack-poisoning.ll b/test/Instrumentation/AddressSanitizer/stack-poisoning.ll
index ace12d0..0c9ffe2 100644
--- a/test/Instrumentation/AddressSanitizer/stack-poisoning.ll
+++ b/test/Instrumentation/AddressSanitizer/stack-poisoning.ll
@@ -12,7 +12,7 @@ entry:
; CHECK-PLAIN: ret void
; CHECK-UAR-LABEL: Bar
-; CHECK-UAR: load i32* @__asan_option_detect_stack_use_after_return
+; CHECK-UAR: load i32, i32* @__asan_option_detect_stack_use_after_return
; CHECK-UAR: label
; CHECK-UAR: call i64 @__asan_stack_malloc_1
; CHECK-UAR: label
@@ -35,7 +35,7 @@ entry:
; CHECK-UAR: ret void
%x = alloca [20 x i8], align 16
- %arraydecay = getelementptr inbounds [20 x i8]* %x, i64 0, i64 0
+ %arraydecay = getelementptr inbounds [20 x i8], [20 x i8]* %x, i64 0, i64 0
call void @Foo(i8* %arraydecay)
ret void
}
diff --git a/test/Instrumentation/AddressSanitizer/stack_dynamic_alloca.ll b/test/Instrumentation/AddressSanitizer/stack_dynamic_alloca.ll
index 43711b7..9c05874 100644
--- a/test/Instrumentation/AddressSanitizer/stack_dynamic_alloca.ll
+++ b/test/Instrumentation/AddressSanitizer/stack_dynamic_alloca.ll
@@ -8,7 +8,7 @@ entry:
; CHECK-LABEL: Func1
; CHECK: entry:
-; CHECK: load i32* @__asan_option_detect_stack_use_after_return
+; CHECK: load i32, i32* @__asan_option_detect_stack_use_after_return
; CHECK: <label>:[[UAR_ENABLED_BB:[0-9]+]]
; CHECK: [[FAKE_STACK_RT:%[0-9]+]] = call i64 @__asan_stack_malloc_
@@ -26,6 +26,8 @@ entry:
; CHECK: ret void
%XXX = alloca [20 x i8], align 1
+ %arr.ptr = bitcast [20 x i8]* %XXX to i8*
+ store volatile i8 0, i8* %arr.ptr
ret void
}
@@ -37,6 +39,8 @@ entry:
; CHECK: ret void
%XXX = alloca [20 x i8], align 1
+ %arr.ptr = bitcast [20 x i8]* %XXX to i8*
+ store volatile i8 0, i8* %arr.ptr
call void asm sideeffect "mov %%rbx, %%rcx", "~{dirflag},~{fpsr},~{flags}"() nounwind
ret void
}
diff --git a/test/Instrumentation/AddressSanitizer/stack_layout.ll b/test/Instrumentation/AddressSanitizer/stack_layout.ll
index 97e3bbb..6575dd6 100644
--- a/test/Instrumentation/AddressSanitizer/stack_layout.ll
+++ b/test/Instrumentation/AddressSanitizer/stack_layout.ll
@@ -26,6 +26,12 @@ entry:
%XXX = alloca [10 x i8], align 1
%YYY = alloca [20 x i8], align 1
%ZZZ = alloca [30 x i8], align 1
+ %arr1.ptr = bitcast [10 x i8]* %XXX to i8*
+ store volatile i8 0, i8* %arr1.ptr
+ %arr2.ptr = bitcast [20 x i8]* %YYY to i8*
+ store volatile i8 0, i8* %arr2.ptr
+ %arr3.ptr = bitcast [30 x i8]* %ZZZ to i8*
+ store volatile i8 0, i8* %arr3.ptr
ret void
}
@@ -41,6 +47,12 @@ entry:
%AAA = alloca [5 x i8], align 1
%BBB = alloca [55 x i8], align 1
%CCC = alloca [555 x i8], align 1
+ %arr1.ptr = bitcast [5 x i8]* %AAA to i8*
+ store volatile i8 0, i8* %arr1.ptr
+ %arr2.ptr = bitcast [55 x i8]* %BBB to i8*
+ store volatile i8 0, i8* %arr2.ptr
+ %arr3.ptr = bitcast [555 x i8]* %CCC to i8*
+ store volatile i8 0, i8* %arr3.ptr
ret void
}
@@ -57,5 +69,11 @@ entry:
%AAA = alloca [128 x i8], align 16
%BBB = alloca [128 x i8], align 64
%CCC = alloca [128 x i8], align 256
+ %arr1.ptr = bitcast [128 x i8]* %AAA to i8*
+ store volatile i8 0, i8* %arr1.ptr
+ %arr2.ptr = bitcast [128 x i8]* %BBB to i8*
+ store volatile i8 0, i8* %arr2.ptr
+ %arr3.ptr = bitcast [128 x i8]* %CCC to i8*
+ store volatile i8 0, i8* %arr3.ptr
ret void
}
diff --git a/test/Instrumentation/AddressSanitizer/test64.ll b/test/Instrumentation/AddressSanitizer/test64.ll
index fd93f45..85a29e6 100644
--- a/test/Instrumentation/AddressSanitizer/test64.ll
+++ b/test/Instrumentation/AddressSanitizer/test64.ll
@@ -3,7 +3,7 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3
target triple = "x86_64-unknown-linux-gnu"
define i32 @read_4_bytes(i32* %a) sanitize_address {
entry:
- %tmp1 = load i32* %a, align 4
+ %tmp1 = load i32, i32* %a, align 4
ret i32 %tmp1
}
; CHECK-LABEL: @read_4_bytes
diff --git a/test/Instrumentation/AddressSanitizer/ubsan.ll b/test/Instrumentation/AddressSanitizer/ubsan.ll
index 5535efe..23b7ef4 100644
--- a/test/Instrumentation/AddressSanitizer/ubsan.ll
+++ b/test/Instrumentation/AddressSanitizer/ubsan.ll
@@ -17,9 +17,9 @@ define void @_Z3BarP1A(%struct.A* %a) uwtable sanitize_address {
; CHECK-LABEL: define void @_Z3BarP1A
entry:
%0 = bitcast %struct.A* %a to void (%struct.A*)***
- %vtable = load void (%struct.A*)*** %0, align 8
+ %vtable = load void (%struct.A*)**, void (%struct.A*)*** %0, align 8
; CHECK: __asan_report_load8
- %1 = load void (%struct.A*)** %vtable, align 8
+ %1 = load void (%struct.A*)*, void (%struct.A*)** %vtable, align 8
; CHECK: __asan_report_load8
%2 = ptrtoint void (%struct.A*)** %vtable to i64
%3 = xor i64 %2, -303164226014115343, !nosanitize !0
@@ -32,9 +32,9 @@ entry:
%10 = xor i64 %9, %8, !nosanitize !0
%11 = mul i64 %10, -7070675565921424023, !nosanitize !0
%12 = and i64 %11, 127, !nosanitize !0
- %13 = getelementptr inbounds [128 x i64]* @__ubsan_vptr_type_cache, i64 0, i64 %12, !nosanitize !0
+ %13 = getelementptr inbounds [128 x i64], [128 x i64]* @__ubsan_vptr_type_cache, i64 0, i64 %12, !nosanitize !0
; CHECK-NOT: __asan_report_load8
- %14 = load i64* %13, align 8, !nosanitize !0
+ %14 = load i64, i64* %13, align 8, !nosanitize !0
%15 = icmp eq i64 %14, %11, !nosanitize !0
br i1 %15, label %cont, label %handler.dynamic_type_cache_miss, !nosanitize !0
diff --git a/test/Instrumentation/BoundsChecking/many-trap.ll b/test/Instrumentation/BoundsChecking/many-trap.ll
index 0bbb959..5894487 100644
--- a/test/Instrumentation/BoundsChecking/many-trap.ll
+++ b/test/Instrumentation/BoundsChecking/many-trap.ll
@@ -5,8 +5,8 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3
; CHECK: @f1
define void @f1(i64 %x) nounwind {
%1 = alloca i128, i64 %x
- %2 = load i128* %1, align 4
- %3 = load i128* %1, align 4
+ %2 = load i128, i128* %1, align 4
+ %3 = load i128, i128* %1, align 4
ret void
; CHECK: call void @llvm.trap()
; CHECK: call void @llvm.trap()
diff --git a/test/Instrumentation/BoundsChecking/phi.ll b/test/Instrumentation/BoundsChecking/phi.ll
index 25a5ed1..15361b6 100644
--- a/test/Instrumentation/BoundsChecking/phi.ll
+++ b/test/Instrumentation/BoundsChecking/phi.ll
@@ -8,15 +8,15 @@ target datalayout = "e-p:64:64:64-p1:16:16:16-i1:8:8-i8:8:8-i16:16:16-i32:32:32-
; CHECK-NOT: trap
define void @f1(i8* nocapture %c) {
entry:
- %0 = load i8* %c, align 1
+ %0 = load i8, i8* %c, align 1
%tobool1 = icmp eq i8 %0, 0
br i1 %tobool1, label %while.end, label %while.body
while.body:
%c.addr.02 = phi i8* [ %incdec.ptr, %while.body ], [ %c, %entry ]
- %incdec.ptr = getelementptr inbounds i8* %c.addr.02, i64 -1
+ %incdec.ptr = getelementptr inbounds i8, i8* %c.addr.02, i64 -1
store i8 100, i8* %c.addr.02, align 1
- %1 = load i8* %incdec.ptr, align 1
+ %1 = load i8, i8* %incdec.ptr, align 1
%tobool = icmp eq i8 %1, 0
br i1 %tobool, label %while.end, label %while.body
@@ -28,7 +28,7 @@ while.end:
; CHECK: f2
define void @f2() {
while.body.i.preheader:
- %addr = getelementptr inbounds [10 x i8]* @global, i64 0, i64 9
+ %addr = getelementptr inbounds [10 x i8], [10 x i8]* @global, i64 0, i64 9
br label %while.body.i
while.body.i:
@@ -36,14 +36,14 @@ while.body.i:
; CHECK-NEXT: phi
; CHECK-NOT: phi
%c.addr.02.i = phi i8* [ %incdec.ptr.i, %while.body.i ], [ %addr, %while.body.i.preheader ]
- %incdec.ptr.i = getelementptr inbounds i8* %c.addr.02.i, i64 -1
+ %incdec.ptr.i = getelementptr inbounds i8, i8* %c.addr.02.i, i64 -1
; CHECK: sub i64 10, %0
; CHECK-NEXT: icmp ult i64 10, %0
; CHECK-NEXT: icmp ult i64 {{.*}}, 1
; CHECK-NEXT: or i1
; CHECK-NEXT: br {{.*}}, label %trap
store i8 100, i8* %c.addr.02.i, align 1
- %0 = load i8* %incdec.ptr.i, align 1
+ %0 = load i8, i8* %incdec.ptr.i, align 1
%tobool.i = icmp eq i8 %0, 0
br i1 %tobool.i, label %fn.exit, label %while.body.i
@@ -61,15 +61,15 @@ define void @f1_as1(i8 addrspace(1)* nocapture %c) {
; CHECK: add i16 undef, -1
; CHECK-NOT: trap
entry:
- %0 = load i8 addrspace(1)* %c, align 1
+ %0 = load i8, i8 addrspace(1)* %c, align 1
%tobool1 = icmp eq i8 %0, 0
br i1 %tobool1, label %while.end, label %while.body
while.body:
%c.addr.02 = phi i8 addrspace(1)* [ %incdec.ptr, %while.body ], [ %c, %entry ]
- %incdec.ptr = getelementptr inbounds i8 addrspace(1)* %c.addr.02, i64 -1
+ %incdec.ptr = getelementptr inbounds i8, i8 addrspace(1)* %c.addr.02, i64 -1
store i8 100, i8 addrspace(1)* %c.addr.02, align 1
- %1 = load i8 addrspace(1)* %incdec.ptr, align 1
+ %1 = load i8, i8 addrspace(1)* %incdec.ptr, align 1
%tobool = icmp eq i8 %1, 0
br i1 %tobool, label %while.end, label %while.body
@@ -81,7 +81,7 @@ while.end:
define void @f2_as1() {
; CHECK: @f2_as1
while.body.i.preheader:
- %addr = getelementptr inbounds [10 x i8] addrspace(1)* @global_as1, i16 0, i16 9
+ %addr = getelementptr inbounds [10 x i8], [10 x i8] addrspace(1)* @global_as1, i16 0, i16 9
br label %while.body.i
while.body.i:
@@ -89,14 +89,14 @@ while.body.i:
; CHECK-NEXT: phi
; CHECK-NOT: phi
%c.addr.02.i = phi i8 addrspace(1)* [ %incdec.ptr.i, %while.body.i ], [ %addr, %while.body.i.preheader ]
- %incdec.ptr.i = getelementptr inbounds i8 addrspace(1)* %c.addr.02.i, i16 -1
+ %incdec.ptr.i = getelementptr inbounds i8, i8 addrspace(1)* %c.addr.02.i, i16 -1
; CHECK: sub i16 10, %0
; CHECK-NEXT: icmp ult i16 10, %0
; CHECK-NEXT: icmp ult i16 {{.*}}, 1
; CHECK-NEXT: or i1
; CHECK-NEXT: br {{.*}}, label %trap
store i8 100, i8 addrspace(1)* %c.addr.02.i, align 1
- %0 = load i8 addrspace(1)* %incdec.ptr.i, align 1
+ %0 = load i8, i8 addrspace(1)* %incdec.ptr.i, align 1
%tobool.i = icmp eq i8 %0, 0
br i1 %tobool.i, label %fn.exit, label %while.body.i
diff --git a/test/Instrumentation/BoundsChecking/simple-32.ll b/test/Instrumentation/BoundsChecking/simple-32.ll
index 38b210f..0fdb0a4 100644
--- a/test/Instrumentation/BoundsChecking/simple-32.ll
+++ b/test/Instrumentation/BoundsChecking/simple-32.ll
@@ -9,9 +9,9 @@ target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f3
define i16 @f() {
entry:
%packed1 = alloca %struct.s2_packed, align 8
- %gep = getelementptr inbounds %struct.s2_packed* %packed1, i32 0, i32 4
+ %gep = getelementptr inbounds %struct.s2_packed, %struct.s2_packed* %packed1, i32 0, i32 4
%ptr = bitcast i16* %gep to i32*
- %val = load i32* %ptr, align 4
+ %val = load i32, i32* %ptr, align 4
%valt = trunc i32 %val to i16
ret i16 %valt
}
@@ -21,9 +21,9 @@ entry:
define i16 @f2() {
entry:
%packed1 = alloca %struct.s2_packed, align 8
- %gep = getelementptr inbounds %struct.s2_packed* %packed1, i32 0, i32 4
+ %gep = getelementptr inbounds %struct.s2_packed, %struct.s2_packed* %packed1, i32 0, i32 4
%ptr = bitcast i16* %gep to i48*
- %val = load i48* %ptr, align 4
+ %val = load i48, i48* %ptr, align 4
%valt = trunc i48 %val to i16
ret i16 %valt
}
diff --git a/test/Instrumentation/BoundsChecking/simple.ll b/test/Instrumentation/BoundsChecking/simple.ll
index ddacf6d..5fae2f4 100644
--- a/test/Instrumentation/BoundsChecking/simple.ll
+++ b/test/Instrumentation/BoundsChecking/simple.ll
@@ -14,7 +14,7 @@ declare noalias i8* @realloc(i8* nocapture, i64) nounwind
define void @f1() nounwind {
%1 = tail call i8* @malloc(i64 32)
%2 = bitcast i8* %1 to i32*
- %idx = getelementptr inbounds i32* %2, i64 2
+ %idx = getelementptr inbounds i32, i32* %2, i64 2
; CHECK-NOT: trap
store i32 3, i32* %idx, align 4
ret void
@@ -24,7 +24,7 @@ define void @f1() nounwind {
define void @f2() nounwind {
%1 = tail call i8* @malloc(i64 32)
%2 = bitcast i8* %1 to i32*
- %idx = getelementptr inbounds i32* %2, i64 8
+ %idx = getelementptr inbounds i32, i32* %2, i64 8
; CHECK: trap
store i32 3, i32* %idx, align 4
ret void
@@ -34,7 +34,7 @@ define void @f2() nounwind {
define void @f3(i64 %x) nounwind {
%1 = tail call i8* @calloc(i64 4, i64 %x)
%2 = bitcast i8* %1 to i32*
- %idx = getelementptr inbounds i32* %2, i64 8
+ %idx = getelementptr inbounds i32, i32* %2, i64 8
; CHECK: mul i64 4, %
; CHECK: sub i64 {{.*}}, 32
; CHECK-NEXT: icmp ult i64 {{.*}}, 32
@@ -49,27 +49,27 @@ define void @f3(i64 %x) nounwind {
define void @f4(i64 %x) nounwind {
%1 = tail call i8* @realloc(i8* null, i64 %x) nounwind
%2 = bitcast i8* %1 to i32*
- %idx = getelementptr inbounds i32* %2, i64 8
+ %idx = getelementptr inbounds i32, i32* %2, i64 8
; CHECK: trap
- %3 = load i32* %idx, align 4
+ %3 = load i32, i32* %idx, align 4
ret void
}
; CHECK: @f5
define void @f5(i64 %x) nounwind {
- %idx = getelementptr inbounds [8 x i8]* @.str, i64 0, i64 %x
+ %idx = getelementptr inbounds [8 x i8], [8 x i8]* @.str, i64 0, i64 %x
; CHECK: trap
- %1 = load i8* %idx, align 4
+ %1 = load i8, i8* %idx, align 4
ret void
}
define void @f5_as1(i64 %x) nounwind {
; CHECK: @f5_as1
- %idx = getelementptr inbounds [8 x i8] addrspace(1)* @.str_as1, i64 0, i64 %x
+ %idx = getelementptr inbounds [8 x i8], [8 x i8] addrspace(1)* @.str_as1, i64 0, i64 %x
; CHECK: sub i16
- ; CHECK icmp ult i16
+ ; CHECK: icmp ult i16
; CHECK: trap
- %1 = load i8 addrspace(1)* %idx, align 4
+ %1 = load i8, i8 addrspace(1)* %idx, align 4
ret void
}
@@ -77,7 +77,7 @@ define void @f5_as1(i64 %x) nounwind {
define void @f6(i64 %x) nounwind {
%1 = alloca i128
; CHECK-NOT: trap
- %2 = load i128* %1, align 4
+ %2 = load i128, i128* %1, align 4
ret void
}
@@ -86,7 +86,7 @@ define void @f7(i64 %x) nounwind {
%1 = alloca i128, i64 %x
; CHECK: mul i64 16,
; CHECK: trap
- %2 = load i128* %1, align 4
+ %2 = load i128, i128* %1, align 4
ret void
}
@@ -96,7 +96,7 @@ define void @f8() nounwind {
%2 = alloca i128
%3 = select i1 undef, i128* %1, i128* %2
; CHECK-NOT: trap
- %4 = load i128* %3, align 4
+ %4 = load i128, i128* %3, align 4
ret void
}
@@ -105,7 +105,7 @@ define void @f9(i128* %arg) nounwind {
%1 = alloca i128
%2 = select i1 undef, i128* %arg, i128* %1
; CHECK-NOT: trap
- %3 = load i128* %2, align 4
+ %3 = load i128, i128* %2, align 4
ret void
}
@@ -117,25 +117,25 @@ define void @f10(i64 %x, i64 %y) nounwind {
; CHECK: select
; CHECK: select
; CHECK: trap
- %4 = load i128* %3, align 4
+ %4 = load i128, i128* %3, align 4
ret void
}
; CHECK: @f11
define void @f11(i128* byval %x) nounwind {
%1 = bitcast i128* %x to i8*
- %2 = getelementptr inbounds i8* %1, i64 16
+ %2 = getelementptr inbounds i8, i8* %1, i64 16
; CHECK: br label
- %3 = load i8* %2, align 4
+ %3 = load i8, i8* %2, align 4
ret void
}
; CHECK: @f11_as1
define void @f11_as1(i128 addrspace(1)* byval %x) nounwind {
%1 = bitcast i128 addrspace(1)* %x to i8 addrspace(1)*
- %2 = getelementptr inbounds i8 addrspace(1)* %1, i16 16
+ %2 = getelementptr inbounds i8, i8 addrspace(1)* %1, i16 16
; CHECK: br label
- %3 = load i8 addrspace(1)* %2, align 4
+ %3 = load i8, i8 addrspace(1)* %2, align 4
ret void
}
@@ -144,8 +144,8 @@ define i64 @f12(i64 %x, i64 %y) nounwind {
%1 = tail call i8* @calloc(i64 1, i64 %x)
; CHECK: mul i64 %y, 8
%2 = bitcast i8* %1 to i64*
- %3 = getelementptr inbounds i64* %2, i64 %y
- %4 = load i64* %3, align 8
+ %3 = getelementptr inbounds i64, i64* %2, i64 %y
+ %4 = load i64, i64* %3, align 8
ret i64 %4
}
@@ -157,9 +157,9 @@ entry:
dead:
; Self-refential GEPs can occur in dead code.
- %incdec.ptr = getelementptr inbounds i32* %incdec.ptr, i64 1
- ; CHECK: %incdec.ptr = getelementptr inbounds i32* %incdec.ptr
- %l = load i32* %incdec.ptr
+ %incdec.ptr = getelementptr inbounds i32, i32* %incdec.ptr, i64 1
+ ; CHECK: %incdec.ptr = getelementptr inbounds i32, i32* %incdec.ptr
+ %l = load i32, i32* %incdec.ptr
br label %alive
alive:
diff --git a/test/Instrumentation/DataFlowSanitizer/abilist.ll b/test/Instrumentation/DataFlowSanitizer/abilist.ll
index 9a45dbc..7998513 100644
--- a/test/Instrumentation/DataFlowSanitizer/abilist.ll
+++ b/test/Instrumentation/DataFlowSanitizer/abilist.ll
@@ -24,7 +24,7 @@ declare void @custom1(i32 %a, i32 %b)
; CHECK: define linkonce_odr { i32, i16 } @"dfsw$custom2"(i32, i32, i16, i16)
; CHECK: %[[LABELRETURN2:.*]] = alloca i16
; CHECK: %[[RV:.*]] = call i32 @__dfsw_custom2
-; CHECK: %[[RVSHADOW:.*]] = load i16* %[[LABELRETURN2]]
+; CHECK: %[[RVSHADOW:.*]] = load i16, i16* %[[LABELRETURN2]]
; CHECK: insertvalue {{.*}}[[RV]], 0
; CHECK: insertvalue {{.*}}[[RVSHADOW]], 1
; CHECK: ret { i32, i16 }
@@ -56,16 +56,16 @@ define void @f(i32 %x) {
; CHECK: call void @__dfsw_customcb({{.*}} @"dfst0$customcb", i8* bitcast ({{.*}} @"dfs$cb" to i8*), i16 0)
call void @customcb(i32 (i32)* @cb)
- ; CHECK: %[[LABELVA1_0:.*]] = getelementptr inbounds [2 x i16]* %[[LABELVA1]], i32 0, i32 0
+ ; CHECK: %[[LABELVA1_0:.*]] = getelementptr inbounds [2 x i16], [2 x i16]* %[[LABELVA1]], i32 0, i32 0
; CHECK: store i16 0, i16* %[[LABELVA1_0]]
- ; CHECK: %[[LABELVA1_1:.*]] = getelementptr inbounds [2 x i16]* %[[LABELVA1]], i32 0, i32 1
+ ; CHECK: %[[LABELVA1_1:.*]] = getelementptr inbounds [2 x i16], [2 x i16]* %[[LABELVA1]], i32 0, i32 1
; CHECK: store i16 %{{.*}}, i16* %[[LABELVA1_1]]
- ; CHECK: %[[LABELVA1_0A:.*]] = getelementptr inbounds [2 x i16]* %[[LABELVA1]], i32 0, i32 0
+ ; CHECK: %[[LABELVA1_0A:.*]] = getelementptr inbounds [2 x i16], [2 x i16]* %[[LABELVA1]], i32 0, i32 0
; CHECK: call void (i32, i16, i16*, ...)* @__dfsw_custom3(i32 1, i16 0, i16* %[[LABELVA1_0A]], i32 2, i32 %{{.*}})
call void (i32, ...)* @custom3(i32 1, i32 2, i32 %x)
- ; CHECK: %[[LABELVA2_0:.*]] = getelementptr inbounds [2 x i16]* %[[LABELVA2]], i32 0, i32 0
- ; CHECK: %[[LABELVA2_0A:.*]] = getelementptr inbounds [2 x i16]* %[[LABELVA2]], i32 0, i32 0
+ ; CHECK: %[[LABELVA2_0:.*]] = getelementptr inbounds [2 x i16], [2 x i16]* %[[LABELVA2]], i32 0, i32 0
+ ; CHECK: %[[LABELVA2_0A:.*]] = getelementptr inbounds [2 x i16], [2 x i16]* %[[LABELVA2]], i32 0, i32 0
; CHECK: call i32 (i32, i16, i16*, i16*, ...)* @__dfsw_custom4(i32 1, i16 0, i16* %[[LABELVA2_0A]], i16* %[[LABELRETURN]], i32 2, i32 3)
call i32 (i32, ...)* @custom4(i32 1, i32 2, i32 3)
diff --git a/test/Instrumentation/DataFlowSanitizer/debug-nonzero-labels.ll b/test/Instrumentation/DataFlowSanitizer/debug-nonzero-labels.ll
index 16de9cc..6632eb3 100644
--- a/test/Instrumentation/DataFlowSanitizer/debug-nonzero-labels.ll
+++ b/test/Instrumentation/DataFlowSanitizer/debug-nonzero-labels.ll
@@ -19,9 +19,9 @@ define i32 @f(i32, i32) {
; CHECK: [[CALLCMP:%.*]] = icmp ne i16 [[CALLLABEL]], 0
; CHECK: br i1 [[CALLCMP]]
%call = call i32 @g()
- ; CHECK: [[LOCALLABEL:%.*]] = load i16* [[LOCALLABELALLOCA]]
+ ; CHECK: [[LOCALLABEL:%.*]] = load i16, i16* [[LOCALLABELALLOCA]]
; CHECK: [[LOCALCMP:%.*]] = icmp ne i16 [[LOCALLABEL]], 0
; CHECK: br i1 [[LOCALCMP]]
- %load = load i32* %i
+ %load = load i32, i32* %i
ret i32 %load
}
diff --git a/test/Instrumentation/DataFlowSanitizer/debug.ll b/test/Instrumentation/DataFlowSanitizer/debug.ll
index 837e953..9bab258 100644
--- a/test/Instrumentation/DataFlowSanitizer/debug.ll
+++ b/test/Instrumentation/DataFlowSanitizer/debug.ll
@@ -1,6 +1,6 @@
; RUN: opt < %s -dfsan -dfsan-abilist=%S/Inputs/debuglist.txt -S | FileCheck %s
-; CHECK: i32 ()* @main, {{.*}} ; [ DW_TAG_subprogram ] {{.*}} [main]
+; CHECK: !MDSubprogram(name: "main",{{.*}} function: i32 ()* @main{{[,)]}}
; Generated from a simple source file compiled with clang -g:
; int main() {
@@ -21,16 +21,16 @@ attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointe
!llvm.module.flags = !{!9, !10}
!llvm.ident = !{!11}
-!0 = !{!"0x11\004\00clang version 3.6.0 \000\00\000\00\001", !1, !2, !2, !3, !2, !2} ; [ DW_TAG_compile_unit ] [/tmp/dbginfo/debug.cpp] [DW_LANG_C_plus_plus]
-!1 = !{!"debug.cpp", !"/tmp/dbginfo"}
+!0 = !MDCompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 ", isOptimized: false, emissionKind: 1, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2)
+!1 = !MDFile(filename: "debug.cpp", directory: "/tmp/dbginfo")
!2 = !{}
!3 = !{!4}
-!4 = !{!"0x2e\00main\00main\00\001\000\001\000\000\00256\000\001", !1, !5, !6, null, i32 ()* @main, null, null, !2} ; [ DW_TAG_subprogram ] [line 1] [def] [main]
-!5 = !{!"0x29", !1} ; [ DW_TAG_file_type ] [/tmp/dbginfo/debug.cpp]
-!6 = !{!"0x15\00\000\000\000\000\000\000", null, null, null, !7, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!4 = !MDSubprogram(name: "main", line: 1, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, function: i32 ()* @main, variables: !2)
+!5 = !MDFile(filename: "debug.cpp", directory: "/tmp/dbginfo")
+!6 = !MDSubroutineType(types: !7)
!7 = !{!8}
-!8 = !{!"0x24\00int\000\0032\0032\000\000\005", null, null} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed]
+!8 = !MDBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
!9 = !{i32 2, !"Dwarf Version", i32 4}
-!10 = !{i32 2, !"Debug Info Version", i32 2}
+!10 = !{i32 2, !"Debug Info Version", i32 3}
!11 = !{!"clang version 3.6.0 "}
!12 = !MDLocation(line: 2, column: 1, scope: !4)
diff --git a/test/Instrumentation/DataFlowSanitizer/load.ll b/test/Instrumentation/DataFlowSanitizer/load.ll
index 4d36c09..5bb3984 100644
--- a/test/Instrumentation/DataFlowSanitizer/load.ll
+++ b/test/Instrumentation/DataFlowSanitizer/load.ll
@@ -11,21 +11,21 @@ define {} @load0({}* %p) {
; NO_COMBINE_PTR_LABEL: @"dfs$load0"
; NO_COMBINE_PTR_LABEL: load
; NO_COMBINE_PTR_LABEL-NOT: load
- %a = load {}* %p
+ %a = load {}, {}* %p
ret {} %a
}
define i8 @load8(i8* %p) {
; COMBINE_PTR_LABEL: @"dfs$load8"
- ; COMBINE_PTR_LABEL: load i16*
+ ; COMBINE_PTR_LABEL: load i16, i16*
; COMBINE_PTR_LABEL: ptrtoint i8* {{.*}} to i64
; COMBINE_PTR_LABEL: and i64
; COMBINE_PTR_LABEL: mul i64
; COMBINE_PTR_LABEL: inttoptr i64
- ; COMBINE_PTR_LABEL: load i16*
+ ; COMBINE_PTR_LABEL: load i16, i16*
; COMBINE_PTR_LABEL: icmp ne i16
; COMBINE_PTR_LABEL: call zeroext i16 @__dfsan_union
- ; COMBINE_PTR_LABEL: load i8*
+ ; COMBINE_PTR_LABEL: load i8, i8*
; COMBINE_PTR_LABEL: store i16 {{.*}} @__dfsan_retval_tls
; COMBINE_PTR_LABEL: ret i8
@@ -34,12 +34,12 @@ define i8 @load8(i8* %p) {
; NO_COMBINE_PTR_LABEL: and i64
; NO_COMBINE_PTR_LABEL: mul i64
; NO_COMBINE_PTR_LABEL: inttoptr i64 {{.*}} to i16*
- ; NO_COMBINE_PTR_LABEL: load i16*
- ; NO_COMBINE_PTR_LABEL: load i8*
+ ; NO_COMBINE_PTR_LABEL: load i16, i16*
+ ; NO_COMBINE_PTR_LABEL: load i8, i8*
; NO_COMBINE_PTR_LABEL: store i16 {{.*}} @__dfsan_retval_tls
; NO_COMBINE_PTR_LABEL: ret i8
- %a = load i8* %p
+ %a = load i8, i8* %p
ret i8 %a
}
@@ -50,13 +50,13 @@ define i16 @load16(i16* %p) {
; COMBINE_PTR_LABEL: mul i64
; COMBINE_PTR_LABEL: inttoptr i64 {{.*}} i16*
; COMBINE_PTR_LABEL: getelementptr i16
- ; COMBINE_PTR_LABEL: load i16*
- ; COMBINE_PTR_LABEL: load i16*
+ ; COMBINE_PTR_LABEL: load i16, i16*
+ ; COMBINE_PTR_LABEL: load i16, i16*
; COMBINE_PTR_LABEL: icmp ne
; COMBINE_PTR_LABEL: call {{.*}} @__dfsan_union
; COMBINE_PTR_LABEL: icmp ne i16
; COMBINE_PTR_LABEL: call {{.*}} @__dfsan_union
- ; COMBINE_PTR_LABEL: load i16*
+ ; COMBINE_PTR_LABEL: load i16, i16*
; COMBINE_PTR_LABEL: store {{.*}} @__dfsan_retval_tls
; COMBINE_PTR_LABEL: ret i16
@@ -65,16 +65,16 @@ define i16 @load16(i16* %p) {
; NO_COMBINE_PTR_LABEL: and i64
; NO_COMBINE_PTR_LABEL: mul i64
; NO_COMBINE_PTR_LABEL: inttoptr i64 {{.*}} i16*
- ; NO_COMBINE_PTR_LABEL: getelementptr i16*
- ; NO_COMBINE_PTR_LABEL: load i16*
- ; NO_COMBINE_PTR_LABEL: load i16*
+ ; NO_COMBINE_PTR_LABEL: getelementptr i16, i16*
+ ; NO_COMBINE_PTR_LABEL: load i16, i16*
+ ; NO_COMBINE_PTR_LABEL: load i16, i16*
; NO_COMBINE_PTR_LABEL: icmp ne i16
; NO_COMBINE_PTR_LABEL: call {{.*}} @__dfsan_union
- ; NO_COMBINE_PTR_LABEL: load i16*
+ ; NO_COMBINE_PTR_LABEL: load i16, i16*
; NO_COMBINE_PTR_LABEL: store i16 {{.*}} @__dfsan_retval_tls
; NO_COMBINE_PTR_LABEL: ret i16
- %a = load i16* %p
+ %a = load i16, i16* %p
ret i16 %a
}
@@ -85,7 +85,7 @@ define i32 @load32(i32* %p) {
; COMBINE_PTR_LABEL: mul i64
; COMBINE_PTR_LABEL: inttoptr i64 {{.*}} i16*
; COMBINE_PTR_LABEL: bitcast i16* {{.*}} i64*
- ; COMBINE_PTR_LABEL: load i64*
+ ; COMBINE_PTR_LABEL: load i64, i64*
; COMBINE_PTR_LABEL: trunc i64 {{.*}} i16
; COMBINE_PTR_LABEL: shl i64
; COMBINE_PTR_LABEL: lshr i64
@@ -93,7 +93,7 @@ define i32 @load32(i32* %p) {
; COMBINE_PTR_LABEL: icmp eq i64
; COMBINE_PTR_LABEL: icmp ne i16
; COMBINE_PTR_LABEL: call {{.*}} @__dfsan_union
- ; COMBINE_PTR_LABEL: load i32*
+ ; COMBINE_PTR_LABEL: load i32, i32*
; COMBINE_PTR_LABEL: store i16 {{.*}} @__dfsan_retval_tls
; COMBINE_PTR_LABEL: ret i32
; COMBINE_PTR_LABEL: call {{.*}} @__dfsan_union_load
@@ -104,19 +104,19 @@ define i32 @load32(i32* %p) {
; NO_COMBINE_PTR_LABEL: mul i64
; NO_COMBINE_PTR_LABEL: inttoptr i64 {{.*}} i16*
; NO_COMBINE_PTR_LABEL: bitcast i16* {{.*}} i64*
- ; NO_COMBINE_PTR_LABEL: load i64*
+ ; NO_COMBINE_PTR_LABEL: load i64, i64*
; NO_COMBINE_PTR_LABEL: trunc i64 {{.*}} i16
; NO_COMBINE_PTR_LABEL: shl i64
; NO_COMBINE_PTR_LABEL: lshr i64
; NO_COMBINE_PTR_LABEL: or i64
; NO_COMBINE_PTR_LABEL: icmp eq i64
- ; NO_COMBINE_PTR_LABEL: load i32*
+ ; NO_COMBINE_PTR_LABEL: load i32, i32*
; NO_COMBINE_PTR_LABEL: store i16 {{.*}} @__dfsan_retval_tls
; NO_COMBINE_PTR_LABEL: ret i32
; NO_COMBINE_PTR_LABEL: call {{.*}} @__dfsan_union_load
- %a = load i32* %p
+ %a = load i32, i32* %p
ret i32 %a
}
@@ -127,7 +127,7 @@ define i64 @load64(i64* %p) {
; COMBINE_PTR_LABEL: mul i64
; COMBINE_PTR_LABEL: inttoptr i64 {{.*}} i16*
; COMBINE_PTR_LABEL: bitcast i16* {{.*}} i64*
- ; COMBINE_PTR_LABEL: load i64*
+ ; COMBINE_PTR_LABEL: load i64, i64*
; COMBINE_PTR_LABEL: trunc i64 {{.*}} i16
; COMBINE_PTR_LABEL: shl i64
; COMBINE_PTR_LABEL: lshr i64
@@ -135,12 +135,12 @@ define i64 @load64(i64* %p) {
; COMBINE_PTR_LABEL: icmp eq i64
; COMBINE_PTR_LABEL: icmp ne i16
; COMBINE_PTR_LABEL: call {{.*}} @__dfsan_union
- ; COMBINE_PTR_LABEL: load i64*
+ ; COMBINE_PTR_LABEL: load i64, i64*
; COMBINE_PTR_LABEL: store i16 {{.*}} @__dfsan_retval_tls
; COMBINE_PTR_LABEL: ret i64
; COMBINE_PTR_LABEL: call {{.*}} @__dfsan_union_load
- ; COMBINE_PTR_LABEL: getelementptr i64* {{.*}} i64
- ; COMBINE_PTR_LABEL: load i64*
+ ; COMBINE_PTR_LABEL: getelementptr i64, i64* {{.*}} i64
+ ; COMBINE_PTR_LABEL: load i64, i64*
; COMBINE_PTR_LABEL: icmp eq i64
; NO_COMBINE_PTR_LABEL: @"dfs$load64"
@@ -149,20 +149,20 @@ define i64 @load64(i64* %p) {
; NO_COMBINE_PTR_LABEL: mul i64
; NO_COMBINE_PTR_LABEL: inttoptr i64 {{.*}} i16*
; NO_COMBINE_PTR_LABEL: bitcast i16* {{.*}} i64*
- ; NO_COMBINE_PTR_LABEL: load i64*
+ ; NO_COMBINE_PTR_LABEL: load i64, i64*
; NO_COMBINE_PTR_LABEL: trunc i64 {{.*}} i16
; NO_COMBINE_PTR_LABEL: shl i64
; NO_COMBINE_PTR_LABEL: lshr i64
; NO_COMBINE_PTR_LABEL: or i64
; NO_COMBINE_PTR_LABEL: icmp eq i64
- ; NO_COMBINE_PTR_LABEL: load i64*
+ ; NO_COMBINE_PTR_LABEL: load i64, i64*
; NO_COMBINE_PTR_LABEL: store i16 {{.*}} @__dfsan_retval_tls
; NO_COMBINE_PTR_LABEL: ret i64
; NO_COMBINE_PTR_LABEL: call {{.*}} @__dfsan_union_load
- ; NO_COMBINE_PTR_LABEL: getelementptr i64* {{.*}} i64
- ; NO_COMBINE_PTR_LABEL: load i64*
+ ; NO_COMBINE_PTR_LABEL: getelementptr i64, i64* {{.*}} i64
+ ; NO_COMBINE_PTR_LABEL: load i64, i64*
; NO_COMBINE_PTR_LABEL: icmp eq i64
- %a = load i64* %p
+ %a = load i64, i64* %p
ret i64 %a
}
diff --git a/test/Instrumentation/DataFlowSanitizer/store.ll b/test/Instrumentation/DataFlowSanitizer/store.ll
index 365b62d..a66cedf 100644
--- a/test/Instrumentation/DataFlowSanitizer/store.ll
+++ b/test/Instrumentation/DataFlowSanitizer/store.ll
@@ -18,25 +18,25 @@ define void @store0({} %v, {}* %p) {
define void @store8(i8 %v, i8* %p) {
; NO_COMBINE_PTR_LABEL: @"dfs$store8"
- ; NO_COMBINE_PTR_LABEL: load i16* {{.*}} @__dfsan_arg_tls
+ ; NO_COMBINE_PTR_LABEL: load i16, i16* {{.*}} @__dfsan_arg_tls
; NO_COMBINE_PTR_LABEL: ptrtoint i8* {{.*}} i64
; NO_COMBINE_PTR_LABEL: and i64
; NO_COMBINE_PTR_LABEL: mul i64
; NO_COMBINE_PTR_LABEL: inttoptr i64 {{.*}} i16*
- ; NO_COMBINE_PTR_LABEL: getelementptr i16*
+ ; NO_COMBINE_PTR_LABEL: getelementptr i16, i16*
; NO_COMBINE_PTR_LABEL: store i16
; NO_COMBINE_PTR_LABEL: store i8
; COMBINE_PTR_LABEL: @"dfs$store8"
- ; COMBINE_PTR_LABEL: load i16*
- ; COMBINE_PTR_LABEL: load i16*
+ ; COMBINE_PTR_LABEL: load i16, i16*
+ ; COMBINE_PTR_LABEL: load i16, i16*
; COMBINE_PTR_LABEL: icmp ne i16
; COMBINE_PTR_LABEL: call {{.*}} @__dfsan_union
; COMBINE_PTR_LABEL: ptrtoint i8* {{.*}} i64
; COMBINE_PTR_LABEL: and i64
; COMBINE_PTR_LABEL: mul i64
; COMBINE_PTR_LABEL: inttoptr i64 {{.*}} i16*
- ; COMBINE_PTR_LABEL: getelementptr i16*
+ ; COMBINE_PTR_LABEL: getelementptr i16, i16*
; COMBINE_PTR_LABEL: store i16
; COMBINE_PTR_LABEL: store i8
@@ -46,29 +46,29 @@ define void @store8(i8 %v, i8* %p) {
define void @store16(i16 %v, i16* %p) {
; NO_COMBINE_PTR_LABEL: @"dfs$store16"
- ; NO_COMBINE_PTR_LABEL: load i16* {{.*}} @__dfsan_arg_tls
+ ; NO_COMBINE_PTR_LABEL: load i16, i16* {{.*}} @__dfsan_arg_tls
; NO_COMBINE_PTR_LABEL: ptrtoint i16* {{.*}} i64
; NO_COMBINE_PTR_LABEL: and i64
; NO_COMBINE_PTR_LABEL: mul i64
; NO_COMBINE_PTR_LABEL: inttoptr i64 {{.*}} i16*
- ; NO_COMBINE_PTR_LABEL: getelementptr i16*
+ ; NO_COMBINE_PTR_LABEL: getelementptr i16, i16*
; NO_COMBINE_PTR_LABEL: store i16
- ; NO_COMBINE_PTR_LABEL: getelementptr i16*
+ ; NO_COMBINE_PTR_LABEL: getelementptr i16, i16*
; NO_COMBINE_PTR_LABEL: store i16
; NO_COMBINE_PTR_LABEL: store i16
; COMBINE_PTR_LABEL: @"dfs$store16"
- ; COMBINE_PTR_LABEL: load i16* {{.*}} @__dfsan_arg_tls
- ; COMBINE_PTR_LABEL: load i16* {{.*}} @__dfsan_arg_tls
+ ; COMBINE_PTR_LABEL: load i16, i16* {{.*}} @__dfsan_arg_tls
+ ; COMBINE_PTR_LABEL: load i16, i16* {{.*}} @__dfsan_arg_tls
; COMBINE_PTR_LABEL: icmp ne i16
; COMBINE_PTR_LABEL: call {{.*}} @__dfsan_union
; COMBINE_PTR_LABEL: ptrtoint i16* {{.*}} i64
; COMBINE_PTR_LABEL: and i64
; COMBINE_PTR_LABEL: mul i64
; COMBINE_PTR_LABEL: inttoptr i64 {{.*}} i16*
- ; COMBINE_PTR_LABEL: getelementptr i16*
+ ; COMBINE_PTR_LABEL: getelementptr i16, i16*
; COMBINE_PTR_LABEL: store i16
- ; COMBINE_PTR_LABEL: getelementptr i16*
+ ; COMBINE_PTR_LABEL: getelementptr i16, i16*
; COMBINE_PTR_LABEL: store i16
; COMBINE_PTR_LABEL: store i16
@@ -78,37 +78,37 @@ define void @store16(i16 %v, i16* %p) {
define void @store32(i32 %v, i32* %p) {
; NO_COMBINE_PTR_LABEL: @"dfs$store32"
- ; NO_COMBINE_PTR_LABEL: load i16* {{.*}} @__dfsan_arg_tls
+ ; NO_COMBINE_PTR_LABEL: load i16, i16* {{.*}} @__dfsan_arg_tls
; NO_COMBINE_PTR_LABEL: ptrtoint i32* {{.*}} i64
; NO_COMBINE_PTR_LABEL: and i64
; NO_COMBINE_PTR_LABEL: mul i64
; NO_COMBINE_PTR_LABEL: inttoptr i64 {{.*}} i16*
- ; NO_COMBINE_PTR_LABEL: getelementptr i16*
+ ; NO_COMBINE_PTR_LABEL: getelementptr i16, i16*
; NO_COMBINE_PTR_LABEL: store i16
- ; NO_COMBINE_PTR_LABEL: getelementptr i16*
+ ; NO_COMBINE_PTR_LABEL: getelementptr i16, i16*
; NO_COMBINE_PTR_LABEL: store i16
- ; NO_COMBINE_PTR_LABEL: getelementptr i16*
+ ; NO_COMBINE_PTR_LABEL: getelementptr i16, i16*
; NO_COMBINE_PTR_LABEL: store i16
- ; NO_COMBINE_PTR_LABEL: getelementptr i16*
+ ; NO_COMBINE_PTR_LABEL: getelementptr i16, i16*
; NO_COMBINE_PTR_LABEL: store i16
; NO_COMBINE_PTR_LABEL: store i32
; COMBINE_PTR_LABEL: @"dfs$store32"
- ; COMBINE_PTR_LABEL: load i16* {{.*}} @__dfsan_arg_tls
- ; COMBINE_PTR_LABEL: load i16* {{.*}} @__dfsan_arg_tls
+ ; COMBINE_PTR_LABEL: load i16, i16* {{.*}} @__dfsan_arg_tls
+ ; COMBINE_PTR_LABEL: load i16, i16* {{.*}} @__dfsan_arg_tls
; COMBINE_PTR_LABEL: icmp ne i16
; COMBINE_PTR_LABEL: call {{.*}} @__dfsan_union
; COMBINE_PTR_LABEL: ptrtoint i32* {{.*}} i64
; COMBINE_PTR_LABEL: and i64
; COMBINE_PTR_LABEL: mul i64
; COMBINE_PTR_LABEL: inttoptr i64 {{.*}} i16*
- ; COMBINE_PTR_LABEL: getelementptr i16*
+ ; COMBINE_PTR_LABEL: getelementptr i16, i16*
; COMBINE_PTR_LABEL: store i16
- ; COMBINE_PTR_LABEL: getelementptr i16*
+ ; COMBINE_PTR_LABEL: getelementptr i16, i16*
; COMBINE_PTR_LABEL: store i16
- ; COMBINE_PTR_LABEL: getelementptr i16*
+ ; COMBINE_PTR_LABEL: getelementptr i16, i16*
; COMBINE_PTR_LABEL: store i16
- ; COMBINE_PTR_LABEL: getelementptr i16*
+ ; COMBINE_PTR_LABEL: getelementptr i16, i16*
; COMBINE_PTR_LABEL: store i16
; COMBINE_PTR_LABEL: store i32
@@ -118,7 +118,7 @@ define void @store32(i32 %v, i32* %p) {
define void @store64(i64 %v, i64* %p) {
; NO_COMBINE_PTR_LABEL: @"dfs$store64"
- ; NO_COMBINE_PTR_LABEL: load i16* {{.*}} @__dfsan_arg_tls
+ ; NO_COMBINE_PTR_LABEL: load i16, i16* {{.*}} @__dfsan_arg_tls
; NO_COMBINE_PTR_LABEL: ptrtoint i64* {{.*}} i64
; NO_COMBINE_PTR_LABEL: and i64
; NO_COMBINE_PTR_LABEL: mul i64
@@ -135,8 +135,8 @@ define void @store64(i64 %v, i64* %p) {
; NO_COMBINE_PTR_LABEL: store i64
; COMBINE_PTR_LABEL: @"dfs$store64"
- ; COMBINE_PTR_LABEL: load i16* {{.*}} @__dfsan_arg_tls
- ; COMBINE_PTR_LABEL: load i16* {{.*}} @__dfsan_arg_tls
+ ; COMBINE_PTR_LABEL: load i16, i16* {{.*}} @__dfsan_arg_tls
+ ; COMBINE_PTR_LABEL: load i16, i16* {{.*}} @__dfsan_arg_tls
; COMBINE_PTR_LABEL: icmp ne i16
; COMBINE_PTR_LABEL: call {{.*}} @__dfsan_union
; COMBINE_PTR_LABEL: ptrtoint i64* {{.*}} i64
diff --git a/test/Instrumentation/InstrProfiling/linkage.ll b/test/Instrumentation/InstrProfiling/linkage.ll
index 0a92d5d..fcca775 100644
--- a/test/Instrumentation/InstrProfiling/linkage.ll
+++ b/test/Instrumentation/InstrProfiling/linkage.ll
@@ -11,28 +11,28 @@
; CHECK: @__llvm_profile_counters_foo = hidden global
; CHECK: @__llvm_profile_data_foo = hidden constant
define void @foo() {
- call void @llvm.instrprof.increment(i8* getelementptr inbounds ([3 x i8]* @__llvm_profile_name_foo, i32 0, i32 0), i64 0, i32 1, i32 0)
+ call void @llvm.instrprof.increment(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @__llvm_profile_name_foo, i32 0, i32 0), i64 0, i32 1, i32 0)
ret void
}
; CHECK: @__llvm_profile_counters_foo_weak = weak hidden global
; CHECK: @__llvm_profile_data_foo_weak = weak hidden constant
define weak void @foo_weak() {
- call void @llvm.instrprof.increment(i8* getelementptr inbounds ([8 x i8]* @__llvm_profile_name_foo_weak, i32 0, i32 0), i64 0, i32 1, i32 0)
+ call void @llvm.instrprof.increment(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @__llvm_profile_name_foo_weak, i32 0, i32 0), i64 0, i32 1, i32 0)
ret void
}
; CHECK: @"__llvm_profile_counters_linkage.ll:foo_internal" = internal global
; CHECK: @"__llvm_profile_data_linkage.ll:foo_internal" = internal constant
define internal void @foo_internal() {
- call void @llvm.instrprof.increment(i8* getelementptr inbounds ([23 x i8]* @"__llvm_profile_name_linkage.ll:foo_internal", i32 0, i32 0), i64 0, i32 1, i32 0)
+ call void @llvm.instrprof.increment(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @"__llvm_profile_name_linkage.ll:foo_internal", i32 0, i32 0), i64 0, i32 1, i32 0)
ret void
}
; CHECK: @__llvm_profile_counters_foo_inline = linkonce_odr hidden global
; CHECK: @__llvm_profile_data_foo_inline = linkonce_odr hidden constant
define linkonce_odr void @foo_inline() {
- call void @llvm.instrprof.increment(i8* getelementptr inbounds ([10 x i8]* @__llvm_profile_name_foo_inline, i32 0, i32 0), i64 0, i32 1, i32 0)
+ call void @llvm.instrprof.increment(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__llvm_profile_name_foo_inline, i32 0, i32 0), i64 0, i32 1, i32 0)
ret void
}
@@ -41,6 +41,6 @@ declare void @llvm.instrprof.increment(i8*, i64, i32, i32)
; CHECK: @__llvm_profile_runtime = external global i32
; CHECK: define linkonce_odr hidden i32 @__llvm_profile_runtime_user() {{.*}} {
-; CHECK: %[[REG:.*]] = load i32* @__llvm_profile_runtime
+; CHECK: %[[REG:.*]] = load i32, i32* @__llvm_profile_runtime
; CHECK: ret i32 %[[REG]]
; CHECK: }
diff --git a/test/Instrumentation/InstrProfiling/noruntime.ll b/test/Instrumentation/InstrProfiling/noruntime.ll
index e69445d..f0619c8 100644
--- a/test/Instrumentation/InstrProfiling/noruntime.ll
+++ b/test/Instrumentation/InstrProfiling/noruntime.ll
@@ -2,14 +2,14 @@
; RUN: opt < %s -instrprof -S | FileCheck %s
; CHECK-NOT: define {{.*}} @__llvm_profile_runtime_user()
-; CHECK-NOT: load i32* @__llvm_profile_runtime
+; CHECK-NOT: load i32, i32* @__llvm_profile_runtime
@__llvm_profile_runtime = global i32 0, align 4
@__llvm_profile_name_foo = hidden constant [3 x i8] c"foo"
define void @foo() {
- call void @llvm.instrprof.increment(i8* getelementptr inbounds ([3 x i8]* @__llvm_profile_name_foo, i32 0, i32 0), i64 0, i32 1, i32 0)
+ call void @llvm.instrprof.increment(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @__llvm_profile_name_foo, i32 0, i32 0), i64 0, i32 1, i32 0)
ret void
}
diff --git a/test/Instrumentation/InstrProfiling/platform.ll b/test/Instrumentation/InstrProfiling/platform.ll
index e032768..5f16cba 100644
--- a/test/Instrumentation/InstrProfiling/platform.ll
+++ b/test/Instrumentation/InstrProfiling/platform.ll
@@ -13,7 +13,7 @@
; MACHO: @__llvm_profile_data_foo = hidden constant {{.*}}, section "__DATA,__llvm_prf_data", align 8
; ELF: @__llvm_profile_data_foo = hidden constant {{.*}}, section "__llvm_prf_data", align 8
define void @foo() {
- call void @llvm.instrprof.increment(i8* getelementptr inbounds ([3 x i8]* @__llvm_profile_name_foo, i32 0, i32 0), i64 0, i32 1, i32 0)
+ call void @llvm.instrprof.increment(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @__llvm_profile_name_foo, i32 0, i32 0), i64 0, i32 1, i32 0)
ret void
}
diff --git a/test/Instrumentation/InstrProfiling/profiling.ll b/test/Instrumentation/InstrProfiling/profiling.ll
index 246bf6b..52a6ead 100644
--- a/test/Instrumentation/InstrProfiling/profiling.ll
+++ b/test/Instrumentation/InstrProfiling/profiling.ll
@@ -12,23 +12,23 @@ target triple = "x86_64-apple-macosx10.10.0"
; CHECK: @__llvm_profile_counters_foo = hidden global [1 x i64] zeroinitializer, section "__DATA,__llvm_prf_cnts", align 8
; CHECK: @__llvm_profile_data_foo = hidden constant {{.*}}, section "__DATA,__llvm_prf_data", align 8
define void @foo() {
- call void @llvm.instrprof.increment(i8* getelementptr inbounds ([3 x i8]* @__llvm_profile_name_foo, i32 0, i32 0), i64 0, i32 1, i32 0)
+ call void @llvm.instrprof.increment(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @__llvm_profile_name_foo, i32 0, i32 0), i64 0, i32 1, i32 0)
ret void
}
; CHECK: @__llvm_profile_counters_bar = hidden global [1 x i64] zeroinitializer, section "__DATA,__llvm_prf_cnts", align 8
; CHECK: @__llvm_profile_data_bar = hidden constant {{.*}}, section "__DATA,__llvm_prf_data", align 8
define void @bar() {
- call void @llvm.instrprof.increment(i8* getelementptr inbounds ([4 x i8]* @__llvm_profile_name_bar, i32 0, i32 0), i64 0, i32 1, i32 0)
+ call void @llvm.instrprof.increment(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @__llvm_profile_name_bar, i32 0, i32 0), i64 0, i32 1, i32 0)
ret void
}
; CHECK: @__llvm_profile_counters_baz = hidden global [3 x i64] zeroinitializer, section "__DATA,__llvm_prf_cnts", align 8
; CHECK: @__llvm_profile_data_baz = hidden constant {{.*}}, section "__DATA,__llvm_prf_data", align 8
define void @baz() {
- call void @llvm.instrprof.increment(i8* getelementptr inbounds ([3 x i8]* @baz_prof_name, i32 0, i32 0), i64 0, i32 3, i32 0)
- call void @llvm.instrprof.increment(i8* getelementptr inbounds ([3 x i8]* @baz_prof_name, i32 0, i32 0), i64 0, i32 3, i32 1)
- call void @llvm.instrprof.increment(i8* getelementptr inbounds ([3 x i8]* @baz_prof_name, i32 0, i32 0), i64 0, i32 3, i32 2)
+ call void @llvm.instrprof.increment(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @baz_prof_name, i32 0, i32 0), i64 0, i32 3, i32 0)
+ call void @llvm.instrprof.increment(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @baz_prof_name, i32 0, i32 0), i64 0, i32 3, i32 1)
+ call void @llvm.instrprof.increment(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @baz_prof_name, i32 0, i32 0), i64 0, i32 3, i32 2)
ret void
}
diff --git a/test/Instrumentation/MemorySanitizer/array_types.ll b/test/Instrumentation/MemorySanitizer/array_types.ll
index fa3835f..e96716a 100644
--- a/test/Instrumentation/MemorySanitizer/array_types.ll
+++ b/test/Instrumentation/MemorySanitizer/array_types.ll
@@ -12,8 +12,8 @@ entry:
}
; CHECK-LABEL: @InsertValue(
-; CHECK-DAG: [[Sy:%.*]] = load i32* {{.*}}@__msan_param_tls to i64), i64 8) to i32*)
-; CHECK-DAG: [[Sx:%.*]] = load i32* {{.*}}@__msan_param_tls to i32*)
+; CHECK-DAG: [[Sy:%.*]] = load i32, i32* {{.*}}@__msan_param_tls to i64), i64 8) to i32*)
+; CHECK-DAG: [[Sx:%.*]] = load i32, i32* {{.*}}@__msan_param_tls to i32*)
; CHECK: [[A:%.*]] = insertvalue [2 x i32] [i32 -1, i32 -1], i32 [[Sx]], 0
; CHECK: [[B:%.*]] = insertvalue [2 x i32] [[A]], i32 [[Sy]], 1
; CHECK: store [2 x i32] [[B]], [2 x i32]* {{.*}}@__msan_retval_tls
@@ -28,8 +28,8 @@ entry:
}
; CHECK-LABEL: @InsertValueDouble(
-; CHECK-DAG: [[Sy:%.*]] = load i64* {{.*}}@__msan_param_tls to i64), i64 8) to i64*)
-; CHECK-DAG: [[Sx:%.*]] = load i64* getelementptr {{.*}}@__msan_param_tls, i32 0, i32 0
+; CHECK-DAG: [[Sy:%.*]] = load i64, i64* {{.*}}@__msan_param_tls to i64), i64 8) to i64*)
+; CHECK-DAG: [[Sx:%.*]] = load i64, i64* getelementptr {{.*}}@__msan_param_tls, i32 0, i32 0
; CHECK: [[A:%.*]] = insertvalue [2 x i64] [i64 -1, i64 -1], i64 [[Sx]], 0
; CHECK: [[B:%.*]] = insertvalue [2 x i64] [[A]], i64 [[Sy]], 1
; CHECK: store [2 x i64] [[B]], [2 x i64]* {{.*}}@__msan_retval_tls
@@ -43,7 +43,7 @@ entry:
}
; CHECK-LABEL: @ExtractValue(
-; CHECK: [[Sa:%.*]] = load [2 x i32]* {{.*}}@__msan_param_tls to [2 x i32]*)
+; CHECK: [[Sa:%.*]] = load [2 x i32], [2 x i32]* {{.*}}@__msan_param_tls to [2 x i32]*)
; CHECK: [[Sx:%.*]] = extractvalue [2 x i32] [[Sa]], 1
; CHECK: store i32 [[Sx]], i32* {{.*}}@__msan_retval_tls
; CHECK: ret i32
@@ -59,7 +59,7 @@ define i32 @ArrayInStruct(%MyStruct %s) sanitize_memory {
}
; CHECK-LABEL: @ArrayInStruct(
-; CHECK: [[Ss:%.*]] = load { i32, i32, [3 x i32] }* {{.*}}@__msan_param_tls to { i32, i32, [3 x i32] }*)
+; CHECK: [[Ss:%.*]] = load { i32, i32, [3 x i32] }, { i32, i32, [3 x i32] }* {{.*}}@__msan_param_tls to { i32, i32, [3 x i32] }*)
; CHECK: [[Sx:%.*]] = extractvalue { i32, i32, [3 x i32] } [[Ss]], 2, 1
; CHECK: store i32 [[Sx]], i32* {{.*}}@__msan_retval_tls
; CHECK: ret i32
@@ -71,7 +71,7 @@ define i32 @ArrayOfStructs([3 x { i32, i32 }] %a) sanitize_memory {
}
; CHECK-LABEL: @ArrayOfStructs(
-; CHECK: [[Ss:%.*]] = load [3 x { i32, i32 }]* {{.*}}@__msan_param_tls to [3 x { i32, i32 }]*)
+; CHECK: [[Ss:%.*]] = load [3 x { i32, i32 }], [3 x { i32, i32 }]* {{.*}}@__msan_param_tls to [3 x { i32, i32 }]*)
; CHECK: [[Sx:%.*]] = extractvalue [3 x { i32, i32 }] [[Ss]], 2, 1
; CHECK: store i32 [[Sx]], i32* {{.*}}@__msan_retval_tls
; CHECK: ret i32
@@ -83,7 +83,7 @@ define <8 x i16> @ArrayOfVectors([3 x <8 x i16>] %a) sanitize_memory {
}
; CHECK-LABEL: @ArrayOfVectors(
-; CHECK: [[Ss:%.*]] = load [3 x <8 x i16>]* {{.*}}@__msan_param_tls to [3 x <8 x i16>]*)
+; CHECK: [[Ss:%.*]] = load [3 x <8 x i16>], [3 x <8 x i16>]* {{.*}}@__msan_param_tls to [3 x <8 x i16>]*)
; CHECK: [[Sx:%.*]] = extractvalue [3 x <8 x i16>] [[Ss]], 1
; CHECK: store <8 x i16> [[Sx]], <8 x i16>* {{.*}}@__msan_retval_tls
; CHECK: ret <8 x i16>
diff --git a/test/Instrumentation/MemorySanitizer/atomics.ll b/test/Instrumentation/MemorySanitizer/atomics.ll
index 28736ad..e896eae 100644
--- a/test/Instrumentation/MemorySanitizer/atomics.ll
+++ b/test/Instrumentation/MemorySanitizer/atomics.ll
@@ -77,13 +77,13 @@ entry:
define i32 @AtomicLoad(i32* %p) sanitize_memory {
entry:
- %0 = load atomic i32* %p seq_cst, align 16
+ %0 = load atomic i32, i32* %p seq_cst, align 16
ret i32 %0
}
; CHECK: @AtomicLoad
-; CHECK: load atomic i32* {{.*}} seq_cst, align 16
-; CHECK: [[SHADOW:%[01-9a-z_]+]] = load i32* {{.*}}, align 16
+; CHECK: load atomic i32, i32* {{.*}} seq_cst, align 16
+; CHECK: [[SHADOW:%[01-9a-z_]+]] = load i32, i32* {{.*}}, align 16
; CHECK: store i32 {{.*}}[[SHADOW]], {{.*}} @__msan_retval_tls
; CHECK: ret i32
@@ -92,13 +92,13 @@ entry:
define i32 @AtomicLoadAcquire(i32* %p) sanitize_memory {
entry:
- %0 = load atomic i32* %p acquire, align 16
+ %0 = load atomic i32, i32* %p acquire, align 16
ret i32 %0
}
; CHECK: @AtomicLoadAcquire
-; CHECK: load atomic i32* {{.*}} acquire, align 16
-; CHECK: [[SHADOW:%[01-9a-z_]+]] = load i32* {{.*}}, align 16
+; CHECK: load atomic i32, i32* {{.*}} acquire, align 16
+; CHECK: [[SHADOW:%[01-9a-z_]+]] = load i32, i32* {{.*}}, align 16
; CHECK: store i32 {{.*}}[[SHADOW]], {{.*}} @__msan_retval_tls
; CHECK: ret i32
@@ -107,13 +107,13 @@ entry:
define i32 @AtomicLoadMonotonic(i32* %p) sanitize_memory {
entry:
- %0 = load atomic i32* %p monotonic, align 16
+ %0 = load atomic i32, i32* %p monotonic, align 16
ret i32 %0
}
; CHECK: @AtomicLoadMonotonic
-; CHECK: load atomic i32* {{.*}} acquire, align 16
-; CHECK: [[SHADOW:%[01-9a-z_]+]] = load i32* {{.*}}, align 16
+; CHECK: load atomic i32, i32* {{.*}} acquire, align 16
+; CHECK: [[SHADOW:%[01-9a-z_]+]] = load i32, i32* {{.*}}, align 16
; CHECK: store i32 {{.*}}[[SHADOW]], {{.*}} @__msan_retval_tls
; CHECK: ret i32
@@ -122,13 +122,13 @@ entry:
define i32 @AtomicLoadUnordered(i32* %p) sanitize_memory {
entry:
- %0 = load atomic i32* %p unordered, align 16
+ %0 = load atomic i32, i32* %p unordered, align 16
ret i32 %0
}
; CHECK: @AtomicLoadUnordered
-; CHECK: load atomic i32* {{.*}} acquire, align 16
-; CHECK: [[SHADOW:%[01-9a-z_]+]] = load i32* {{.*}}, align 16
+; CHECK: load atomic i32, i32* {{.*}} acquire, align 16
+; CHECK: [[SHADOW:%[01-9a-z_]+]] = load i32, i32* {{.*}}, align 16
; CHECK: store i32 {{.*}}[[SHADOW]], {{.*}} @__msan_retval_tls
; CHECK: ret i32
diff --git a/test/Instrumentation/MemorySanitizer/check_access_address.ll b/test/Instrumentation/MemorySanitizer/check_access_address.ll
index 5660226..5e1a3f4 100644
--- a/test/Instrumentation/MemorySanitizer/check_access_address.ll
+++ b/test/Instrumentation/MemorySanitizer/check_access_address.ll
@@ -8,7 +8,7 @@ target triple = "x86_64-unknown-linux-gnu"
define <2 x i64> @ByValArgumentShadowLargeAlignment(<2 x i64>* byval %p) sanitize_memory {
entry:
- %x = load <2 x i64>* %p
+ %x = load <2 x i64>, <2 x i64>* %p
ret <2 x i64> %x
}
@@ -19,7 +19,7 @@ entry:
define i16 @ByValArgumentShadowSmallAlignment(i16* byval %p) sanitize_memory {
entry:
- %x = load i16* %p
+ %x = load i16, i16* %p
ret i16 %x
}
diff --git a/test/Instrumentation/MemorySanitizer/instrumentation-with-call-threshold.ll b/test/Instrumentation/MemorySanitizer/instrumentation-with-call-threshold.ll
index beb3c5f..fb1cdbb 100644
--- a/test/Instrumentation/MemorySanitizer/instrumentation-with-call-threshold.ll
+++ b/test/Instrumentation/MemorySanitizer/instrumentation-with-call-threshold.ll
@@ -11,7 +11,7 @@ target triple = "x86_64-unknown-linux-gnu"
define void @LoadAndCmp(i32* nocapture %a) nounwind uwtable sanitize_memory {
entry:
- %0 = load i32* %a, align 4
+ %0 = load i32, i32* %a, align 4
%tobool = icmp eq i32 %0, 0
br i1 %tobool, label %if.end, label %if.then
diff --git a/test/Instrumentation/MemorySanitizer/missing_origin.ll b/test/Instrumentation/MemorySanitizer/missing_origin.ll
index f7385b9..08289ab 100644
--- a/test/Instrumentation/MemorySanitizer/missing_origin.ll
+++ b/test/Instrumentation/MemorySanitizer/missing_origin.ll
@@ -14,7 +14,7 @@ entry:
}
; CHECK-LABEL: @Shuffle(
-; CHECK: [[A:%.*]] = load i32* {{.*}}@__msan_param_origin_tls,
+; CHECK: [[A:%.*]] = load i32, i32* {{.*}}@__msan_param_origin_tls,
; CHECK: store i32 [[A]], i32* @__msan_retval_origin_tls
; CHECK: ret <4 x i32>
diff --git a/test/Instrumentation/MemorySanitizer/msan_basic.ll b/test/Instrumentation/MemorySanitizer/msan_basic.ll
index 0faf45d..7472559 100644
--- a/test/Instrumentation/MemorySanitizer/msan_basic.ll
+++ b/test/Instrumentation/MemorySanitizer/msan_basic.ll
@@ -70,7 +70,7 @@ entry:
; load followed by cmp: check that we load the shadow and call __msan_warning.
define void @LoadAndCmp(i32* nocapture %a) nounwind uwtable sanitize_memory {
entry:
- %0 = load i32* %a, align 4
+ %0 = load i32, i32* %a, align 4
%tobool = icmp eq i32 %0, 0
br i1 %tobool, label %if.end, label %if.then
@@ -124,11 +124,11 @@ entry:
br i1 %tobool, label %if.else, label %if.then
if.then: ; preds = %entry
- %0 = load i32* %b, align 4
+ %0 = load i32, i32* %b, align 4
br label %if.end
if.else: ; preds = %entry
- %1 = load i32* %c, align 4
+ %1 = load i32, i32* %c, align 4
br label %if.end
if.end: ; preds = %if.else, %if.then
@@ -147,7 +147,7 @@ entry:
; Compute shadow for "x << 10"
define void @ShlConst(i32* nocapture %x) nounwind uwtable sanitize_memory {
entry:
- %0 = load i32* %x, align 4
+ %0 = load i32, i32* %x, align 4
%1 = shl i32 %0, 10
store i32 %1, i32* %x, align 4
ret void
@@ -165,7 +165,7 @@ entry:
; Compute shadow for "10 << x": it should have 'sext i1'.
define void @ShlNonConst(i32* nocapture %x) nounwind uwtable sanitize_memory {
entry:
- %0 = load i32* %x, align 4
+ %0 = load i32, i32* %x, align 4
%1 = shl i32 10, %0
store i32 %1, i32* %x, align 4
ret void
@@ -182,7 +182,7 @@ entry:
; SExt
define void @SExt(i32* nocapture %a, i16* nocapture %b) nounwind uwtable sanitize_memory {
entry:
- %0 = load i16* %b, align 2
+ %0 = load i16, i16* %b, align 2
%1 = sext i16 %0 to i32
store i32 %1, i32* %a, align 4
ret void
@@ -345,8 +345,8 @@ entry:
}
; CHECK: @IntToPtr
-; CHECK: load i64*{{.*}}__msan_param_tls
-; CHECK-ORIGINS-NEXT: load i32*{{.*}}__msan_param_origin_tls
+; CHECK: load i64, i64*{{.*}}__msan_param_tls
+; CHECK-ORIGINS-NEXT: load i32, i32*{{.*}}__msan_param_origin_tls
; CHECK-NEXT: inttoptr
; CHECK-NEXT: store i64{{.*}}__msan_retval_tls
; CHECK: ret i8*
@@ -359,7 +359,7 @@ entry:
}
; CHECK: @IntToPtr_ZExt
-; CHECK: load i16*{{.*}}__msan_param_tls
+; CHECK: load i16, i16*{{.*}}__msan_param_tls
; CHECK: zext
; CHECK-NEXT: inttoptr
; CHECK-NEXT: store i64{{.*}}__msan_retval_tls
@@ -475,25 +475,25 @@ entry:
define i32 @ShadowLoadAlignmentLarge() nounwind uwtable sanitize_memory {
%y = alloca i32, align 64
- %1 = load volatile i32* %y, align 64
+ %1 = load volatile i32, i32* %y, align 64
ret i32 %1
}
; CHECK: @ShadowLoadAlignmentLarge
-; CHECK: load volatile i32* {{.*}} align 64
-; CHECK: load i32* {{.*}} align 64
+; CHECK: load volatile i32, i32* {{.*}} align 64
+; CHECK: load i32, i32* {{.*}} align 64
; CHECK: ret i32
define i32 @ShadowLoadAlignmentSmall() nounwind uwtable sanitize_memory {
%y = alloca i32, align 2
- %1 = load volatile i32* %y, align 2
+ %1 = load volatile i32, i32* %y, align 2
ret i32 %1
}
; CHECK: @ShadowLoadAlignmentSmall
-; CHECK: load volatile i32* {{.*}} align 2
-; CHECK: load i32* {{.*}} align 2
-; CHECK-ORIGINS: load i32* {{.*}} align 4
+; CHECK: load volatile i32, i32* {{.*}} align 2
+; CHECK: load i32, i32* {{.*}} align 2
+; CHECK-ORIGINS: load i32, i32* {{.*}} align 4
; CHECK: ret i32
@@ -580,8 +580,8 @@ define <16 x i8> @LoadIntrinsic(i8* %p) nounwind uwtable sanitize_memory {
declare <16 x i8> @llvm.x86.sse3.ldu.dq(i8* %p) nounwind
; CHECK: @LoadIntrinsic
-; CHECK: load <16 x i8>* {{.*}} align 1
-; CHECK-ORIGINS: [[ORIGIN:%[01-9a-z]+]] = load i32* {{.*}}
+; CHECK: load <16 x i8>, <16 x i8>* {{.*}} align 1
+; CHECK-ORIGINS: [[ORIGIN:%[01-9a-z]+]] = load i32, i32* {{.*}}
; CHECK-NOT: br
; CHECK-NOT: = or
; CHECK: call <16 x i8> @llvm.x86.sse3.ldu.dq
@@ -602,10 +602,10 @@ define <8 x i16> @Paddsw128(<8 x i16> %a, <8 x i16> %b) nounwind uwtable sanitiz
declare <8 x i16> @llvm.x86.sse2.padds.w(<8 x i16> %a, <8 x i16> %b) nounwind
; CHECK: @Paddsw128
-; CHECK-NEXT: load <8 x i16>* {{.*}} @__msan_param_tls
-; CHECK-ORIGINS: load i32* {{.*}} @__msan_param_origin_tls
-; CHECK-NEXT: load <8 x i16>* {{.*}} @__msan_param_tls
-; CHECK-ORIGINS: load i32* {{.*}} @__msan_param_origin_tls
+; CHECK-NEXT: load <8 x i16>, <8 x i16>* {{.*}} @__msan_param_tls
+; CHECK-ORIGINS: load i32, i32* {{.*}} @__msan_param_origin_tls
+; CHECK-NEXT: load <8 x i16>, <8 x i16>* {{.*}} @__msan_param_tls
+; CHECK-ORIGINS: load i32, i32* {{.*}} @__msan_param_origin_tls
; CHECK-NEXT: = or <8 x i16>
; CHECK-ORIGINS: = bitcast <8 x i16> {{.*}} to i128
; CHECK-ORIGINS-NEXT: = icmp ne i128 {{.*}}, 0
@@ -620,13 +620,13 @@ declare <8 x i16> @llvm.x86.sse2.padds.w(<8 x i16> %a, <8 x i16> %b) nounwind
; Check that shadow of such vector is a vector of integers.
define <8 x i8*> @VectorOfPointers(<8 x i8*>* %p) nounwind uwtable sanitize_memory {
- %x = load <8 x i8*>* %p
+ %x = load <8 x i8*>, <8 x i8*>* %p
ret <8 x i8*> %x
}
; CHECK: @VectorOfPointers
-; CHECK: load <8 x i8*>*
-; CHECK: load <8 x i64>*
+; CHECK: load <8 x i8*>, <8 x i8*>*
+; CHECK: load <8 x i64>, <8 x i64>*
; CHECK: store <8 x i64> {{.*}} @__msan_retval_tls
; CHECK: ret <8 x i8*>
@@ -656,7 +656,7 @@ entry:
%x.addr = alloca i32, align 4
%va = alloca [1 x %struct.__va_list_tag], align 16
store i32 %x, i32* %x.addr, align 4
- %arraydecay = getelementptr inbounds [1 x %struct.__va_list_tag]* %va, i32 0, i32 0
+ %arraydecay = getelementptr inbounds [1 x %struct.__va_list_tag], [1 x %struct.__va_list_tag]* %va, i32 0, i32 0
%arraydecay1 = bitcast %struct.__va_list_tag* %arraydecay to i8*
call void @llvm.va_start(i8* %arraydecay1)
ret void
@@ -772,7 +772,7 @@ cond.end: ; preds = %cond.false, %cond.t
define i32 @NoSanitizeMemoryParamTLS(i32* nocapture readonly %x) {
entry:
- %0 = load i32* %x, align 4
+ %0 = load i32, i32* %x, align 4
%call = tail call i32 @NoSanitizeMemoryParamTLSHelper(i32 %0)
ret i32 %call
}
@@ -792,7 +792,7 @@ entry:
}
; CHECK: @ArgumentShadowAlignment
-; CHECK: load <2 x i64>* {{.*}} @__msan_param_tls {{.*}}, align 8
+; CHECK: load <2 x i64>, <2 x i64>* {{.*}} @__msan_param_tls {{.*}}, align 8
; CHECK: store <2 x i64> {{.*}} @__msan_retval_tls {{.*}}, align 8
; CHECK: ret <2 x i64>
@@ -835,10 +835,10 @@ entry:
%agg.tmp2 = alloca %struct.StructByVal, align 8
%0 = bitcast %struct.StructByVal* %s to i8*
%agg.tmp.sroa.0.0..sroa_cast = bitcast %struct.StructByVal* %s to i64*
- %agg.tmp.sroa.0.0.copyload = load i64* %agg.tmp.sroa.0.0..sroa_cast, align 4
- %agg.tmp.sroa.2.0..sroa_idx = getelementptr inbounds %struct.StructByVal* %s, i64 0, i32 2
+ %agg.tmp.sroa.0.0.copyload = load i64, i64* %agg.tmp.sroa.0.0..sroa_cast, align 4
+ %agg.tmp.sroa.2.0..sroa_idx = getelementptr inbounds %struct.StructByVal, %struct.StructByVal* %s, i64 0, i32 2
%agg.tmp.sroa.2.0..sroa_cast = bitcast i32* %agg.tmp.sroa.2.0..sroa_idx to i64*
- %agg.tmp.sroa.2.0.copyload = load i64* %agg.tmp.sroa.2.0..sroa_cast, align 4
+ %agg.tmp.sroa.2.0.copyload = load i64, i64* %agg.tmp.sroa.2.0..sroa_cast, align 4
%1 = bitcast %struct.StructByVal* %agg.tmp2 to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* %1, i8* %0, i64 16, i32 4, i1 false)
call void (i32, ...)* @VAArgStructFn(i32 undef, i64 %agg.tmp.sroa.0.0.copyload, i64 %agg.tmp.sroa.2.0.copyload, i64 %agg.tmp.sroa.0.0.copyload, i64 %agg.tmp.sroa.2.0.copyload, %struct.StructByVal* byval align 8 %agg.tmp2)
diff --git a/test/Instrumentation/MemorySanitizer/store-long-origin.ll b/test/Instrumentation/MemorySanitizer/store-long-origin.ll
index 128f810..23ba4a1 100644
--- a/test/Instrumentation/MemorySanitizer/store-long-origin.ll
+++ b/test/Instrumentation/MemorySanitizer/store-long-origin.ll
@@ -29,7 +29,7 @@ entry:
; CHECK-LABEL: define void @Store8_align4(
; CHECK: store i64 {{.*}}, align 4
; CHECK: store i32 {{.*}}, align 4
-; CHECK: getelementptr i32* {{.*}}, i32 1
+; CHECK: getelementptr i32, i32* {{.*}}, i32 1
; CHECK: store i32 {{.*}}, align 4
; CHECK: store i64 {{.*}}, align 4
; CHECK: ret void
@@ -46,9 +46,9 @@ entry:
; CHECK-LABEL: define void @StoreAgg(
; CHECK: store { i32, i32, i32 } {{.*}}, align 4
; CHECK: store i32 {{.*}}, align 4
-; CHECK: getelementptr i32* {{.*}}, i32 1
+; CHECK: getelementptr i32, i32* {{.*}}, i32 1
; CHECK: store i32 {{.*}}, align 4
-; CHECK: getelementptr i32* {{.*}}, i32 2
+; CHECK: getelementptr i32, i32* {{.*}}, i32 2
; CHECK: store i32 {{.*}}, align 4
; CHECK: store %struct.S {{.*}}, align 4
; CHECK: ret void
@@ -64,7 +64,7 @@ entry:
; CHECK-LABEL: define void @StoreAgg8(
; CHECK: store { i32, i32, i32 } {{.*}}, align 8
; CHECK: store i64 {{.*}}, align 8
-; CHECK: getelementptr i32* {{.*}}, i32 2
+; CHECK: getelementptr i32, i32* {{.*}}, i32 2
; CHECK: store i32 {{.*}}, align 8
; CHECK: store %struct.S {{.*}}, align 8
; CHECK: ret void
@@ -81,9 +81,9 @@ entry:
; CHECK-LABEL: define void @StoreAgg24(
; CHECK: store { i64, i64, i64 } {{.*}}, align 8
; CHECK: store i64 {{.*}}, align 8
-; CHECK: getelementptr i64* {{.*}}, i32 1
+; CHECK: getelementptr i64, i64* {{.*}}, i32 1
; CHECK: store i64 {{.*}}, align 8
-; CHECK: getelementptr i64* {{.*}}, i32 2
+; CHECK: getelementptr i64, i64* {{.*}}, i32 2
; CHECK: store i64 {{.*}}, align 8
; CHECK: store %struct.Q {{.*}}, align 8
; CHECK: ret void
diff --git a/test/Instrumentation/MemorySanitizer/store-origin.ll b/test/Instrumentation/MemorySanitizer/store-origin.ll
index c2948b1..92c0b2c 100644
--- a/test/Instrumentation/MemorySanitizer/store-origin.ll
+++ b/test/Instrumentation/MemorySanitizer/store-origin.ll
@@ -11,8 +11,8 @@ target triple = "x86_64-unknown-linux-gnu"
; Function Attrs: nounwind
define void @Store(i32* nocapture %p, i32 %x) #0 {
entry:
- tail call void @llvm.dbg.value(metadata i32* %p, i64 0, metadata !11, metadata !{!"0x102"}), !dbg !16
- tail call void @llvm.dbg.value(metadata i32 %x, i64 0, metadata !12, metadata !{!"0x102"}), !dbg !16
+ tail call void @llvm.dbg.value(metadata i32* %p, i64 0, metadata !11, metadata !MDExpression()), !dbg !16
+ tail call void @llvm.dbg.value(metadata i32 %x, i64 0, metadata !12, metadata !MDExpression()), !dbg !16
store i32 %x, i32* %p, align 4, !dbg !17, !tbaa !18
ret void, !dbg !22
}
@@ -27,21 +27,21 @@ attributes #1 = { nounwind readnone }
!llvm.module.flags = !{!13, !14}
!llvm.ident = !{!15}
-!0 = !{!"0x11\0012\00clang version 3.5.0 (204220)\001\00\000\00\001", !1, !2, !2, !3, !2, !2} ; [ DW_TAG_compile_unit ] [/tmp/build0/../2.cc] [DW_LANG_C99]
-!1 = !{!"../2.cc", !"/tmp/build0"}
+!0 = !MDCompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 (204220)", isOptimized: true, emissionKind: 1, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2)
+!1 = !MDFile(filename: "../2.cc", directory: "/tmp/build0")
!2 = !{}
!3 = !{!4}
-!4 = !{!"0x2e\00Store\00Store\00\001\000\001\000\006\00256\001\001", !1, !5, !6, null, void (i32*, i32)* @Store, null, null, !10} ; [ DW_TAG_subprogram ] [line 1] [def] [Store]
-!5 = !{!"0x29", !1} ; [ DW_TAG_file_type ] [/tmp/build0/../2.cc]
-!6 = !{!"0x15\00\000\000\000\000\000\000", i32 0, null, null, !7, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!4 = !MDSubprogram(name: "Store", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 1, file: !1, scope: !5, type: !6, function: void (i32*, i32)* @Store, variables: !10)
+!5 = !MDFile(filename: "../2.cc", directory: "/tmp/build0")
+!6 = !MDSubroutineType(types: !7)
!7 = !{null, !8, !9}
-!8 = !{!"0xf\00\000\0064\0064\000\000", null, null, !9} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [from int]
-!9 = !{!"0x24\00int\000\0032\0032\000\000\005", null, null} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed]
+!8 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !9)
+!9 = !MDBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
!10 = !{!11, !12}
-!11 = !{!"0x101\00p\0016777217\000", !4, !5, !8} ; [ DW_TAG_arg_variable ] [p] [line 1]
-!12 = !{!"0x101\00x\0033554433\000", !4, !5, !9} ; [ DW_TAG_arg_variable ] [x] [line 1]
+!11 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "p", line: 1, arg: 1, scope: !4, file: !5, type: !8)
+!12 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "x", line: 1, arg: 2, scope: !4, file: !5, type: !9)
!13 = !{i32 2, !"Dwarf Version", i32 4}
-!14 = !{i32 1, !"Debug Info Version", i32 2}
+!14 = !{i32 1, !"Debug Info Version", i32 3}
!15 = !{!"clang version 3.5.0 (204220)"}
!16 = !MDLocation(line: 1, scope: !4)
!17 = !MDLocation(line: 2, scope: !4)
diff --git a/test/Instrumentation/MemorySanitizer/unreachable.ll b/test/Instrumentation/MemorySanitizer/unreachable.ll
index c813071..e9a79ce 100644
--- a/test/Instrumentation/MemorySanitizer/unreachable.ll
+++ b/test/Instrumentation/MemorySanitizer/unreachable.ll
@@ -10,7 +10,7 @@ entry:
br label %exit
unreachable:
- %x = load i32* %p
+ %x = load i32, i32* %p
br label %exit
exit:
diff --git a/test/Instrumentation/MemorySanitizer/vector_cvt.ll b/test/Instrumentation/MemorySanitizer/vector_cvt.ll
index 9425e25..a7d5f21 100644
--- a/test/Instrumentation/MemorySanitizer/vector_cvt.ll
+++ b/test/Instrumentation/MemorySanitizer/vector_cvt.ll
@@ -34,7 +34,7 @@ entry:
}
; CHECK: @test_cvtsi2sd
-; CHECK: [[Sa:%[_01-9a-z]+]] = load i32* {{.*}} @__msan_param_tls
+; CHECK: [[Sa:%[_01-9a-z]+]] = load i32, i32* {{.*}} @__msan_param_tls
; CHECK: [[Sout0:%[_01-9a-z]+]] = insertelement <2 x i64> <i64 -1, i64 -1>, i64 {{.*}}, i32 1
; Clear low half of result shadow
; CHECK: [[Sout:%[_01-9a-z]+]] = insertelement <2 x i64> {{.*}}[[Sout0]], i64 0, i32 0
diff --git a/test/Instrumentation/SanitizerCoverage/cmp-tracing.ll b/test/Instrumentation/SanitizerCoverage/cmp-tracing.ll
new file mode 100644
index 0000000..a37cdec
--- /dev/null
+++ b/test/Instrumentation/SanitizerCoverage/cmp-tracing.ll
@@ -0,0 +1,13 @@
+; Test -sanitizer-coverage-experimental-trace-compares=1
+; RUN: opt < %s -sancov -sanitizer-coverage-level=1 -sanitizer-coverage-experimental-trace-compares=1 -S | FileCheck %s --check-prefix=CHECK
+
+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"
+define i32 @foo(i32 %a, i32 %b) #0 {
+entry:
+ %cmp = icmp slt i32 %a, %b
+; CHECK: call void @__sanitizer_cov_trace_cmp
+; CHECK-NEXT: icmp slt i32 %a, %b
+ %conv = zext i1 %cmp to i32
+ ret i32 %conv
+}
diff --git a/test/Instrumentation/SanitizerCoverage/coverage-dbg.ll b/test/Instrumentation/SanitizerCoverage/coverage-dbg.ll
index a1b23f1..d3ee7b3 100644
--- a/test/Instrumentation/SanitizerCoverage/coverage-dbg.ll
+++ b/test/Instrumentation/SanitizerCoverage/coverage-dbg.ll
@@ -27,9 +27,9 @@ target triple = "x86_64-unknown-linux-gnu"
; Function Attrs: nounwind readonly uwtable
define i32 @_ZN1A1fEv(%struct.A* nocapture readonly %this) #0 align 2 {
entry:
- tail call void @llvm.dbg.value(metadata %struct.A* %this, i64 0, metadata !15, metadata !{!"0x102"}), !dbg !20
- %x = getelementptr inbounds %struct.A* %this, i64 0, i32 0, !dbg !21
- %0 = load i32* %x, align 4, !dbg !21
+ tail call void @llvm.dbg.value(metadata %struct.A* %this, i64 0, metadata !15, metadata !MDExpression()), !dbg !20
+ %x = getelementptr inbounds %struct.A, %struct.A* %this, i64 0, i32 0, !dbg !21
+ %0 = load i32, i32* %x, align 4, !dbg !21
ret i32 %0, !dbg !21
}
@@ -43,25 +43,25 @@ attributes #1 = { nounwind readnone }
!llvm.module.flags = !{!17, !18}
!llvm.ident = !{!19}
-!0 = !{!"0x11\004\00clang version 3.5.0 (210251)\001\00\000\00\001", !1, !2, !3, !12, !2, !2} ; [ DW_TAG_compile_unit ] [/code/llvm/build0/../1.cc] [DW_LANG_C_plus_plus]
-!1 = !{!"../1.cc", !"/code/llvm/build0"}
+!0 = !MDCompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 (210251)", isOptimized: true, emissionKind: 1, file: !1, enums: !2, retainedTypes: !3, subprograms: !12, globals: !2, imports: !2)
+!1 = !MDFile(filename: "../1.cc", directory: "/code/llvm/build0")
!2 = !{}
!3 = !{!4}
-!4 = !{!"0x13\00A\001\0032\0032\000\000\000", !1, null, null, !5, null, null, !"_ZTS1A"} ; [ DW_TAG_structure_type ] [A] [line 1, size 32, align 32, offset 0] [def] [from ]
+!4 = !MDCompositeType(tag: DW_TAG_structure_type, name: "A", line: 1, size: 32, align: 32, file: !1, elements: !5, identifier: "_ZTS1A")
!5 = !{!6, !8}
-!6 = !{!"0xd\00x\003\0032\0032\000\000", !1, !"_ZTS1A", !7} ; [ DW_TAG_member ] [x] [line 3, size 32, align 32, offset 0] [from int]
-!7 = !{!"0x24\00int\000\0032\0032\000\000\005", null, null} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed]
-!8 = !{!"0x2e\00f\00f\00_ZN1A1fEv\002\000\000\000\006\00256\001\002", !1, !"_ZTS1A", !9, null, null, null, i32 0, null} ; [ DW_TAG_subprogram ] [line 2] [f]
-!9 = !{!"0x15\00\000\000\000\000\000\000", i32 0, null, null, !10, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!6 = !MDDerivedType(tag: DW_TAG_member, name: "x", line: 3, size: 32, align: 32, file: !1, scope: !"_ZTS1A", baseType: !7)
+!7 = !MDBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!8 = !MDSubprogram(name: "f", linkageName: "_ZN1A1fEv", line: 2, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 2, file: !1, scope: !"_ZTS1A", type: !9)
+!9 = !MDSubroutineType(types: !10)
!10 = !{!7, !11}
-!11 = !{!"0xf\00\000\0064\0064\000\001088", null, null, !"_ZTS1A"} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [artificial] [from _ZTS1A]
+!11 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1A")
!12 = !{!13}
-!13 = !{!"0x2e\00f\00f\00_ZN1A1fEv\006\000\001\000\006\00256\001\006", !1, !"_ZTS1A", !9, null, i32 (%struct.A*)* @_ZN1A1fEv, null, !8, !14} ; [ DW_TAG_subprogram ] [line 6] [def] [f]
+!13 = !MDSubprogram(name: "f", linkageName: "_ZN1A1fEv", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 6, file: !1, scope: !"_ZTS1A", type: !9, function: i32 (%struct.A*)* @_ZN1A1fEv, declaration: !8, variables: !14)
!14 = !{!15}
-!15 = !{!"0x101\00this\0016777216\001088", !13, null, !16} ; [ DW_TAG_arg_variable ] [this] [line 0]
-!16 = !{!"0xf\00\000\0064\0064\000\000", null, null, !"_ZTS1A"} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [from _ZTS1A]
+!15 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !13, type: !16)
+!16 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !"_ZTS1A")
!17 = !{i32 2, !"Dwarf Version", i32 4}
-!18 = !{i32 2, !"Debug Info Version", i32 2}
+!18 = !{i32 2, !"Debug Info Version", i32 3}
!19 = !{!"clang version 3.5.0 (210251)"}
!20 = !MDLocation(line: 0, scope: !13)
!21 = !MDLocation(line: 7, scope: !13)
diff --git a/test/Instrumentation/SanitizerCoverage/coverage.ll b/test/Instrumentation/SanitizerCoverage/coverage.ll
index 1595727..b2f0ab0 100644
--- a/test/Instrumentation/SanitizerCoverage/coverage.ll
+++ b/test/Instrumentation/SanitizerCoverage/coverage.ll
@@ -2,13 +2,12 @@
; RUN: opt < %s -sancov -sanitizer-coverage-level=1 -S | FileCheck %s --check-prefix=CHECK1
; RUN: opt < %s -sancov -sanitizer-coverage-level=2 -S | FileCheck %s --check-prefix=CHECK2
; RUN: opt < %s -sancov -sanitizer-coverage-level=2 -sanitizer-coverage-block-threshold=10 -S | FileCheck %s --check-prefix=CHECK2
+; RUN: opt < %s -sancov -sanitizer-coverage-level=2 -sanitizer-coverage-block-threshold=0 -S | FileCheck %s --check-prefix=CHECK_WITH_CHECK
; RUN: opt < %s -sancov -sanitizer-coverage-level=2 -sanitizer-coverage-block-threshold=1 -S | FileCheck %s --check-prefix=CHECK_WITH_CHECK
; RUN: opt < %s -sancov -sanitizer-coverage-level=3 -sanitizer-coverage-block-threshold=10 -S | FileCheck %s --check-prefix=CHECK3
; RUN: opt < %s -sancov -sanitizer-coverage-level=4 -S | FileCheck %s --check-prefix=CHECK4
+; RUN: opt < %s -sancov -sanitizer-coverage-level=3 -sanitizer-coverage-8bit-counters=1 -S | FileCheck %s --check-prefix=CHECK-8BIT
-; RUN: opt < %s -sancov -sanitizer-coverage-level=0 -S | FileCheck %s --check-prefix=CHECK0
-; RUN: opt < %s -sancov -sanitizer-coverage-level=1 -S | FileCheck %s --check-prefix=CHECK1
-; RUN: opt < %s -sancov -sanitizer-coverage-level=2 -S | FileCheck %s --check-prefix=CHECK2
; RUN: opt < %s -sancov -sanitizer-coverage-level=2 -sanitizer-coverage-block-threshold=10 \
; RUN: -S | FileCheck %s --check-prefix=CHECK2
; RUN: opt < %s -sancov -sanitizer-coverage-level=2 -sanitizer-coverage-block-threshold=1 \
@@ -37,7 +36,7 @@ entry:
; CHECK0-NOT: call void @__sanitizer_cov_module_init(
; CHECK1-LABEL: define void @foo
-; CHECK1: %0 = load atomic i32* {{.*}} monotonic, align 4, !nosanitize
+; CHECK1: %0 = load atomic i32, i32* {{.*}} monotonic, align 4, !nosanitize
; CHECK1: %1 = icmp sge i32 0, %0
; CHECK1: br i1 %1, label %2, label %3
; CHECK1: call void @__sanitizer_cov(i32*{{.*}})
@@ -53,6 +52,10 @@ entry:
; CHECK_WITH_CHECK-LABEL: define void @foo
; CHECK_WITH_CHECK: __sanitizer_cov_with_check
; CHECK_WITH_CHECK: ret void
+; CHECK_WITH_CHECK-LABEL: define internal void @sancov.module_ctor
+; CHECK_WITH_CHECK-NOT: ret
+; CHECK_WITH_CHECK: call void @__sanitizer_cov_module_init({{.*}}, i64 4,
+; CHECK_WITH_CHECK: ret
; CHECK2-LABEL: define void @foo
; CHECK2: call void @__sanitizer_cov
@@ -78,14 +81,32 @@ entry:
; CHECK3-NOT: call void @__sanitizer_cov
; CHECK3: ret void
+; test -sanitizer-coverage-8bit-counters=1
+; CHECK-8BIT-LABEL: define void @foo
+
+; CHECK-8BIT: [[V11:%[0-9]*]] = load i8{{.*}}!nosanitize
+; CHECK-8BIT: [[V12:%[0-9]*]] = add i8 [[V11]], 1
+; CHECK-8BIT: store i8 [[V12]]{{.*}}!nosanitize
+; CHECK-8BIT: [[V21:%[0-9]*]] = load i8{{.*}}!nosanitize
+; CHECK-8BIT: [[V22:%[0-9]*]] = add i8 [[V21]], 1
+; CHECK-8BIT: store i8 [[V22]]{{.*}}!nosanitize
+; CHECK-8BIT: [[V31:%[0-9]*]] = load i8{{.*}}!nosanitize
+; CHECK-8BIT: [[V32:%[0-9]*]] = add i8 [[V31]], 1
+; CHECK-8BIT: store i8 [[V32]]{{.*}}!nosanitize
+; CHECK-8BIT: [[V41:%[0-9]*]] = load i8{{.*}}!nosanitize
+; CHECK-8BIT: [[V42:%[0-9]*]] = add i8 [[V41]], 1
+; CHECK-8BIT: store i8 [[V42]]{{.*}}!nosanitize
+
+; CHECK-8BIT: ret void
+
%struct.StructWithVptr = type { i32 (...)** }
define void @CallViaVptr(%struct.StructWithVptr* %foo) uwtable sanitize_address {
entry:
%0 = bitcast %struct.StructWithVptr* %foo to void (%struct.StructWithVptr*)***
- %vtable = load void (%struct.StructWithVptr*)*** %0, align 8
- %1 = load void (%struct.StructWithVptr*)** %vtable, align 8
+ %vtable = load void (%struct.StructWithVptr*)**, void (%struct.StructWithVptr*)*** %0, align 8
+ %1 = load void (%struct.StructWithVptr*)*, void (%struct.StructWithVptr*)** %vtable, align 8
tail call void %1(%struct.StructWithVptr* %foo)
tail call void %1(%struct.StructWithVptr* %foo)
tail call void asm sideeffect "", ""()
diff --git a/test/Instrumentation/SanitizerCoverage/coverage2-dbg.ll b/test/Instrumentation/SanitizerCoverage/coverage2-dbg.ll
index cb436a8..ce85073 100644
--- a/test/Instrumentation/SanitizerCoverage/coverage2-dbg.ll
+++ b/test/Instrumentation/SanitizerCoverage/coverage2-dbg.ll
@@ -27,7 +27,7 @@ target triple = "x86_64-unknown-linux-gnu"
define void @_Z3fooPi(i32* %a) #0 {
entry:
- tail call void @llvm.dbg.value(metadata i32* %a, i64 0, metadata !11, metadata !{!"0x102"}), !dbg !15
+ tail call void @llvm.dbg.value(metadata i32* %a, i64 0, metadata !11, metadata !MDExpression()), !dbg !15
%tobool = icmp eq i32* %a, null, !dbg !16
br i1 %tobool, label %if.end, label %if.then, !dbg !16
@@ -49,24 +49,24 @@ attributes #1 = { nounwind readnone }
!llvm.module.flags = !{!12, !13}
!llvm.ident = !{!14}
-!0 = !{!"0x11\004\00clang version 3.6.0 (217079)\001\00\000\00\001", !1, !2, !2, !3, !2, !2} ; [ DW_TAG_compile_unit ] [FOO/if.cc] [DW_LANG_C_plus_plus]
-!1 = !{!"if.cc", !"FOO"}
+!0 = !MDCompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 (217079)", isOptimized: true, emissionKind: 1, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2)
+!1 = !MDFile(filename: "if.cc", directory: "FOO")
!2 = !{}
!3 = !{!4}
-!4 = !{!"0x2e\00foo\00foo\00_Z3fooPi\001\000\001\000\006\00256\001\001", !1, !5, !6, null, void (i32*)* @_Z3fooPi, null, null, !10} ; [ DW_TAG_subprogram ] [line 1] [def] [foo]
-!5 = !{!"0x29", !1} ; [ DW_TAG_file_type ] [FOO/if.cc]
-!6 = !{!"0x15\00\000\000\000\000\000\000", i32 0, null, null, !7, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!4 = !MDSubprogram(name: "foo", linkageName: "_Z3fooPi", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 1, file: !1, scope: !5, type: !6, function: void (i32*)* @_Z3fooPi, variables: !10)
+!5 = !MDFile(filename: "if.cc", directory: "FOO")
+!6 = !MDSubroutineType(types: !7)
!7 = !{null, !8}
-!8 = !{!"0xf\00\000\0064\0064\000\000", null, null, !9} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [from int]
-!9 = !{!"0x24\00int\000\0032\0032\000\000\005", null, null} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed]
+!8 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !9)
+!9 = !MDBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
!10 = !{!11}
-!11 = !{!"0x101\00a\0016777217\000", !4, !5, !8} ; [ DW_TAG_arg_variable ] [a] [line 1]
+!11 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "a", line: 1, arg: 1, scope: !4, file: !5, type: !8)
!12 = !{i32 2, !"Dwarf Version", i32 4}
-!13 = !{i32 2, !"Debug Info Version", i32 2}
+!13 = !{i32 2, !"Debug Info Version", i32 3}
!14 = !{!"clang version 3.6.0 (217079)"}
!15 = !MDLocation(line: 1, column: 15, scope: !4)
!16 = !MDLocation(line: 2, column: 7, scope: !17)
-!17 = !{!"0xb\002\007\000", !1, !4} ; [ DW_TAG_lexical_block ] [FOO/if.cc]
+!17 = distinct !MDLexicalBlock(line: 2, column: 7, file: !1, scope: !4)
!18 = !MDLocation(line: 3, column: 5, scope: !17)
!19 = !{!20, !20, i64 0}
!20 = !{!"int", !21, i64 0}
diff --git a/test/Instrumentation/ThreadSanitizer/atomic.ll b/test/Instrumentation/ThreadSanitizer/atomic.ll
index e40268f..1d6ac38 100644
--- a/test/Instrumentation/ThreadSanitizer/atomic.ll
+++ b/test/Instrumentation/ThreadSanitizer/atomic.ll
@@ -4,7 +4,7 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3
define i8 @atomic8_load_unordered(i8* %a) nounwind uwtable {
entry:
- %0 = load atomic i8* %a unordered, align 1
+ %0 = load atomic i8, i8* %a unordered, align 1
ret i8 %0
}
; CHECK: atomic8_load_unordered
@@ -12,7 +12,7 @@ entry:
define i8 @atomic8_load_monotonic(i8* %a) nounwind uwtable {
entry:
- %0 = load atomic i8* %a monotonic, align 1
+ %0 = load atomic i8, i8* %a monotonic, align 1
ret i8 %0
}
; CHECK: atomic8_load_monotonic
@@ -20,7 +20,7 @@ entry:
define i8 @atomic8_load_acquire(i8* %a) nounwind uwtable {
entry:
- %0 = load atomic i8* %a acquire, align 1
+ %0 = load atomic i8, i8* %a acquire, align 1
ret i8 %0
}
; CHECK: atomic8_load_acquire
@@ -28,7 +28,7 @@ entry:
define i8 @atomic8_load_seq_cst(i8* %a) nounwind uwtable {
entry:
- %0 = load atomic i8* %a seq_cst, align 1
+ %0 = load atomic i8, i8* %a seq_cst, align 1
ret i8 %0
}
; CHECK: atomic8_load_seq_cst
@@ -388,7 +388,7 @@ entry:
define i16 @atomic16_load_unordered(i16* %a) nounwind uwtable {
entry:
- %0 = load atomic i16* %a unordered, align 2
+ %0 = load atomic i16, i16* %a unordered, align 2
ret i16 %0
}
; CHECK: atomic16_load_unordered
@@ -396,7 +396,7 @@ entry:
define i16 @atomic16_load_monotonic(i16* %a) nounwind uwtable {
entry:
- %0 = load atomic i16* %a monotonic, align 2
+ %0 = load atomic i16, i16* %a monotonic, align 2
ret i16 %0
}
; CHECK: atomic16_load_monotonic
@@ -404,7 +404,7 @@ entry:
define i16 @atomic16_load_acquire(i16* %a) nounwind uwtable {
entry:
- %0 = load atomic i16* %a acquire, align 2
+ %0 = load atomic i16, i16* %a acquire, align 2
ret i16 %0
}
; CHECK: atomic16_load_acquire
@@ -412,7 +412,7 @@ entry:
define i16 @atomic16_load_seq_cst(i16* %a) nounwind uwtable {
entry:
- %0 = load atomic i16* %a seq_cst, align 2
+ %0 = load atomic i16, i16* %a seq_cst, align 2
ret i16 %0
}
; CHECK: atomic16_load_seq_cst
@@ -772,7 +772,7 @@ entry:
define i32 @atomic32_load_unordered(i32* %a) nounwind uwtable {
entry:
- %0 = load atomic i32* %a unordered, align 4
+ %0 = load atomic i32, i32* %a unordered, align 4
ret i32 %0
}
; CHECK: atomic32_load_unordered
@@ -780,7 +780,7 @@ entry:
define i32 @atomic32_load_monotonic(i32* %a) nounwind uwtable {
entry:
- %0 = load atomic i32* %a monotonic, align 4
+ %0 = load atomic i32, i32* %a monotonic, align 4
ret i32 %0
}
; CHECK: atomic32_load_monotonic
@@ -788,7 +788,7 @@ entry:
define i32 @atomic32_load_acquire(i32* %a) nounwind uwtable {
entry:
- %0 = load atomic i32* %a acquire, align 4
+ %0 = load atomic i32, i32* %a acquire, align 4
ret i32 %0
}
; CHECK: atomic32_load_acquire
@@ -796,7 +796,7 @@ entry:
define i32 @atomic32_load_seq_cst(i32* %a) nounwind uwtable {
entry:
- %0 = load atomic i32* %a seq_cst, align 4
+ %0 = load atomic i32, i32* %a seq_cst, align 4
ret i32 %0
}
; CHECK: atomic32_load_seq_cst
@@ -1156,7 +1156,7 @@ entry:
define i64 @atomic64_load_unordered(i64* %a) nounwind uwtable {
entry:
- %0 = load atomic i64* %a unordered, align 8
+ %0 = load atomic i64, i64* %a unordered, align 8
ret i64 %0
}
; CHECK: atomic64_load_unordered
@@ -1164,7 +1164,7 @@ entry:
define i64 @atomic64_load_monotonic(i64* %a) nounwind uwtable {
entry:
- %0 = load atomic i64* %a monotonic, align 8
+ %0 = load atomic i64, i64* %a monotonic, align 8
ret i64 %0
}
; CHECK: atomic64_load_monotonic
@@ -1172,7 +1172,7 @@ entry:
define i64 @atomic64_load_acquire(i64* %a) nounwind uwtable {
entry:
- %0 = load atomic i64* %a acquire, align 8
+ %0 = load atomic i64, i64* %a acquire, align 8
ret i64 %0
}
; CHECK: atomic64_load_acquire
@@ -1180,7 +1180,7 @@ entry:
define i64 @atomic64_load_seq_cst(i64* %a) nounwind uwtable {
entry:
- %0 = load atomic i64* %a seq_cst, align 8
+ %0 = load atomic i64, i64* %a seq_cst, align 8
ret i64 %0
}
; CHECK: atomic64_load_seq_cst
@@ -1540,7 +1540,7 @@ entry:
define i128 @atomic128_load_unordered(i128* %a) nounwind uwtable {
entry:
- %0 = load atomic i128* %a unordered, align 16
+ %0 = load atomic i128, i128* %a unordered, align 16
ret i128 %0
}
; CHECK: atomic128_load_unordered
@@ -1548,7 +1548,7 @@ entry:
define i128 @atomic128_load_monotonic(i128* %a) nounwind uwtable {
entry:
- %0 = load atomic i128* %a monotonic, align 16
+ %0 = load atomic i128, i128* %a monotonic, align 16
ret i128 %0
}
; CHECK: atomic128_load_monotonic
@@ -1556,7 +1556,7 @@ entry:
define i128 @atomic128_load_acquire(i128* %a) nounwind uwtable {
entry:
- %0 = load atomic i128* %a acquire, align 16
+ %0 = load atomic i128, i128* %a acquire, align 16
ret i128 %0
}
; CHECK: atomic128_load_acquire
@@ -1564,7 +1564,7 @@ entry:
define i128 @atomic128_load_seq_cst(i128* %a) nounwind uwtable {
entry:
- %0 = load atomic i128* %a seq_cst, align 16
+ %0 = load atomic i128, i128* %a seq_cst, align 16
ret i128 %0
}
; CHECK: atomic128_load_seq_cst
diff --git a/test/Instrumentation/ThreadSanitizer/capture.ll b/test/Instrumentation/ThreadSanitizer/capture.ll
index d6c62f0..038b8c0 100644
--- a/test/Instrumentation/ThreadSanitizer/capture.ll
+++ b/test/Instrumentation/ThreadSanitizer/capture.ll
@@ -37,7 +37,7 @@ entry:
%tmp = alloca i32*, align 8
; transitive escape
store i32* %ptr, i32** %tmp, align 8
- %0 = load i32** %tmp, align 8
+ %0 = load i32*, i32** %tmp, align 8
store i32* %0, i32** @sink, align 8
store i32 42, i32* %ptr, align 4
ret void
@@ -79,7 +79,7 @@ entry:
store i32 42, i32* %ptr, align 4
; transitive escape
store i32* %ptr, i32** %tmp, align 8
- %0 = load i32** %tmp, align 8
+ %0 = load i32*, i32** %tmp, align 8
store i32* %0, i32** @sink, align 8
ret void
}
diff --git a/test/Instrumentation/ThreadSanitizer/no_sanitize_thread.ll b/test/Instrumentation/ThreadSanitizer/no_sanitize_thread.ll
index 3949fd5..a90a560 100644
--- a/test/Instrumentation/ThreadSanitizer/no_sanitize_thread.ll
+++ b/test/Instrumentation/ThreadSanitizer/no_sanitize_thread.ll
@@ -6,20 +6,20 @@ target triple = "x86_64-unknown-linux-gnu"
; no sanitize_thread attribute here
define i32 @read_4_bytes(i32* %a) {
entry:
- %tmp1 = load i32* %a, align 4
+ %tmp1 = load i32, i32* %a, align 4
ret i32 %tmp1
}
; CHECK: define i32 @read_4_bytes(i32* %a) {
; CHECK-NEXT: entry:
-; CHECK-NEXT: %tmp1 = load i32* %a, align 4
+; CHECK-NEXT: %tmp1 = load i32, i32* %a, align 4
; CHECK: ret i32 %tmp1
; no sanitize_thread attribute here
define i32 @read_4_bytes_and_call(i32* %a) {
entry:
call void @foo()
- %tmp1 = load i32* %a, align 4
+ %tmp1 = load i32, i32* %a, align 4
ret i32 %tmp1
}
@@ -28,7 +28,7 @@ entry:
; CHECK-NEXT: %0 = call i8* @llvm.returnaddress(i32 0)
; CHECK-NEXT: call void @__tsan_func_entry(i8* %0)
; CHECK-NEXT: call void @foo()
-; CHECK-NEXT: %tmp1 = load i32* %a, align 4
+; CHECK-NEXT: %tmp1 = load i32, i32* %a, align 4
; CHECK-NEXT: call void @__tsan_func_exit()
; CHECK-NEXT: ret i32 %tmp1
diff --git a/test/Instrumentation/ThreadSanitizer/read_before_write.ll b/test/Instrumentation/ThreadSanitizer/read_before_write.ll
index cb6603b..c15ab13 100644
--- a/test/Instrumentation/ThreadSanitizer/read_before_write.ll
+++ b/test/Instrumentation/ThreadSanitizer/read_before_write.ll
@@ -4,7 +4,7 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3
define void @IncrementMe(i32* nocapture %ptr) nounwind uwtable sanitize_thread {
entry:
- %0 = load i32* %ptr, align 4
+ %0 = load i32, i32* %ptr, align 4
%inc = add nsw i32 %0, 1
store i32 %inc, i32* %ptr, align 4
ret void
@@ -16,7 +16,7 @@ entry:
define void @IncrementMeWithCallInBetween(i32* nocapture %ptr) nounwind uwtable sanitize_thread {
entry:
- %0 = load i32* %ptr, align 4
+ %0 = load i32, i32* %ptr, align 4
%inc = add nsw i32 %0, 1
call void @foo()
store i32 %inc, i32* %ptr, align 4
diff --git a/test/Instrumentation/ThreadSanitizer/read_from_global.ll b/test/Instrumentation/ThreadSanitizer/read_from_global.ll
index 037dd56..76ee50c 100644
--- a/test/Instrumentation/ThreadSanitizer/read_from_global.ll
+++ b/test/Instrumentation/ThreadSanitizer/read_from_global.ll
@@ -6,7 +6,7 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3
@const_global = external constant i32
define i32 @read_from_const_global() nounwind uwtable sanitize_thread readnone {
entry:
- %0 = load i32* @const_global, align 4
+ %0 = load i32, i32* @const_global, align 4
ret i32 %0
}
; CHECK: define i32 @read_from_const_global
@@ -16,7 +16,7 @@ entry:
@non_const_global = global i32 0, align 4
define i32 @read_from_non_const_global() nounwind uwtable sanitize_thread readonly {
entry:
- %0 = load i32* @non_const_global, align 4
+ %0 = load i32, i32* @non_const_global, align 4
ret i32 %0
}
@@ -28,8 +28,8 @@ entry:
define i32 @read_from_const_global_array(i32 %idx) nounwind uwtable sanitize_thread readnone {
entry:
%idxprom = sext i32 %idx to i64
- %arrayidx = getelementptr inbounds [10 x i32]* @const_global_array, i64 0, i64 %idxprom
- %0 = load i32* %arrayidx, align 4
+ %arrayidx = getelementptr inbounds [10 x i32], [10 x i32]* @const_global_array, i64 0, i64 %idxprom
+ %0 = load i32, i32* %arrayidx, align 4
ret i32 %0
}
@@ -41,8 +41,8 @@ entry:
define void @call_virtual_func(%struct.Foo* %f) uwtable sanitize_thread {
entry:
%0 = bitcast %struct.Foo* %f to void (%struct.Foo*)***
- %vtable = load void (%struct.Foo*)*** %0, align 8, !tbaa !2
- %1 = load void (%struct.Foo*)** %vtable, align 8
+ %vtable = load void (%struct.Foo*)**, void (%struct.Foo*)*** %0, align 8, !tbaa !2
+ %1 = load void (%struct.Foo*)*, void (%struct.Foo*)** %vtable, align 8
call void %1(%struct.Foo* %f)
ret void
}
diff --git a/test/Instrumentation/ThreadSanitizer/tsan-vs-gvn.ll b/test/Instrumentation/ThreadSanitizer/tsan-vs-gvn.ll
index a83a274..df7608d 100644
--- a/test/Instrumentation/ThreadSanitizer/tsan-vs-gvn.ll
+++ b/test/Instrumentation/ThreadSanitizer/tsan-vs-gvn.ll
@@ -12,9 +12,9 @@ target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f3
define i32 @test_widening_bad(i8* %P) nounwind ssp noredzone sanitize_thread {
entry:
- %tmp = load i8* getelementptr inbounds (%struct_of_8_bytes_4_aligned* @f, i64 0, i32 1), align 4
+ %tmp = load i8, i8* getelementptr inbounds (%struct_of_8_bytes_4_aligned, %struct_of_8_bytes_4_aligned* @f, i64 0, i32 1), align 4
%conv = zext i8 %tmp to i32
- %tmp1 = load i8* getelementptr inbounds (%struct_of_8_bytes_4_aligned* @f, i64 0, i32 3), align 1
+ %tmp1 = load i8, i8* getelementptr inbounds (%struct_of_8_bytes_4_aligned, %struct_of_8_bytes_4_aligned* @f, i64 0, i32 3), align 1
%conv2 = zext i8 %tmp1 to i32
%add = add nsw i32 %conv, %conv2
ret i32 %add
diff --git a/test/Instrumentation/ThreadSanitizer/tsan_basic.ll b/test/Instrumentation/ThreadSanitizer/tsan_basic.ll
index dc6e43e..22582eb 100644
--- a/test/Instrumentation/ThreadSanitizer/tsan_basic.ll
+++ b/test/Instrumentation/ThreadSanitizer/tsan_basic.ll
@@ -5,7 +5,7 @@ target triple = "x86_64-unknown-linux-gnu"
define i32 @read_4_bytes(i32* %a) sanitize_thread {
entry:
- %tmp1 = load i32* %a, align 4
+ %tmp1 = load i32, i32* %a, align 4
ret i32 %tmp1
}
@@ -15,7 +15,7 @@ entry:
; CHECK: call void @__tsan_func_entry(i8* %0)
; CHECK-NEXT: %1 = bitcast i32* %a to i8*
; CHECK-NEXT: call void @__tsan_read4(i8* %1)
-; CHECK-NEXT: %tmp1 = load i32* %a, align 4
+; CHECK-NEXT: %tmp1 = load i32, i32* %a, align 4
; CHECK-NEXT: call void @__tsan_func_exit()
; CHECK: ret i32
diff --git a/test/Instrumentation/ThreadSanitizer/unaligned.ll b/test/Instrumentation/ThreadSanitizer/unaligned.ll
index 7a240e3..89461b4 100644
--- a/test/Instrumentation/ThreadSanitizer/unaligned.ll
+++ b/test/Instrumentation/ThreadSanitizer/unaligned.ll
@@ -4,7 +4,7 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3
define i16 @test_unaligned_read2(i16* %a) sanitize_thread {
entry:
- %tmp1 = load i16* %a, align 1
+ %tmp1 = load i16, i16* %a, align 1
ret i16 %tmp1
}
@@ -12,13 +12,13 @@ entry:
; CHECK: call void @__tsan_func_entry(i8* %0)
; CHECK-NEXT: %1 = bitcast i16* %a to i8*
; CHECK-NEXT: call void @__tsan_unaligned_read2(i8* %1)
-; CHECK-NEXT: %tmp1 = load i16* %a, align 1
+; CHECK-NEXT: %tmp1 = load i16, i16* %a, align 1
; CHECK-NEXT: call void @__tsan_func_exit()
; CHECK: ret i16
define i32 @test_unaligned_read4(i32* %a) sanitize_thread {
entry:
- %tmp1 = load i32* %a, align 2
+ %tmp1 = load i32, i32* %a, align 2
ret i32 %tmp1
}
@@ -26,13 +26,13 @@ entry:
; CHECK: call void @__tsan_func_entry(i8* %0)
; CHECK-NEXT: %1 = bitcast i32* %a to i8*
; CHECK-NEXT: call void @__tsan_unaligned_read4(i8* %1)
-; CHECK-NEXT: %tmp1 = load i32* %a, align 2
+; CHECK-NEXT: %tmp1 = load i32, i32* %a, align 2
; CHECK-NEXT: call void @__tsan_func_exit()
; CHECK: ret i32
define i64 @test_unaligned_read8(i64* %a) sanitize_thread {
entry:
- %tmp1 = load i64* %a, align 4
+ %tmp1 = load i64, i64* %a, align 4
ret i64 %tmp1
}
@@ -40,13 +40,13 @@ entry:
; CHECK: call void @__tsan_func_entry(i8* %0)
; CHECK-NEXT: %1 = bitcast i64* %a to i8*
; CHECK-NEXT: call void @__tsan_unaligned_read8(i8* %1)
-; CHECK-NEXT: %tmp1 = load i64* %a, align 4
+; CHECK-NEXT: %tmp1 = load i64, i64* %a, align 4
; CHECK-NEXT: call void @__tsan_func_exit()
; CHECK: ret i64
define i128 @test_unaligned_read16(i128* %a) sanitize_thread {
entry:
- %tmp1 = load i128* %a, align 1
+ %tmp1 = load i128, i128* %a, align 1
ret i128 %tmp1
}
@@ -54,13 +54,13 @@ entry:
; CHECK: call void @__tsan_func_entry(i8* %0)
; CHECK-NEXT: %1 = bitcast i128* %a to i8*
; CHECK-NEXT: call void @__tsan_unaligned_read16(i8* %1)
-; CHECK-NEXT: %tmp1 = load i128* %a, align 1
+; CHECK-NEXT: %tmp1 = load i128, i128* %a, align 1
; CHECK-NEXT: call void @__tsan_func_exit()
; CHECK: ret i128
define i128 @test_aligned_read16(i128* %a) sanitize_thread {
entry:
- %tmp1 = load i128* %a, align 8
+ %tmp1 = load i128, i128* %a, align 8
ret i128 %tmp1
}
@@ -68,7 +68,7 @@ entry:
; CHECK: call void @__tsan_func_entry(i8* %0)
; CHECK-NEXT: %1 = bitcast i128* %a to i8*
; CHECK-NEXT: call void @__tsan_read16(i8* %1)
-; CHECK-NEXT: %tmp1 = load i128* %a, align 8
+; CHECK-NEXT: %tmp1 = load i128, i128* %a, align 8
; CHECK-NEXT: call void @__tsan_func_exit()
; CHECK: ret i128
diff --git a/test/Instrumentation/ThreadSanitizer/vptr_read.ll b/test/Instrumentation/ThreadSanitizer/vptr_read.ll
index cccdeb8..6ed64c6 100644
--- a/test/Instrumentation/ThreadSanitizer/vptr_read.ll
+++ b/test/Instrumentation/ThreadSanitizer/vptr_read.ll
@@ -5,7 +5,7 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3
define i8 @Foo(i8* %a) nounwind uwtable sanitize_thread {
entry:
; CHECK: call void @__tsan_vptr_read
- %0 = load i8* %a, align 8, !tbaa !0
+ %0 = load i8, i8* %a, align 8, !tbaa !0
ret i8 %0
}
!0 = !{!2, !2, i64 0}