[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
diff --git a/llvm/test/Analysis/GlobalsModRef/2008-09-03-ReadGlobals.ll b/llvm/test/Analysis/GlobalsModRef/2008-09-03-ReadGlobals.ll
index d51c159..513ec86 100644
--- a/llvm/test/Analysis/GlobalsModRef/2008-09-03-ReadGlobals.ll
+++ b/llvm/test/Analysis/GlobalsModRef/2008-09-03-ReadGlobals.ll
@@ -3,7 +3,7 @@
 @g = internal global i32 0		; <i32*> [#uses=2]
 
 define i32 @r() {
-	%tmp = load i32* @g		; <i32> [#uses=1]
+	%tmp = load i32, i32* @g		; <i32> [#uses=1]
 	ret i32 %tmp
 }
 
diff --git a/llvm/test/Analysis/GlobalsModRef/aliastest.ll b/llvm/test/Analysis/GlobalsModRef/aliastest.ll
index 4cfed71..3474e13 100644
--- a/llvm/test/Analysis/GlobalsModRef/aliastest.ll
+++ b/llvm/test/Analysis/GlobalsModRef/aliastest.ll
@@ -9,6 +9,6 @@
 ; CHECK-NEXT: ret i32 7
 	store i32 7, i32* %P
 	store i32 12, i32* @X
-	%V = load i32* %P		; <i32> [#uses=1]
+	%V = load i32, i32* %P		; <i32> [#uses=1]
 	ret i32 %V
 }
diff --git a/llvm/test/Analysis/GlobalsModRef/chaining-analysis.ll b/llvm/test/Analysis/GlobalsModRef/chaining-analysis.ll
index aeb76e4..26671da 100644
--- a/llvm/test/Analysis/GlobalsModRef/chaining-analysis.ll
+++ b/llvm/test/Analysis/GlobalsModRef/chaining-analysis.ll
@@ -14,7 +14,7 @@
 ; CHECK-NEXT: ret i32 12
 	store i32 12, i32* @X
 	call double @doesnotmodX( double 1.000000e+00 )		; <double>:1 [#uses=0]
-	%V = load i32* @X		; <i32> [#uses=1]
+	%V = load i32, i32* @X		; <i32> [#uses=1]
 	ret i32 %V
 }
 
diff --git a/llvm/test/Analysis/GlobalsModRef/indirect-global.ll b/llvm/test/Analysis/GlobalsModRef/indirect-global.ll
index 48ac6dd..0281323 100644
--- a/llvm/test/Analysis/GlobalsModRef/indirect-global.ll
+++ b/llvm/test/Analysis/GlobalsModRef/indirect-global.ll
@@ -12,11 +12,11 @@
 
 define i32 @test1(i32* %P) {
 ; CHECK: ret i32 0
-	%g1 = load i32** @G		; <i32*> [#uses=2]
-	%h1 = load i32* %g1		; <i32> [#uses=1]
+	%g1 = load i32*, i32** @G		; <i32*> [#uses=2]
+	%h1 = load i32, i32* %g1		; <i32> [#uses=1]
 	store i32 123, i32* %P
-	%g2 = load i32** @G		; <i32*> [#uses=0]
-	%h2 = load i32* %g1		; <i32> [#uses=1]
+	%g2 = load i32*, i32** @G		; <i32*> [#uses=0]
+	%h2 = load i32, i32* %g1		; <i32> [#uses=1]
 	%X = sub i32 %h1, %h2		; <i32> [#uses=1]
 	ret i32 %X
 }
diff --git a/llvm/test/Analysis/GlobalsModRef/modreftest.ll b/llvm/test/Analysis/GlobalsModRef/modreftest.ll
index 3eed916..74101e2 100644
--- a/llvm/test/Analysis/GlobalsModRef/modreftest.ll
+++ b/llvm/test/Analysis/GlobalsModRef/modreftest.ll
@@ -9,7 +9,7 @@
 ; CHECK-NEXT: ret i32 12
 	store i32 12, i32* @X
 	call void @doesnotmodX( )
-	%V = load i32* @X		; <i32> [#uses=1]
+	%V = load i32, i32* @X		; <i32> [#uses=1]
 	ret i32 %V
 }
 
diff --git a/llvm/test/Analysis/GlobalsModRef/pr12351.ll b/llvm/test/Analysis/GlobalsModRef/pr12351.ll
index c221f4c..8f92277 100644
--- a/llvm/test/Analysis/GlobalsModRef/pr12351.ll
+++ b/llvm/test/Analysis/GlobalsModRef/pr12351.ll
@@ -9,7 +9,7 @@
 define void @bar(i8* %y, i8* %z) {
   %x = alloca i8
   call void @foo(i8* %x, i8* %y)
-  %t = load i8* %x
+  %t = load i8, i8* %x
   store i8 %t, i8* %y
 ; CHECK: store i8 %t, i8* %y
   ret void
@@ -19,8 +19,8 @@
 define i32 @foo2() {
   %foo = alloca i32
   call void @bar2(i32* %foo)
-  %t0 = load i32* %foo, align 4
-; CHECK: %t0 = load i32* %foo, align 4
+  %t0 = load i32, i32* %foo, align 4
+; CHECK: %t0 = load i32, i32* %foo, align 4
   ret i32 %t0
 }
 
diff --git a/llvm/test/Analysis/GlobalsModRef/volatile-instrs.ll b/llvm/test/Analysis/GlobalsModRef/volatile-instrs.ll
index 46d3d76..df49b4b 100644
--- a/llvm/test/Analysis/GlobalsModRef/volatile-instrs.ll
+++ b/llvm/test/Analysis/GlobalsModRef/volatile-instrs.ll
@@ -22,7 +22,7 @@
 define i32 @main() nounwind uwtable ssp {
 main_entry:
   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* bitcast (%struct.anon* @b to i8*), i8* bitcast (%struct.anon* @a to i8*), i64 12, i32 4, i1 false)
-  %0 = load volatile i32* getelementptr inbounds (%struct.anon* @b, i64 0, i32 0), align 4
+  %0 = load volatile i32, i32* getelementptr inbounds (%struct.anon* @b, i64 0, i32 0), align 4
   store i32 %0, i32* @c, align 4
   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* bitcast (%struct.anon* @b to i8*), i8* bitcast (%struct.anon* @a to i8*), i64 12, i32 4, i1 false) nounwind
   %call = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8]* @.str, i64 0, i64 0), i32 %0) nounwind