mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-04 01:11:44 +00:00
3ea2df7c7b
Similar to gep (r230786) and load (r230794) changes. Similar migration script can be used to update test cases, which successfully migrated all of LLVM and Polly, but about 4 test cases needed manually changes in Clang. (this script will read the contents of stdin and massage it into stdout - wrap it in the 'apply.sh' script shown in previous commits + xargs to apply it over a large set of test cases) import fileinput import sys import re rep = re.compile(r"(getelementptr(?:\s+inbounds)?\s*\()((<\d*\s+x\s+)?([^@]*?)(|\s*addrspace\(\d+\))\s*\*(?(3)>)\s*)(?=$|%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|zeroinitializer|<|\[\[[a-zA-Z]|\{\{)", re.MULTILINE | re.DOTALL) def conv(match): line = match.group(1) line += match.group(4) line += ", " line += match.group(2) return line line = sys.stdin.read() off = 0 for match in re.finditer(rep, line): sys.stdout.write(line[off:match.start()]) sys.stdout.write(conv(match)) off = match.end() sys.stdout.write(line[off:]) llvm-svn: 232184
50 lines
1.2 KiB
LLVM
50 lines
1.2 KiB
LLVM
; RUN: llc < %s -march=x86
|
|
|
|
@data = external global [339 x i64]
|
|
|
|
define void @foo(...) {
|
|
bb1:
|
|
%t43 = load i64, i64* getelementptr ([339 x i64], [339 x i64]* @data, i32 0, i64 212), align 4
|
|
br i1 false, label %bb80, label %bb6
|
|
bb6:
|
|
br i1 false, label %bb38, label %bb265
|
|
bb265:
|
|
ret void
|
|
bb38:
|
|
br i1 false, label %bb80, label %bb49
|
|
bb80:
|
|
br i1 false, label %bb146, label %bb268
|
|
bb49:
|
|
ret void
|
|
bb113:
|
|
ret void
|
|
bb268:
|
|
%t1062 = shl i64 %t43, 3
|
|
%t1066 = shl i64 0, 3
|
|
br label %bb85
|
|
bb85:
|
|
%t1025 = phi i64 [ 0, %bb268 ], [ %t102.0, %bb234 ]
|
|
%t1028 = phi i64 [ 0, %bb268 ], [ %t1066, %bb234 ]
|
|
%t1031 = phi i64 [ 0, %bb268 ], [ %t103.0, %bb234 ]
|
|
%t1034 = phi i64 [ 0, %bb268 ], [ %t1066, %bb234 ]
|
|
%t102.0 = add i64 %t1028, %t1025
|
|
%t103.0 = add i64 %t1034, %t1031
|
|
br label %bb86
|
|
bb86:
|
|
%t108.0 = phi i64 [ %t102.0, %bb85 ], [ %t1139, %bb248 ]
|
|
%t110.0 = phi i64 [ %t103.0, %bb85 ], [ %t1142, %bb248 ]
|
|
br label %bb193
|
|
bb193:
|
|
%t1081 = add i64 %t110.0, -8
|
|
%t1087 = add i64 %t108.0, -8
|
|
br i1 false, label %bb193, label %bb248
|
|
bb248:
|
|
%t1139 = add i64 %t108.0, %t1062
|
|
%t1142 = add i64 %t110.0, %t1062
|
|
br i1 false, label %bb86, label %bb234
|
|
bb234:
|
|
br i1 false, label %bb85, label %bb113
|
|
bb146:
|
|
ret void
|
|
}
|