summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/coalescer-commute1.ll
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-02-13 03:23:53 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-02-13 03:23:53 +0000
commitea8530d82cfbc3dde29892ab3432054208a4a0d2 (patch)
treebf4e80905d64075b56fabce45c139b9b6877187d /llvm/test/CodeGen/X86/coalescer-commute1.ll
parent1446726f3eb2e247a539098159bf6cd7750a0cb5 (diff)
downloadbcm5719-llvm-ea8530d82cfbc3dde29892ab3432054208a4a0d2.tar.gz
bcm5719-llvm-ea8530d82cfbc3dde29892ab3432054208a4a0d2.zip
New tests.
llvm-svn: 47047
Diffstat (limited to 'llvm/test/CodeGen/X86/coalescer-commute1.ll')
-rw-r--r--llvm/test/CodeGen/X86/coalescer-commute1.ll26
1 files changed, 26 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/coalescer-commute1.ll b/llvm/test/CodeGen/X86/coalescer-commute1.ll
new file mode 100644
index 00000000000..6613ac2dbf7
--- /dev/null
+++ b/llvm/test/CodeGen/X86/coalescer-commute1.ll
@@ -0,0 +1,26 @@
+; RUN: llvm-as < %s | llc -mtriple=i686-apple-darwin -mattr=+sse2 -coalescer-commute-instrs | 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* @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* %source, i32 %neuron.0 ; <i32*> [#uses=1]
+ %tmp3 = load i32* %tmp2, align 4 ; <i32> [#uses=1]
+ %tmp34 = sitofp i32 %tmp3 to float ; <float> [#uses=1]
+ %tmp6 = add 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
+ volatile store float %tmp6, float* @G, align 4
+ ret void
+}
OpenPOWER on IntegriCloud