llvm-6502/test/Analysis/GlobalsModRef/pr12351.ll
David Blaikie 7c9c6ed761 [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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230794 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-27 21:17:42 +00:00

34 lines
846 B
LLVM

; RUN: opt < %s -basicaa -globalsmodref-aa -gvn -S | FileCheck %s
declare void @llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1)
define void @foo(i8* %x, i8* %y) {
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %x, i8* %y, i32 1, i32 1, i1 false);
ret void
}
define void @bar(i8* %y, i8* %z) {
%x = alloca i8
call void @foo(i8* %x, i8* %y)
%t = load i8, i8* %x
store i8 %t, i8* %y
; CHECK: store i8 %t, i8* %y
ret void
}
define i32 @foo2() {
%foo = alloca i32
call void @bar2(i32* %foo)
%t0 = load i32, i32* %foo, align 4
; CHECK: %t0 = load i32, i32* %foo, align 4
ret i32 %t0
}
define void @bar2(i32* %foo) {
store i32 0, i32* %foo, align 4
tail call void @llvm.dbg.value(metadata !{}, i64 0, metadata !{}, metadata !{})
ret void
}
declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnone