mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
ab043ff680
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
34 lines
760 B
LLVM
34 lines
760 B
LLVM
; RUN: llc -march=hexagon -mcpu=hexagonv4 < %s | FileCheck %s
|
|
; Check that we generate new value jump.
|
|
|
|
@i = global i32 0, align 4
|
|
@j = global i32 10, align 4
|
|
|
|
define i32 @foo(i32 %a) nounwind {
|
|
entry:
|
|
; CHECK: if (cmp.eq(r{{[0-9]+}}.new, #0)) jump{{.}}
|
|
%addr1 = alloca i32, align 4
|
|
%addr2 = alloca i32, align 4
|
|
%0 = load i32, i32* @i, align 4
|
|
store i32 %0, i32* %addr1, align 4
|
|
call void @bar(i32 1, i32 2)
|
|
%1 = load i32, i32* @j, align 4
|
|
%tobool = icmp ne i32 %1, 0
|
|
br i1 %tobool, label %if.then, label %if.else
|
|
|
|
if.then:
|
|
call void @baz(i32 1, i32 2)
|
|
br label %if.end
|
|
|
|
if.else:
|
|
call void @guy(i32 10, i32 20)
|
|
br label %if.end
|
|
|
|
if.end:
|
|
ret i32 0
|
|
}
|
|
|
|
declare void @guy(i32, i32)
|
|
declare void @bar(i32, i32)
|
|
declare void @baz(i32, i32)
|