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
29 lines
1.0 KiB
LLVM
29 lines
1.0 KiB
LLVM
; RUN: llc < %s -mcpu=ppc | FileCheck %s
|
|
|
|
target datalayout = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v128:128:128-n32"
|
|
target triple = "powerpc-unknown-linux-gnu"
|
|
|
|
define ppc_fp128 @foo(ppc_fp128* nocapture %n, ppc_fp128 %d) nounwind readonly {
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body: ; preds = %for.body, %entry
|
|
%i.06 = phi i32 [ 0, %entry ], [ %inc, %for.body ]
|
|
%x.05 = phi ppc_fp128 [ %d, %entry ], [ %conv, %for.body ]
|
|
%arrayidx = getelementptr inbounds ppc_fp128, ppc_fp128* %n, i32 %i.06
|
|
%0 = load ppc_fp128, ppc_fp128* %arrayidx, align 8
|
|
%conv = tail call ppc_fp128 @copysignl(ppc_fp128 %x.05, ppc_fp128 %d) nounwind readonly
|
|
%inc = add nsw i32 %i.06, 1
|
|
%exitcond = icmp eq i32 %inc, 2048
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end: ; preds = %for.body
|
|
ret ppc_fp128 %conv
|
|
}
|
|
|
|
declare ppc_fp128 @copysignl(ppc_fp128, ppc_fp128) #0
|
|
|
|
; CHECK: @foo
|
|
; CHECK-NOT: mtctr
|
|
|