mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +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
27 lines
1018 B
LLVM
27 lines
1018 B
LLVM
; RUN: llc < %s -mtriple=i686-apple-darwin -mcpu=corei7-avx -mattr=+sse2 | not grep movaps
|
|
; PR1877
|
|
|
|
@NNTOT = weak global i32 0 ; <i32*> [#uses=1]
|
|
@G = weak global float 0.000000e+00 ; <float*> [#uses=1]
|
|
|
|
define void @runcont(i32* %source) nounwind {
|
|
entry:
|
|
%tmp10 = load i32, i32* @NNTOT, align 4 ; <i32> [#uses=1]
|
|
br label %bb
|
|
|
|
bb: ; preds = %bb, %entry
|
|
%neuron.0 = phi i32 [ 0, %entry ], [ %indvar.next, %bb ] ; <i32> [#uses=2]
|
|
%thesum.0 = phi float [ 0.000000e+00, %entry ], [ %tmp6, %bb ] ; <float> [#uses=1]
|
|
%tmp2 = getelementptr i32, i32* %source, i32 %neuron.0 ; <i32*> [#uses=1]
|
|
%tmp3 = load i32, i32* %tmp2, align 4 ; <i32> [#uses=1]
|
|
%tmp34 = sitofp i32 %tmp3 to float ; <float> [#uses=1]
|
|
%tmp6 = fadd float %tmp34, %thesum.0 ; <float> [#uses=2]
|
|
%indvar.next = add i32 %neuron.0, 1 ; <i32> [#uses=2]
|
|
%exitcond = icmp eq i32 %indvar.next, %tmp10 ; <i1> [#uses=1]
|
|
br i1 %exitcond, label %bb13, label %bb
|
|
|
|
bb13: ; preds = %bb
|
|
store volatile float %tmp6, float* @G, align 4
|
|
ret void
|
|
}
|