aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/MergeFunc
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/Transforms/MergeFunc
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/Transforms/MergeFunc')
-rw-r--r--test/Transforms/MergeFunc/2011-02-08-RemoveEqual.ll116
-rw-r--r--test/Transforms/MergeFunc/address-spaces.ll12
-rw-r--r--test/Transforms/MergeFunc/crash.ll12
-rw-r--r--test/Transforms/MergeFunc/inttoptr-address-space.ll8
-rw-r--r--test/Transforms/MergeFunc/inttoptr.ll12
-rw-r--r--test/Transforms/MergeFunc/mergefunc-struct-return.ll12
-rw-r--r--test/Transforms/MergeFunc/ranges.ll24
-rw-r--r--test/Transforms/MergeFunc/vector-GEP-crash.ll4
-rw-r--r--test/Transforms/MergeFunc/vector.ll4
9 files changed, 102 insertions, 102 deletions
diff --git a/test/Transforms/MergeFunc/2011-02-08-RemoveEqual.ll b/test/Transforms/MergeFunc/2011-02-08-RemoveEqual.ll
index 19cd6a5..4735ea5 100644
--- a/test/Transforms/MergeFunc/2011-02-08-RemoveEqual.ll
+++ b/test/Transforms/MergeFunc/2011-02-08-RemoveEqual.ll
@@ -36,15 +36,15 @@ entry:
store %"struct.kc::impl_fileline_FileLine"* %this, %"struct.kc::impl_fileline_FileLine"** %this_addr
store %"struct.kc::impl_casestring__Str"* %_file, %"struct.kc::impl_casestring__Str"** %_file_addr
store i32 %_line, i32* %_line_addr
- %0 = load %"struct.kc::impl_fileline_FileLine"** %this_addr, align 4
- %1 = getelementptr inbounds %"struct.kc::impl_fileline_FileLine"* %0, i32 0, i32 0
+ %0 = load %"struct.kc::impl_fileline_FileLine"*, %"struct.kc::impl_fileline_FileLine"** %this_addr, align 4
+ %1 = getelementptr inbounds %"struct.kc::impl_fileline_FileLine", %"struct.kc::impl_fileline_FileLine"* %0, i32 0, i32 0
call void @_ZN2kc13impl_filelineC2Ev() nounwind
- %2 = load %"struct.kc::impl_fileline_FileLine"** %this_addr, align 4
- %3 = getelementptr inbounds %"struct.kc::impl_fileline_FileLine"* %2, i32 0, i32 0
- %4 = getelementptr inbounds %"struct.kc::impl_fileline"* %3, i32 0, i32 0
- %5 = getelementptr inbounds %"struct.kc::impl_abstract_phylum"* %4, i32 0, i32 0
- store i32 (...)** getelementptr inbounds ([13 x i32 (...)*]* @_ZTVN2kc22impl_fileline_FileLineE, i32 0, i32 2), i32 (...)*** %5, align 4
- %6 = load %"struct.kc::impl_casestring__Str"** %_file_addr, align 4
+ %2 = load %"struct.kc::impl_fileline_FileLine"*, %"struct.kc::impl_fileline_FileLine"** %this_addr, align 4
+ %3 = getelementptr inbounds %"struct.kc::impl_fileline_FileLine", %"struct.kc::impl_fileline_FileLine"* %2, i32 0, i32 0
+ %4 = getelementptr inbounds %"struct.kc::impl_fileline", %"struct.kc::impl_fileline"* %3, i32 0, i32 0
+ %5 = getelementptr inbounds %"struct.kc::impl_abstract_phylum", %"struct.kc::impl_abstract_phylum"* %4, i32 0, i32 0
+ store i32 (...)** getelementptr inbounds ([13 x i32 (...)*], [13 x i32 (...)*]* @_ZTVN2kc22impl_fileline_FileLineE, i32 0, i32 2), i32 (...)*** %5, align 4
+ %6 = load %"struct.kc::impl_casestring__Str"*, %"struct.kc::impl_casestring__Str"** %_file_addr, align 4
%7 = icmp eq %"struct.kc::impl_casestring__Str"* %6, null
br i1 %7, label %bb, label %bb1
@@ -57,20 +57,20 @@ invcont: ; preds = %bb
br label %bb2
bb1: ; preds = %entry
- %9 = load %"struct.kc::impl_casestring__Str"** %_file_addr, align 4
+ %9 = load %"struct.kc::impl_casestring__Str"*, %"struct.kc::impl_casestring__Str"** %_file_addr, align 4
store %"struct.kc::impl_casestring__Str"* %9, %"struct.kc::impl_casestring__Str"** %iftmp.99, align 4
br label %bb2
bb2: ; preds = %bb1, %invcont
- %10 = load %"struct.kc::impl_fileline_FileLine"** %this_addr, align 4
- %11 = getelementptr inbounds %"struct.kc::impl_fileline_FileLine"* %10, i32 0, i32 0
- %12 = getelementptr inbounds %"struct.kc::impl_fileline"* %11, i32 0, i32 1
- %13 = load %"struct.kc::impl_casestring__Str"** %iftmp.99, align 4
+ %10 = load %"struct.kc::impl_fileline_FileLine"*, %"struct.kc::impl_fileline_FileLine"** %this_addr, align 4
+ %11 = getelementptr inbounds %"struct.kc::impl_fileline_FileLine", %"struct.kc::impl_fileline_FileLine"* %10, i32 0, i32 0
+ %12 = getelementptr inbounds %"struct.kc::impl_fileline", %"struct.kc::impl_fileline"* %11, i32 0, i32 1
+ %13 = load %"struct.kc::impl_casestring__Str"*, %"struct.kc::impl_casestring__Str"** %iftmp.99, align 4
store %"struct.kc::impl_casestring__Str"* %13, %"struct.kc::impl_casestring__Str"** %12, align 4
- %14 = load %"struct.kc::impl_fileline_FileLine"** %this_addr, align 4
- %15 = getelementptr inbounds %"struct.kc::impl_fileline_FileLine"* %14, i32 0, i32 0
- %16 = getelementptr inbounds %"struct.kc::impl_fileline"* %15, i32 0, i32 2
- %17 = load i32* %_line_addr, align 4
+ %14 = load %"struct.kc::impl_fileline_FileLine"*, %"struct.kc::impl_fileline_FileLine"** %this_addr, align 4
+ %15 = getelementptr inbounds %"struct.kc::impl_fileline_FileLine", %"struct.kc::impl_fileline_FileLine"* %14, i32 0, i32 0
+ %16 = getelementptr inbounds %"struct.kc::impl_fileline", %"struct.kc::impl_fileline"* %15, i32 0, i32 2
+ %17 = load i32, i32* %_line_addr, align 4
store i32 %17, i32* %16, align 4
ret void
@@ -79,21 +79,21 @@ lpad: ; preds = %bb
cleanup
%exn = extractvalue { i8*, i32 } %eh_ptr, 0
store i8* %exn, i8** %eh_exception
- %eh_ptr4 = load i8** %eh_exception
+ %eh_ptr4 = load i8*, i8** %eh_exception
%eh_select5 = extractvalue { i8*, i32 } %eh_ptr, 1
store i32 %eh_select5, i32* %eh_selector
- %eh_select = load i32* %eh_selector
+ %eh_select = load i32, i32* %eh_selector
store i32 %eh_select, i32* %save_filt.150, align 4
- %eh_value = load i8** %eh_exception
+ %eh_value = load i8*, i8** %eh_exception
store i8* %eh_value, i8** %save_eptr.149, align 4
- %18 = load %"struct.kc::impl_fileline_FileLine"** %this_addr, align 4
+ %18 = load %"struct.kc::impl_fileline_FileLine"*, %"struct.kc::impl_fileline_FileLine"** %this_addr, align 4
%19 = bitcast %"struct.kc::impl_fileline_FileLine"* %18 to %"struct.kc::impl_fileline"*
call void @_ZN2kc13impl_filelineD2Ev(%"struct.kc::impl_fileline"* %19) nounwind
- %20 = load i8** %save_eptr.149, align 4
+ %20 = load i8*, i8** %save_eptr.149, align 4
store i8* %20, i8** %eh_exception, align 4
- %21 = load i32* %save_filt.150, align 4
+ %21 = load i32, i32* %save_filt.150, align 4
store i32 %21, i32* %eh_selector, align 4
- %eh_ptr6 = load i8** %eh_exception
+ %eh_ptr6 = load i8*, i8** %eh_exception
call void @_Unwind_Resume_or_Rethrow()
unreachable
}
@@ -105,16 +105,16 @@ entry:
%this_addr = alloca %"struct.kc::impl_fileline"*, align 4
%"alloca point" = bitcast i32 0 to i32
store %"struct.kc::impl_fileline"* %this, %"struct.kc::impl_fileline"** %this_addr
- %0 = load %"struct.kc::impl_fileline"** %this_addr, align 4
- %1 = getelementptr inbounds %"struct.kc::impl_fileline"* %0, i32 0, i32 0
- %2 = getelementptr inbounds %"struct.kc::impl_abstract_phylum"* %1, i32 0, i32 0
- store i32 (...)** getelementptr inbounds ([13 x i32 (...)*]* @_ZTVN2kc13impl_filelineE, i32 0, i32 2), i32 (...)*** %2, align 4
+ %0 = load %"struct.kc::impl_fileline"*, %"struct.kc::impl_fileline"** %this_addr, align 4
+ %1 = getelementptr inbounds %"struct.kc::impl_fileline", %"struct.kc::impl_fileline"* %0, i32 0, i32 0
+ %2 = getelementptr inbounds %"struct.kc::impl_abstract_phylum", %"struct.kc::impl_abstract_phylum"* %1, i32 0, i32 0
+ store i32 (...)** getelementptr inbounds ([13 x i32 (...)*], [13 x i32 (...)*]* @_ZTVN2kc13impl_filelineE, i32 0, i32 2), i32 (...)*** %2, align 4
%3 = trunc i32 0 to i8
%toBool = icmp ne i8 %3, 0
br i1 %toBool, label %bb1, label %return
bb1: ; preds = %entry
- %4 = load %"struct.kc::impl_fileline"** %this_addr, align 4
+ %4 = load %"struct.kc::impl_fileline"*, %"struct.kc::impl_fileline"** %this_addr, align 4
%5 = bitcast %"struct.kc::impl_fileline"* %4 to i8*
call void @_ZdlPv() nounwind
br label %return
@@ -130,16 +130,16 @@ entry:
%this_addr = alloca %"struct.kc::impl_fileline"*, align 4
%"alloca point" = bitcast i32 0 to i32
store %"struct.kc::impl_fileline"* %this, %"struct.kc::impl_fileline"** %this_addr
- %0 = load %"struct.kc::impl_fileline"** %this_addr, align 4
- %1 = getelementptr inbounds %"struct.kc::impl_fileline"* %0, i32 0, i32 0
- %2 = getelementptr inbounds %"struct.kc::impl_abstract_phylum"* %1, i32 0, i32 0
- store i32 (...)** getelementptr inbounds ([13 x i32 (...)*]* @_ZTVN2kc13impl_filelineE, i32 0, i32 2), i32 (...)*** %2, align 4
+ %0 = load %"struct.kc::impl_fileline"*, %"struct.kc::impl_fileline"** %this_addr, align 4
+ %1 = getelementptr inbounds %"struct.kc::impl_fileline", %"struct.kc::impl_fileline"* %0, i32 0, i32 0
+ %2 = getelementptr inbounds %"struct.kc::impl_abstract_phylum", %"struct.kc::impl_abstract_phylum"* %1, i32 0, i32 0
+ store i32 (...)** getelementptr inbounds ([13 x i32 (...)*], [13 x i32 (...)*]* @_ZTVN2kc13impl_filelineE, i32 0, i32 2), i32 (...)*** %2, align 4
%3 = trunc i32 0 to i8
%toBool = icmp ne i8 %3, 0
br i1 %toBool, label %bb1, label %return
bb1: ; preds = %entry
- %4 = load %"struct.kc::impl_fileline"** %this_addr, align 4
+ %4 = load %"struct.kc::impl_fileline"*, %"struct.kc::impl_fileline"** %this_addr, align 4
%5 = bitcast %"struct.kc::impl_fileline"* %4 to i8*
call void @_ZdlPv() nounwind
br label %return
@@ -162,15 +162,15 @@ entry:
store %"struct.kc::impl_fileline_FileLine"* %this, %"struct.kc::impl_fileline_FileLine"** %this_addr
store %"struct.kc::impl_casestring__Str"* %_file, %"struct.kc::impl_casestring__Str"** %_file_addr
store i32 %_line, i32* %_line_addr
- %0 = load %"struct.kc::impl_fileline_FileLine"** %this_addr, align 4
- %1 = getelementptr inbounds %"struct.kc::impl_fileline_FileLine"* %0, i32 0, i32 0
+ %0 = load %"struct.kc::impl_fileline_FileLine"*, %"struct.kc::impl_fileline_FileLine"** %this_addr, align 4
+ %1 = getelementptr inbounds %"struct.kc::impl_fileline_FileLine", %"struct.kc::impl_fileline_FileLine"* %0, i32 0, i32 0
call void @_ZN2kc13impl_filelineC2Ev() nounwind
- %2 = load %"struct.kc::impl_fileline_FileLine"** %this_addr, align 4
- %3 = getelementptr inbounds %"struct.kc::impl_fileline_FileLine"* %2, i32 0, i32 0
- %4 = getelementptr inbounds %"struct.kc::impl_fileline"* %3, i32 0, i32 0
- %5 = getelementptr inbounds %"struct.kc::impl_abstract_phylum"* %4, i32 0, i32 0
- store i32 (...)** getelementptr inbounds ([13 x i32 (...)*]* @_ZTVN2kc22impl_fileline_FileLineE, i32 0, i32 2), i32 (...)*** %5, align 4
- %6 = load %"struct.kc::impl_casestring__Str"** %_file_addr, align 4
+ %2 = load %"struct.kc::impl_fileline_FileLine"*, %"struct.kc::impl_fileline_FileLine"** %this_addr, align 4
+ %3 = getelementptr inbounds %"struct.kc::impl_fileline_FileLine", %"struct.kc::impl_fileline_FileLine"* %2, i32 0, i32 0
+ %4 = getelementptr inbounds %"struct.kc::impl_fileline", %"struct.kc::impl_fileline"* %3, i32 0, i32 0
+ %5 = getelementptr inbounds %"struct.kc::impl_abstract_phylum", %"struct.kc::impl_abstract_phylum"* %4, i32 0, i32 0
+ store i32 (...)** getelementptr inbounds ([13 x i32 (...)*], [13 x i32 (...)*]* @_ZTVN2kc22impl_fileline_FileLineE, i32 0, i32 2), i32 (...)*** %5, align 4
+ %6 = load %"struct.kc::impl_casestring__Str"*, %"struct.kc::impl_casestring__Str"** %_file_addr, align 4
%7 = icmp eq %"struct.kc::impl_casestring__Str"* %6, null
br i1 %7, label %bb, label %bb1
@@ -183,20 +183,20 @@ invcont: ; preds = %bb
br label %bb2
bb1: ; preds = %entry
- %9 = load %"struct.kc::impl_casestring__Str"** %_file_addr, align 4
+ %9 = load %"struct.kc::impl_casestring__Str"*, %"struct.kc::impl_casestring__Str"** %_file_addr, align 4
store %"struct.kc::impl_casestring__Str"* %9, %"struct.kc::impl_casestring__Str"** %iftmp.99, align 4
br label %bb2
bb2: ; preds = %bb1, %invcont
- %10 = load %"struct.kc::impl_fileline_FileLine"** %this_addr, align 4
- %11 = getelementptr inbounds %"struct.kc::impl_fileline_FileLine"* %10, i32 0, i32 0
- %12 = getelementptr inbounds %"struct.kc::impl_fileline"* %11, i32 0, i32 1
- %13 = load %"struct.kc::impl_casestring__Str"** %iftmp.99, align 4
+ %10 = load %"struct.kc::impl_fileline_FileLine"*, %"struct.kc::impl_fileline_FileLine"** %this_addr, align 4
+ %11 = getelementptr inbounds %"struct.kc::impl_fileline_FileLine", %"struct.kc::impl_fileline_FileLine"* %10, i32 0, i32 0
+ %12 = getelementptr inbounds %"struct.kc::impl_fileline", %"struct.kc::impl_fileline"* %11, i32 0, i32 1
+ %13 = load %"struct.kc::impl_casestring__Str"*, %"struct.kc::impl_casestring__Str"** %iftmp.99, align 4
store %"struct.kc::impl_casestring__Str"* %13, %"struct.kc::impl_casestring__Str"** %12, align 4
- %14 = load %"struct.kc::impl_fileline_FileLine"** %this_addr, align 4
- %15 = getelementptr inbounds %"struct.kc::impl_fileline_FileLine"* %14, i32 0, i32 0
- %16 = getelementptr inbounds %"struct.kc::impl_fileline"* %15, i32 0, i32 2
- %17 = load i32* %_line_addr, align 4
+ %14 = load %"struct.kc::impl_fileline_FileLine"*, %"struct.kc::impl_fileline_FileLine"** %this_addr, align 4
+ %15 = getelementptr inbounds %"struct.kc::impl_fileline_FileLine", %"struct.kc::impl_fileline_FileLine"* %14, i32 0, i32 0
+ %16 = getelementptr inbounds %"struct.kc::impl_fileline", %"struct.kc::impl_fileline"* %15, i32 0, i32 2
+ %17 = load i32, i32* %_line_addr, align 4
store i32 %17, i32* %16, align 4
ret void
@@ -205,21 +205,21 @@ lpad: ; preds = %bb
cleanup
%exn = extractvalue { i8*, i32 } %eh_ptr, 0
store i8* %exn, i8** %eh_exception
- %eh_ptr4 = load i8** %eh_exception
+ %eh_ptr4 = load i8*, i8** %eh_exception
%eh_select5 = extractvalue { i8*, i32 } %eh_ptr, 1
store i32 %eh_select5, i32* %eh_selector
- %eh_select = load i32* %eh_selector
+ %eh_select = load i32, i32* %eh_selector
store i32 %eh_select, i32* %save_filt.148, align 4
- %eh_value = load i8** %eh_exception
+ %eh_value = load i8*, i8** %eh_exception
store i8* %eh_value, i8** %save_eptr.147, align 4
- %18 = load %"struct.kc::impl_fileline_FileLine"** %this_addr, align 4
+ %18 = load %"struct.kc::impl_fileline_FileLine"*, %"struct.kc::impl_fileline_FileLine"** %this_addr, align 4
%19 = bitcast %"struct.kc::impl_fileline_FileLine"* %18 to %"struct.kc::impl_fileline"*
call void @_ZN2kc13impl_filelineD2Ev(%"struct.kc::impl_fileline"* %19) nounwind
- %20 = load i8** %save_eptr.147, align 4
+ %20 = load i8*, i8** %save_eptr.147, align 4
store i8* %20, i8** %eh_exception, align 4
- %21 = load i32* %save_filt.148, align 4
+ %21 = load i32, i32* %save_filt.148, align 4
store i32 %21, i32* %eh_selector, align 4
- %eh_ptr6 = load i8** %eh_exception
+ %eh_ptr6 = load i8*, i8** %eh_exception
call void @_Unwind_Resume_or_Rethrow()
unreachable
}
diff --git a/test/Transforms/MergeFunc/address-spaces.ll b/test/Transforms/MergeFunc/address-spaces.ll
index 0d66b82..1cfecae 100644
--- a/test/Transforms/MergeFunc/address-spaces.ll
+++ b/test/Transforms/MergeFunc/address-spaces.ll
@@ -9,8 +9,8 @@ declare void @foo(i32) nounwind
define i32 @store_as0(i32* %x) {
; CHECK-LABEL: @store_as0(
; CHECK: call void @foo(
- %gep = getelementptr i32* %x, i32 4
- %y = load i32* %gep
+ %gep = getelementptr i32, i32* %x, i32 4
+ %y = load i32, i32* %gep
call void @foo(i32 %y) nounwind
ret i32 %y
}
@@ -18,8 +18,8 @@ define i32 @store_as0(i32* %x) {
define i32 @store_as1(i32 addrspace(1)* %x) {
; CHECK-LABEL: @store_as1(
; CHECK: call void @foo(
- %gep = getelementptr i32 addrspace(1)* %x, i32 4
- %y = load i32 addrspace(1)* %gep
+ %gep = getelementptr i32, i32 addrspace(1)* %x, i32 4
+ %y = load i32, i32 addrspace(1)* %gep
call void @foo(i32 %y) nounwind
ret i32 %y
}
@@ -27,8 +27,8 @@ define i32 @store_as1(i32 addrspace(1)* %x) {
define i32 @store_as2(i32 addrspace(2)* %x) {
; CHECK-LABEL: @store_as2(
; CHECK: call void @foo(
- %gep = getelementptr i32 addrspace(2)* %x, i32 4
- %y = load i32 addrspace(2)* %gep
+ %gep = getelementptr i32, i32 addrspace(2)* %x, i32 4
+ %y = load i32, i32 addrspace(2)* %gep
call void @foo(i32 %y) nounwind
ret i32 %y
}
diff --git a/test/Transforms/MergeFunc/crash.ll b/test/Transforms/MergeFunc/crash.ll
index 3475e28..7380220 100644
--- a/test/Transforms/MergeFunc/crash.ll
+++ b/test/Transforms/MergeFunc/crash.ll
@@ -21,13 +21,13 @@ define internal i32 @func1(i32* %ptr, { i32, i32 }* nocapture %method) align 2 {
}
define internal i32 @func10(%.qux.2496* nocapture %this) align 2 {
- %1 = getelementptr inbounds %.qux.2496* %this, i32 0, i32 1, i32 1
- %2 = load i32* %1, align 4
+ %1 = getelementptr inbounds %.qux.2496, %.qux.2496* %this, i32 0, i32 1, i32 1
+ %2 = load i32, i32* %1, align 4
ret i32 %2
}
define internal i8* @func29(i32* nocapture %this) align 2 {
- ret i8* getelementptr inbounds ([9 x i8]* @g2, i32 0, i32 0)
+ ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @g2, i32 0, i32 0)
}
define internal i32* @func33(%.qux.2585* nocapture %this) align 2 {
@@ -35,12 +35,12 @@ define internal i32* @func33(%.qux.2585* nocapture %this) align 2 {
}
define internal i32* @func34(%.qux.2585* nocapture %this) align 2 {
- %1 = getelementptr inbounds %.qux.2585* %this, i32 0
+ %1 = getelementptr inbounds %.qux.2585, %.qux.2585* %this, i32 0
ret i32* undef
}
define internal i8* @func35(%.qux.2585* nocapture %this) align 2 {
- %1 = getelementptr inbounds %.qux.2585* %this, i32 0, i32 2
- %2 = load i8** %1, align 4
+ %1 = getelementptr inbounds %.qux.2585, %.qux.2585* %this, i32 0, i32 2
+ %2 = load i8*, i8** %1, align 4
ret i8* %2
}
diff --git a/test/Transforms/MergeFunc/inttoptr-address-space.ll b/test/Transforms/MergeFunc/inttoptr-address-space.ll
index 2e5e2fc..5f672de 100644
--- a/test/Transforms/MergeFunc/inttoptr-address-space.ll
+++ b/test/Transforms/MergeFunc/inttoptr-address-space.ll
@@ -11,8 +11,8 @@ target datalayout = "e-p:32:32:32-p1:16:16:16-i1:8:8-i8:8:8-i16:16:16-i32:32:32-
define internal i32 @func10(%.qux.2496 addrspace(1)* nocapture %this) align 2 {
bb:
- %tmp = getelementptr inbounds %.qux.2496 addrspace(1)* %this, i32 0, i32 1, i32 1
- %tmp1 = load i32 addrspace(1)* %tmp, align 4
+ %tmp = getelementptr inbounds %.qux.2496, %.qux.2496 addrspace(1)* %this, i32 0, i32 1, i32 1
+ %tmp1 = load i32, i32 addrspace(1)* %tmp, align 4
ret i32 %tmp1
}
@@ -23,7 +23,7 @@ bb:
; CHECK: %[[V2:.+]] = bitcast %.qux.2585 addrspace(1)* %{{.*}} to %.qux.2496 addrspace(1)*
; CHECK: %[[V3:.+]] = tail call i32 @func10(%.qux.2496 addrspace(1)* %[[V2]])
; CHECK: %{{.*}} = inttoptr i32 %[[V3]] to i8*
- %tmp = getelementptr inbounds %.qux.2585 addrspace(1)* %this, i32 0, i32 2
- %tmp1 = load i8* addrspace(1)* %tmp, align 4
+ %tmp = getelementptr inbounds %.qux.2585, %.qux.2585 addrspace(1)* %this, i32 0, i32 2
+ %tmp1 = load i8*, i8* addrspace(1)* %tmp, align 4
ret i8* %tmp1
}
diff --git a/test/Transforms/MergeFunc/inttoptr.ll b/test/Transforms/MergeFunc/inttoptr.ll
index 86c18a0..0abbf62 100644
--- a/test/Transforms/MergeFunc/inttoptr.ll
+++ b/test/Transforms/MergeFunc/inttoptr.ll
@@ -23,14 +23,14 @@ bb2: ; preds = %bb1
define internal i32 @func10(%.qux.2496* nocapture %this) align 2 {
bb:
- %tmp = getelementptr inbounds %.qux.2496* %this, i32 0, i32 1, i32 1
- %tmp1 = load i32* %tmp, align 4
+ %tmp = getelementptr inbounds %.qux.2496, %.qux.2496* %this, i32 0, i32 1, i32 1
+ %tmp1 = load i32, i32* %tmp, align 4
ret i32 %tmp1
}
define internal i8* @func29(i32* nocapture %this) align 2 {
bb:
- ret i8* getelementptr inbounds ([9 x i8]* @g2, i32 0, i32 0)
+ ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @g2, i32 0, i32 0)
}
define internal i32* @func33(%.qux.2585* nocapture %this) align 2 {
@@ -40,7 +40,7 @@ bb:
define internal i32* @func34(%.qux.2585* nocapture %this) align 2 {
bb:
- %tmp = getelementptr inbounds %.qux.2585* %this, i32 0
+ %tmp = getelementptr inbounds %.qux.2585, %.qux.2585* %this, i32 0
ret i32* undef
}
@@ -50,7 +50,7 @@ bb:
; CHECK: %[[V2:.+]] = bitcast %.qux.2585* %{{.*}} to %.qux.2496*
; CHECK: %[[V3:.+]] = tail call i32 @func10(%.qux.2496* %[[V2]])
; CHECK: %{{.*}} = inttoptr i32 %[[V3]] to i8*
- %tmp = getelementptr inbounds %.qux.2585* %this, i32 0, i32 2
- %tmp1 = load i8** %tmp, align 4
+ %tmp = getelementptr inbounds %.qux.2585, %.qux.2585* %this, i32 0, i32 2
+ %tmp1 = load i8*, i8** %tmp, align 4
ret i8* %tmp1
}
diff --git a/test/Transforms/MergeFunc/mergefunc-struct-return.ll b/test/Transforms/MergeFunc/mergefunc-struct-return.ll
index d2cbe43..14db399 100644
--- a/test/Transforms/MergeFunc/mergefunc-struct-return.ll
+++ b/test/Transforms/MergeFunc/mergefunc-struct-return.ll
@@ -13,12 +13,12 @@ declare void @noop()
define %kv1 @fn1() {
; CHECK-LABEL: @fn1(
%tmp = alloca %kv1
- %v1 = getelementptr %kv1* %tmp, i32 0, i32 0
+ %v1 = getelementptr %kv1, %kv1* %tmp, i32 0, i32 0
store i32* null, i32** %v1
- %v2 = getelementptr %kv1* %tmp, i32 0, i32 0
+ %v2 = getelementptr %kv1, %kv1* %tmp, i32 0, i32 0
store i32* null, i32** %v2
call void @noop()
- %v3 = load %kv1* %tmp
+ %v3 = load %kv1, %kv1* %tmp
ret %kv1 %v3
}
@@ -29,12 +29,12 @@ define %kv2 @fn2() {
; CHECK: %3 = bitcast i32* %2 to i8*
; CHECK: %4 = insertvalue %kv2 undef, i8* %3, 0
%tmp = alloca %kv2
- %v1 = getelementptr %kv2* %tmp, i32 0, i32 0
+ %v1 = getelementptr %kv2, %kv2* %tmp, i32 0, i32 0
store i8* null, i8** %v1
- %v2 = getelementptr %kv2* %tmp, i32 0, i32 0
+ %v2 = getelementptr %kv2, %kv2* %tmp, i32 0, i32 0
store i8* null, i8** %v2
call void @noop()
- %v3 = load %kv2* %tmp
+ %v3 = load %kv2, %kv2* %tmp
ret %kv2 %v3
}
diff --git a/test/Transforms/MergeFunc/ranges.ll b/test/Transforms/MergeFunc/ranges.ll
index d3e4d94..46a0c76 100644
--- a/test/Transforms/MergeFunc/ranges.ll
+++ b/test/Transforms/MergeFunc/ranges.ll
@@ -1,31 +1,31 @@
; RUN: opt -mergefunc -S < %s | FileCheck %s
define i1 @cmp_with_range(i8*, i8*) {
- %v1 = load i8* %0, !range !0
- %v2 = load i8* %1, !range !0
+ %v1 = load i8, i8* %0, !range !0
+ %v2 = load i8, i8* %1, !range !0
%out = icmp eq i8 %v1, %v2
ret i1 %out
}
define i1 @cmp_no_range(i8*, i8*) {
; CHECK-LABEL: @cmp_no_range
-; CHECK-NEXT %v1 = load i8* %0
-; CHECK-NEXT %v2 = load i8* %1
+; CHECK-NEXT %v1 = load i8, i8* %0
+; CHECK-NEXT %v2 = load i8, i8* %1
; CHECK-NEXT %out = icmp eq i8 %v1, %v2
; CHECK-NEXT ret i1 %out
- %v1 = load i8* %0
- %v2 = load i8* %1
+ %v1 = load i8, i8* %0
+ %v2 = load i8, i8* %1
%out = icmp eq i8 %v1, %v2
ret i1 %out
}
define i1 @cmp_different_range(i8*, i8*) {
; CHECK-LABEL: @cmp_different_range
-; CHECK-NEXT: %v1 = load i8* %0, !range !1
-; CHECK-NEXT: %v2 = load i8* %1, !range !1
+; CHECK-NEXT: %v1 = load i8, i8* %0, !range !1
+; CHECK-NEXT: %v2 = load i8, i8* %1, !range !1
; CHECK-NEXT: %out = icmp eq i8 %v1, %v2
; CHECK-NEXT: ret i1 %out
- %v1 = load i8* %0, !range !1
- %v2 = load i8* %1, !range !1
+ %v1 = load i8, i8* %0, !range !1
+ %v2 = load i8, i8* %1, !range !1
%out = icmp eq i8 %v1, %v2
ret i1 %out
}
@@ -33,8 +33,8 @@ define i1 @cmp_different_range(i8*, i8*) {
define i1 @cmp_with_same_range(i8*, i8*) {
; CHECK-LABEL: @cmp_with_same_range
; CHECK: tail call i1 @cmp_with_range
- %v1 = load i8* %0, !range !0
- %v2 = load i8* %1, !range !0
+ %v1 = load i8, i8* %0, !range !0
+ %v2 = load i8, i8* %1, !range !0
%out = icmp eq i8 %v1, %v2
ret i1 %out
}
diff --git a/test/Transforms/MergeFunc/vector-GEP-crash.ll b/test/Transforms/MergeFunc/vector-GEP-crash.ll
index a1eefa0..d0e86eb 100644
--- a/test/Transforms/MergeFunc/vector-GEP-crash.ll
+++ b/test/Transforms/MergeFunc/vector-GEP-crash.ll
@@ -2,11 +2,11 @@
; This used to cause a crash when compairing the GEPs
define void @foo(<2 x i64*>) {
- %tmp = getelementptr <2 x i64*> %0, <2 x i64> <i64 0, i64 0>
+ %tmp = getelementptr i64, <2 x i64*> %0, <2 x i64> <i64 0, i64 0>
ret void
}
define void @bar(<2 x i64*>) {
- %tmp = getelementptr <2 x i64*> %0, <2 x i64> <i64 0, i64 0>
+ %tmp = getelementptr i64, <2 x i64*> %0, <2 x i64> <i64 0, i64 0>
ret void
}
diff --git a/test/Transforms/MergeFunc/vector.ll b/test/Transforms/MergeFunc/vector.ll
index 56f74e6..ef13753 100644
--- a/test/Transforms/MergeFunc/vector.ll
+++ b/test/Transforms/MergeFunc/vector.ll
@@ -22,7 +22,7 @@ target triple = "x86_64-unknown-linux-gnu"
define linkonce_odr void @_ZNSt6vectorIlSaIlEED1Ev(%"class.std::vector"* nocapture %this) unnamed_addr align 2 {
entry:
%tmp2.i.i = bitcast %"class.std::vector"* %this to i64**
- %tmp3.i.i = load i64** %tmp2.i.i, align 8
+ %tmp3.i.i = load i64*, i64** %tmp2.i.i, align 8
%tobool.i.i.i = icmp eq i64* %tmp3.i.i, null
br i1 %tobool.i.i.i, label %_ZNSt6vectorIlSaIlEED2Ev.exit, label %if.then.i.i.i
@@ -40,7 +40,7 @@ declare i32 @__cxa_atexit(void (i8*)*, i8*, i8*)
define linkonce_odr void @_ZNSt6vectorIPvSaIS0_EED1Ev(%"class.std::vector"* nocapture %this) unnamed_addr align 2 {
entry:
%tmp2.i.i = bitcast %"class.std::vector"* %this to i8***
- %tmp3.i.i = load i8*** %tmp2.i.i, align 8
+ %tmp3.i.i = load i8**, i8*** %tmp2.i.i, align 8
%tobool.i.i.i = icmp eq i8** %tmp3.i.i, null
br i1 %tobool.i.i.i, label %_ZNSt6vectorIPvSaIS0_EED2Ev.exit, label %if.then.i.i.i