summaryrefslogtreecommitdiffstats
path: root/llvm/test/Assembler
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2015-02-27 21:17:42 +0000
committerDavid Blaikie <dblaikie@gmail.com>2015-02-27 21:17:42 +0000
commita79ac14fa68297f9888bc70a10df5ed9b8864e38 (patch)
tree8d8217a8928e3ee599bdde405e2e178b3a55b645 /llvm/test/Assembler
parent83687fb9e654c9d0086e7f6b728c26fa0b729e71 (diff)
downloadbcm5719-llvm-a79ac14fa68297f9888bc70a10df5ed9b8864e38.tar.gz
bcm5719-llvm-a79ac14fa68297f9888bc70a10df5ed9b8864e38.zip
[opaque pointer type] Add textual IR support for explicit type parameter to load instruction
Essentially the same as the GEP change in r230786. A similar migration script can be used to update test cases, though a few more test case improvements/changes were required this time around: (r229269-r229278) import fileinput import sys import re pat = re.compile(r"((?:=|:|^)\s*load (?:atomic )?(?:volatile )?(.*?))(| addrspace\(\d+\) *)\*($| *(?:%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|\[\[[a-zA-Z]|\{\{).*$)") for line in sys.stdin: sys.stdout.write(re.sub(pat, r"\1, \2\3*\4", line)) Reviewers: rafael, dexonsmith, grosser Differential Revision: http://reviews.llvm.org/D7649 llvm-svn: 230794
Diffstat (limited to 'llvm/test/Assembler')
-rw-r--r--llvm/test/Assembler/2002-04-29-NameBinding.ll2
-rw-r--r--llvm/test/Assembler/2002-08-19-BytecodeReader.ll4
-rw-r--r--llvm/test/Assembler/2003-08-20-ConstantExprGEP-Fold.ll2
-rw-r--r--llvm/test/Assembler/2004-06-07-VerifierBug.ll2
-rw-r--r--llvm/test/Assembler/2007-01-05-Cmp-ConstExpr.ll2
-rw-r--r--llvm/test/Assembler/2007-04-20-AlignedLoad.ll2
-rw-r--r--llvm/test/Assembler/2007-12-11-AddressSpaces.ll6
-rw-r--r--llvm/test/Assembler/2010-02-05-FunctionLocalMetadataBecomesNull.ll2
-rw-r--r--llvm/test/Assembler/align-inst-load.ll2
-rw-r--r--llvm/test/Assembler/align-inst.ll2
-rw-r--r--llvm/test/Assembler/atomic.ll8
-rw-r--r--llvm/test/Assembler/fast-math-flags.ll48
-rw-r--r--llvm/test/Assembler/half-constprop.ll4
-rw-r--r--llvm/test/Assembler/half-conv.ll2
-rw-r--r--llvm/test/Assembler/insertextractvalue.ll2
-rw-r--r--llvm/test/Assembler/invalid-load-mismatched-explicit-type.ll6
-rw-r--r--llvm/test/Assembler/invalid-load-missing-explicit-type.ll6
-rw-r--r--llvm/test/Assembler/numbered-values.ll2
-rw-r--r--llvm/test/Assembler/unnamed.ll2
-rw-r--r--llvm/test/Assembler/upgrade-loop-metadata.ll4
-rw-r--r--llvm/test/Assembler/uselistorder.ll2
21 files changed, 62 insertions, 50 deletions
diff --git a/llvm/test/Assembler/2002-04-29-NameBinding.ll b/llvm/test/Assembler/2002-04-29-NameBinding.ll
index 960209bcb5b..c387c47ef93 100644
--- a/llvm/test/Assembler/2002-04-29-NameBinding.ll
+++ b/llvm/test/Assembler/2002-04-29-NameBinding.ll
@@ -13,7 +13,7 @@
define i32 @createtask() {
%v1 = alloca i32 ;; Alloca should have one use!
- %reg112 = load i32* %v1 ;; This load should not use the global!
+ %reg112 = load i32, i32* %v1 ;; This load should not use the global!
ret i32 %reg112
}
diff --git a/llvm/test/Assembler/2002-08-19-BytecodeReader.ll b/llvm/test/Assembler/2002-08-19-BytecodeReader.ll
index 6ddb01e6d24..1fd6bb6f3be 100644
--- a/llvm/test/Assembler/2002-08-19-BytecodeReader.ll
+++ b/llvm/test/Assembler/2002-08-19-BytecodeReader.ll
@@ -11,8 +11,8 @@
define void @Evaluate() {
%reg1321 = getelementptr %CHESS_POSITION, %CHESS_POSITION* @search, i64 0, i32 1 ; <i32*> [#uses=1]
- %reg114 = load i32* %reg1321 ; <i32> [#uses=0]
+ %reg114 = load i32, i32* %reg1321 ; <i32> [#uses=0]
%reg1801 = getelementptr %CHESS_POSITION, %CHESS_POSITION* @search, i64 0, i32 0 ; <i32*> [#uses=1]
- %reg182 = load i32* %reg1801 ; <i32> [#uses=0]
+ %reg182 = load i32, i32* %reg1801 ; <i32> [#uses=0]
ret void
}
diff --git a/llvm/test/Assembler/2003-08-20-ConstantExprGEP-Fold.ll b/llvm/test/Assembler/2003-08-20-ConstantExprGEP-Fold.ll
index 911f0ff7159..05b4ee2519c 100644
--- a/llvm/test/Assembler/2003-08-20-ConstantExprGEP-Fold.ll
+++ b/llvm/test/Assembler/2003-08-20-ConstantExprGEP-Fold.ll
@@ -4,7 +4,7 @@
@.str_1 = internal constant [6 x i8] c"_Bool\00" ; <[6 x i8]*> [#uses=2]
define i32 @test() {
- %tmp.54 = load i8* getelementptr ([6 x i8]* @.str_1, i64 0, i64 1) ; <i8> [#uses=1]
+ %tmp.54 = load i8, i8* getelementptr ([6 x i8]* @.str_1, i64 0, i64 1) ; <i8> [#uses=1]
%tmp.55 = icmp ne i8 %tmp.54, 66 ; <i1> [#uses=1]
br i1 %tmp.55, label %then.7, label %endif.7
diff --git a/llvm/test/Assembler/2004-06-07-VerifierBug.ll b/llvm/test/Assembler/2004-06-07-VerifierBug.ll
index e01cee82ab9..2fc0ae29ca7 100644
--- a/llvm/test/Assembler/2004-06-07-VerifierBug.ll
+++ b/llvm/test/Assembler/2004-06-07-VerifierBug.ll
@@ -7,6 +7,6 @@ entry:
loop: ; preds = %loop
%tmp.4.i9 = getelementptr i32, i32* null, i32 %tmp.5.i10 ; <i32*> [#uses=1]
- %tmp.5.i10 = load i32* %tmp.4.i9 ; <i32> [#uses=1]
+ %tmp.5.i10 = load i32, i32* %tmp.4.i9 ; <i32> [#uses=1]
br label %loop
}
diff --git a/llvm/test/Assembler/2007-01-05-Cmp-ConstExpr.ll b/llvm/test/Assembler/2007-01-05-Cmp-ConstExpr.ll
index 573d008c365..5d1dd91ba91 100644
--- a/llvm/test/Assembler/2007-01-05-Cmp-ConstExpr.ll
+++ b/llvm/test/Assembler/2007-01-05-Cmp-ConstExpr.ll
@@ -7,7 +7,7 @@
define i32 @main(i32 %argc, i8** %argv) {
entry:
%tmp65 = getelementptr i8*, i8** %argv, i32 1 ; <i8**> [#uses=1]
- %tmp66 = load i8** %tmp65 ; <i8*> [#uses=0]
+ %tmp66 = load i8*, i8** %tmp65 ; <i8*> [#uses=0]
br i1 icmp ne (i32 sub (i32 ptrtoint (i8* getelementptr ([4 x i8]* @str, i32 0, i64 1) to i32), i32 ptrtoint ([4 x i8]* @str to i32)), i32 1), label %exit_1, label %exit_2
exit_1: ; preds = %entry
diff --git a/llvm/test/Assembler/2007-04-20-AlignedLoad.ll b/llvm/test/Assembler/2007-04-20-AlignedLoad.ll
index bcf65fd6eac..1e8850a7073 100644
--- a/llvm/test/Assembler/2007-04-20-AlignedLoad.ll
+++ b/llvm/test/Assembler/2007-04-20-AlignedLoad.ll
@@ -3,6 +3,6 @@
define i32 @test(i32* %arg) {
entry:
- %tmp2 = load i32* %arg, align 1024 ; <i32> [#uses=1]
+ %tmp2 = load i32, i32* %arg, align 1024 ; <i32> [#uses=1]
ret i32 %tmp2
}
diff --git a/llvm/test/Assembler/2007-12-11-AddressSpaces.ll b/llvm/test/Assembler/2007-12-11-AddressSpaces.ll
index f860f57e8dd..3d13f43602f 100644
--- a/llvm/test/Assembler/2007-12-11-AddressSpaces.ll
+++ b/llvm/test/Assembler/2007-12-11-AddressSpaces.ll
@@ -12,15 +12,15 @@
define void @foo() {
entry:
- %tmp1 = load i32 addrspace(33)* addrspace(42)* getelementptr (%struct.mystruct addrspace(42)* @input, i32 0, i32 3), align 4 ; <i32 addrspace(33)*> [#uses=1]
+ %tmp1 = load i32 addrspace(33)*, i32 addrspace(33)* addrspace(42)* getelementptr (%struct.mystruct addrspace(42)* @input, i32 0, i32 3), align 4 ; <i32 addrspace(33)*> [#uses=1]
store i32 addrspace(33)* %tmp1, i32 addrspace(33)* addrspace(66)* getelementptr (%struct.mystruct addrspace(66)* @output, i32 0, i32 1), align 4
ret void
}
define i32 addrspace(11)* @bar(i32 addrspace(11)* addrspace(22)* addrspace(33)* %x) {
entry:
- %tmp1 = load i32 addrspace(11)* addrspace(22)* addrspace(33)* @y, align 4 ; <i32 addrspace(11)* addrspace(22)*> [#uses=2]
+ %tmp1 = load i32 addrspace(11)* addrspace(22)*, i32 addrspace(11)* addrspace(22)* addrspace(33)* @y, align 4 ; <i32 addrspace(11)* addrspace(22)*> [#uses=2]
store i32 addrspace(11)* addrspace(22)* %tmp1, i32 addrspace(11)* addrspace(22)* addrspace(33)* %x, align 4
- %tmp5 = load i32 addrspace(11)* addrspace(22)* %tmp1, align 4 ; <i32 addrspace(11)*> [#uses=1]
+ %tmp5 = load i32 addrspace(11)*, i32 addrspace(11)* addrspace(22)* %tmp1, align 4 ; <i32 addrspace(11)*> [#uses=1]
ret i32 addrspace(11)* %tmp5
}
diff --git a/llvm/test/Assembler/2010-02-05-FunctionLocalMetadataBecomesNull.ll b/llvm/test/Assembler/2010-02-05-FunctionLocalMetadataBecomesNull.ll
index 50ad32e1c9e..c8898fc6698 100644
--- a/llvm/test/Assembler/2010-02-05-FunctionLocalMetadataBecomesNull.ll
+++ b/llvm/test/Assembler/2010-02-05-FunctionLocalMetadataBecomesNull.ll
@@ -15,7 +15,7 @@ define i32 @main() nounwind readonly {
; CHECK: call void @llvm.dbg.value(metadata i64 72,
call void @llvm.dbg.declare(metadata i64* %diff1, metadata !0, metadata !{!"0x102"})
store i64 72, i64* %diff1, align 8
- %v1 = load %struct.test** @TestArrayPtr, align 8 ; <%struct.test*> [#uses=1]
+ %v1 = load %struct.test*, %struct.test** @TestArrayPtr, align 8 ; <%struct.test*> [#uses=1]
%v2 = ptrtoint %struct.test* %v1 to i64 ; <i64> [#uses=1]
%v3 = sub i64 %v2, ptrtoint ([10 x %struct.test]* @TestArray to i64) ; <i64> [#uses=1]
store i64 %v3, i64* %diff1, align 8
diff --git a/llvm/test/Assembler/align-inst-load.ll b/llvm/test/Assembler/align-inst-load.ll
index 3586be2d6e0..75fcd3e5a02 100644
--- a/llvm/test/Assembler/align-inst-load.ll
+++ b/llvm/test/Assembler/align-inst-load.ll
@@ -1,6 +1,6 @@
; RUN: not llvm-as %s -o /dev/null 2>/dev/null
define void @foo() {
- load i1* %p, align 1073741824
+ load i1, i1* %p, align 1073741824
ret void
}
diff --git a/llvm/test/Assembler/align-inst.ll b/llvm/test/Assembler/align-inst.ll
index 1952fbc5297..028da396d2f 100644
--- a/llvm/test/Assembler/align-inst.ll
+++ b/llvm/test/Assembler/align-inst.ll
@@ -5,7 +5,7 @@
define void @foo() {
%p = alloca i1, align 536870912
- load i1* %p, align 536870912
+ load i1, i1* %p, align 536870912
store i1 false, i1* %p, align 536870912
ret void
}
diff --git a/llvm/test/Assembler/atomic.ll b/llvm/test/Assembler/atomic.ll
index 0356f5fc582..148b95d88e3 100644
--- a/llvm/test/Assembler/atomic.ll
+++ b/llvm/test/Assembler/atomic.ll
@@ -3,10 +3,10 @@
; Basic smoke test for atomic operations.
define void @f(i32* %x) {
- ; CHECK: load atomic i32* %x unordered, align 4
- load atomic i32* %x unordered, align 4
- ; CHECK: load atomic volatile i32* %x singlethread acquire, align 4
- load atomic volatile i32* %x singlethread acquire, align 4
+ ; CHECK: load atomic i32, i32* %x unordered, align 4
+ load atomic i32, i32* %x unordered, align 4
+ ; CHECK: load atomic volatile i32, i32* %x singlethread acquire, align 4
+ load atomic volatile i32, i32* %x singlethread acquire, align 4
; CHECK: store atomic i32 3, i32* %x release, align 4
store atomic i32 3, i32* %x release, align 4
; CHECK: store atomic volatile i32 3, i32* %x singlethread monotonic, align 4
diff --git a/llvm/test/Assembler/fast-math-flags.ll b/llvm/test/Assembler/fast-math-flags.ll
index 8e75bdf0f96..f0d3ecc761d 100644
--- a/llvm/test/Assembler/fast-math-flags.ll
+++ b/llvm/test/Assembler/fast-math-flags.ll
@@ -9,12 +9,12 @@
define float @none(float %x, float %y) {
entry:
-; CHECK: %vec = load <3 x float>* @vec
- %vec = load <3 x float>* @vec
-; CHECK: %select = load i1* @select
- %select = load i1* @select
-; CHECK: %arr = load [3 x float]* @arr
- %arr = load [3 x float]* @arr
+; CHECK: %vec = load <3 x float>, <3 x float>* @vec
+ %vec = load <3 x float>, <3 x float>* @vec
+; CHECK: %select = load i1, i1* @select
+ %select = load i1, i1* @select
+; CHECK: %arr = load [3 x float], [3 x float]* @arr
+ %arr = load [3 x float], [3 x float]* @arr
; CHECK: %a = fadd float %x, %y
%a = fadd float %x, %y
@@ -43,12 +43,12 @@ entry:
; CHECK: no_nan
define float @no_nan(float %x, float %y) {
entry:
-; CHECK: %vec = load <3 x float>* @vec
- %vec = load <3 x float>* @vec
-; CHECK: %select = load i1* @select
- %select = load i1* @select
-; CHECK: %arr = load [3 x float]* @arr
- %arr = load [3 x float]* @arr
+; CHECK: %vec = load <3 x float>, <3 x float>* @vec
+ %vec = load <3 x float>, <3 x float>* @vec
+; CHECK: %select = load i1, i1* @select
+ %select = load i1, i1* @select
+; CHECK: %arr = load [3 x float], [3 x float]* @arr
+ %arr = load [3 x float], [3 x float]* @arr
; CHECK: %a = fadd nnan float %x, %y
%a = fadd nnan float %x, %y
@@ -77,12 +77,12 @@ entry:
; CHECK: no_nan_inf
define float @no_nan_inf(float %x, float %y) {
entry:
-; CHECK: %vec = load <3 x float>* @vec
- %vec = load <3 x float>* @vec
-; CHECK: %select = load i1* @select
- %select = load i1* @select
-; CHECK: %arr = load [3 x float]* @arr
- %arr = load [3 x float]* @arr
+; CHECK: %vec = load <3 x float>, <3 x float>* @vec
+ %vec = load <3 x float>, <3 x float>* @vec
+; CHECK: %select = load i1, i1* @select
+ %select = load i1, i1* @select
+; CHECK: %arr = load [3 x float], [3 x float]* @arr
+ %arr = load [3 x float], [3 x float]* @arr
; CHECK: %a = fadd nnan ninf float %x, %y
%a = fadd ninf nnan float %x, %y
@@ -111,12 +111,12 @@ entry:
; CHECK: mixed_flags
define float @mixed_flags(float %x, float %y) {
entry:
-; CHECK: %vec = load <3 x float>* @vec
- %vec = load <3 x float>* @vec
-; CHECK: %select = load i1* @select
- %select = load i1* @select
-; CHECK: %arr = load [3 x float]* @arr
- %arr = load [3 x float]* @arr
+; CHECK: %vec = load <3 x float>, <3 x float>* @vec
+ %vec = load <3 x float>, <3 x float>* @vec
+; CHECK: %select = load i1, i1* @select
+ %select = load i1, i1* @select
+; CHECK: %arr = load [3 x float], [3 x float]* @arr
+ %arr = load [3 x float], [3 x float]* @arr
; CHECK: %a = fadd nnan ninf float %x, %y
%a = fadd ninf nnan float %x, %y
diff --git a/llvm/test/Assembler/half-constprop.ll b/llvm/test/Assembler/half-constprop.ll
index c5ae3bf16ab..7ca876b3c71 100644
--- a/llvm/test/Assembler/half-constprop.ll
+++ b/llvm/test/Assembler/half-constprop.ll
@@ -9,8 +9,8 @@ entry:
%.compoundliteral = alloca float, align 4
store half 0xH4200, half* %a, align 2
store half 0xH4B9A, half* %b, align 2
- %tmp = load half* %a, align 2
- %tmp1 = load half* %b, align 2
+ %tmp = load half, half* %a, align 2
+ %tmp1 = load half, half* %b, align 2
%add = fadd half %tmp, %tmp1
; CHECK: 0xH4C8D
ret half %add
diff --git a/llvm/test/Assembler/half-conv.ll b/llvm/test/Assembler/half-conv.ll
index e6f73cf71ca..657550154af 100644
--- a/llvm/test/Assembler/half-conv.ll
+++ b/llvm/test/Assembler/half-conv.ll
@@ -7,7 +7,7 @@ entry:
%a = alloca half, align 2
%.compoundliteral = alloca float, align 4
store half 0xH4C8D, half* %a, align 2
- %tmp = load half* %a, align 2
+ %tmp = load half, half* %a, align 2
%conv = fpext half %tmp to float
; CHECK: 0x4032340000000000
ret float %conv
diff --git a/llvm/test/Assembler/insertextractvalue.ll b/llvm/test/Assembler/insertextractvalue.ll
index 692843e9910..71dbba371d4 100644
--- a/llvm/test/Assembler/insertextractvalue.ll
+++ b/llvm/test/Assembler/insertextractvalue.ll
@@ -8,7 +8,7 @@
; CHECK-NEXT: store
; CHECK-NEXT: ret
define float @foo({{i32},{float, double}}* %p) nounwind {
- %t = load {{i32},{float, double}}* %p
+ %t = load {{i32},{float, double}}, {{i32},{float, double}}* %p
%s = extractvalue {{i32},{float, double}} %t, 1, 0
%r = insertvalue {{i32},{float, double}} %t, double 2.0, 1, 1
store {{i32},{float, double}} %r, {{i32},{float, double}}* %p
diff --git a/llvm/test/Assembler/invalid-load-mismatched-explicit-type.ll b/llvm/test/Assembler/invalid-load-mismatched-explicit-type.ll
new file mode 100644
index 00000000000..b8422ed730f
--- /dev/null
+++ b/llvm/test/Assembler/invalid-load-mismatched-explicit-type.ll
@@ -0,0 +1,6 @@
+; RUN: not llvm-as < %s 2>&1 | FileCheck %s
+; CHECK: <stdin>:4:13: error: explicit pointee type doesn't match operand's pointee type
+define void @test(i32* %t) {
+ %x = load i16, i32* %t
+ ret void
+}
diff --git a/llvm/test/Assembler/invalid-load-missing-explicit-type.ll b/llvm/test/Assembler/invalid-load-missing-explicit-type.ll
new file mode 100644
index 00000000000..455498e3d15
--- /dev/null
+++ b/llvm/test/Assembler/invalid-load-missing-explicit-type.ll
@@ -0,0 +1,6 @@
+; RUN: not llvm-as < %s 2>&1 | FileCheck %s
+; CHECK: <stdin>:4:18: error: expected comma after load's type
+define void @test(i32* %t) {
+ %x = load i32* %t
+ ret void
+}
diff --git a/llvm/test/Assembler/numbered-values.ll b/llvm/test/Assembler/numbered-values.ll
index 70b63779ccb..0b14c6845ab 100644
--- a/llvm/test/Assembler/numbered-values.ll
+++ b/llvm/test/Assembler/numbered-values.ll
@@ -9,7 +9,7 @@ entry:
%0 = alloca i32 ; <i32*>:0 [#uses=2]
%"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
store i32 %X, i32* %X_addr
- %1 = load i32* %X_addr, align 4 ; <i32>:1 [#uses=1]
+ %1 = load i32, i32* %X_addr, align 4 ; <i32>:1 [#uses=1]
mul i32 %1, 4 ; <i32>:2 [#uses=1]
%3 = add i32 %2, 123 ; <i32>:3 [#uses=1]
store i32 %3, i32* %0, align 4
diff --git a/llvm/test/Assembler/unnamed.ll b/llvm/test/Assembler/unnamed.ll
index 099a15a254a..7f79e5c20d7 100644
--- a/llvm/test/Assembler/unnamed.ll
+++ b/llvm/test/Assembler/unnamed.ll
@@ -16,7 +16,7 @@ module asm "this is another inline asm block"
@3 = global x86_fp80 0xK4001E000000000000000
define float @foo(%0* %p) nounwind {
- %t = load %0* %p ; <%0> [#uses=2]
+ %t = load %0, %0* %p ; <%0> [#uses=2]
%s = extractvalue %0 %t, 1, 0 ; <float> [#uses=1]
%r = insertvalue %0 %t, double 2.000000e+00, 1, 1; <%0> [#uses=1]
store %0 %r, %0* %p
diff --git a/llvm/test/Assembler/upgrade-loop-metadata.ll b/llvm/test/Assembler/upgrade-loop-metadata.ll
index 0852469774b..d88cb3ee2e2 100644
--- a/llvm/test/Assembler/upgrade-loop-metadata.ll
+++ b/llvm/test/Assembler/upgrade-loop-metadata.ll
@@ -14,7 +14,7 @@ entry:
br label %for.cond
for.cond: ; preds = %for.inc, %entry
- %0 = load i32* %i, align 4
+ %0 = load i32, i32* %i, align 4
%cmp = icmp slt i32 %0, 16
br i1 %cmp, label %for.body, label %for.end, !llvm.loop !1
@@ -22,7 +22,7 @@ for.body: ; preds = %for.cond
br label %for.inc
for.inc: ; preds = %for.body
- %1 = load i32* %i, align 4
+ %1 = load i32, i32* %i, align 4
%inc = add nsw i32 %1, 1
store i32 %inc, i32* %i, align 4
br label %for.cond
diff --git a/llvm/test/Assembler/uselistorder.ll b/llvm/test/Assembler/uselistorder.ll
index be5ee700029..873e160737c 100644
--- a/llvm/test/Assembler/uselistorder.ll
+++ b/llvm/test/Assembler/uselistorder.ll
@@ -48,7 +48,7 @@ first:
define i1 @loada() {
entry:
- %a = load i1* getelementptr ([4 x i1]* @a, i64 0, i64 2)
+ %a = load i1, i1* getelementptr ([4 x i1]* @a, i64 0, i64 2)
ret i1 %a
}
OpenPOWER on IntegriCloud