mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-30 05:29:47 +00:00
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
31 lines
1.0 KiB
LLVM
31 lines
1.0 KiB
LLVM
; RUN: llc -march=hexagon -mcpu=hexagonv4 < %s | FileCheck %s
|
|
; Check that we are able to predicate instructions.
|
|
|
|
; CHECK: if{{ *}}({{!*}}p{{[0-3]}}{{[.new]*}}){{ *}}r{{[0-9]+}}{{ *}}={{ *}}{{and|aslh}}
|
|
; CHECK: if{{ *}}({{!*}}p{{[0-3]}}{{[.new]*}}){{ *}}r{{[0-9]+}}{{ *}}={{ *}}{{and|aslh}}
|
|
@a = external global i32
|
|
@d = external global i32
|
|
|
|
; Function Attrs: nounwind
|
|
define i32 @test1(i8 zeroext %la, i8 zeroext %lb) {
|
|
entry:
|
|
%cmp = icmp eq i8 %la, %lb
|
|
br i1 %cmp, label %if.then, label %if.else
|
|
|
|
if.then: ; preds = %entry
|
|
%conv1 = zext i8 %la to i32
|
|
%shl = shl nuw nsw i32 %conv1, 16
|
|
br label %if.end
|
|
|
|
if.else: ; preds = %entry
|
|
%and8 = and i8 %lb, %la
|
|
%and = zext i8 %and8 to i32
|
|
br label %if.end
|
|
|
|
if.end: ; preds = %if.else, %if.then
|
|
%storemerge = phi i32 [ %and, %if.else ], [ %shl, %if.then ]
|
|
store i32 %storemerge, i32* @a, align 4
|
|
%0 = load i32, i32* @d, align 4
|
|
ret i32 %0
|
|
}
|