mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
7c9c6ed761
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
28 lines
965 B
LLVM
28 lines
965 B
LLVM
; RUN: llc < %s -mtriple armv7--linux-gnueabi
|
|
|
|
define arm_aapcscc i8* @__strtok_r_1c(i8* %arg, i8 signext %arg1, i8** nocapture %arg2) nounwind {
|
|
bb:
|
|
br label %bb3
|
|
|
|
bb3: ; preds = %bb3, %bb
|
|
%tmp = phi i8* [ %tmp5, %bb3 ], [ %arg, %bb ]
|
|
%tmp4 = load i8, i8* %tmp, align 1
|
|
%tmp5 = getelementptr inbounds i8, i8* %tmp, i32 1
|
|
br i1 undef, label %bb3, label %bb7
|
|
|
|
bb7: ; preds = %bb13, %bb3
|
|
%tmp8 = phi i8 [ %tmp14, %bb13 ], [ %tmp4, %bb3 ]
|
|
%tmp9 = phi i8* [ %tmp12, %bb13 ], [ %tmp, %bb3 ]
|
|
%tmp10 = icmp ne i8 %tmp8, %arg1
|
|
%tmp12 = getelementptr inbounds i8, i8* %tmp9, i32 1
|
|
br i1 %tmp10, label %bb13, label %bb15
|
|
|
|
bb13: ; preds = %bb7
|
|
%tmp14 = load i8, i8* %tmp12, align 1
|
|
br label %bb7
|
|
|
|
bb15: ; preds = %bb7
|
|
store i8* %tmp9, i8** %arg2, align 4
|
|
ret i8* %tmp
|
|
}
|