summaryrefslogtreecommitdiffstats
path: root/test/combinations.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-07-22 05:00:34 +0000
committerChris Lattner <sabre@nondot.org>2001-07-22 05:00:34 +0000
commit90147816f67d4adc90d8562b2d40da04f5152ecb (patch)
tree25cf4d238ae10f589d9a6ba4d82caf9cef748892 /test/combinations.ll
parentaceb9132b7c0f2b22a2e51d523d0bd46f2cb3817 (diff)
downloadexternal_llvm-90147816f67d4adc90d8562b2d40da04f5152ecb.zip
external_llvm-90147816f67d4adc90d8562b2d40da04f5152ecb.tar.gz
external_llvm-90147816f67d4adc90d8562b2d40da04f5152ecb.tar.bz2
New test case
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/combinations.ll')
-rw-r--r--test/combinations.ll39
1 files changed, 39 insertions, 0 deletions
diff --git a/test/combinations.ll b/test/combinations.ll
new file mode 100644
index 0000000..8dfd67b
--- /dev/null
+++ b/test/combinations.ll
@@ -0,0 +1,39 @@
+implementation
+
+;; Emitting: void combinations(unsigned int, unsigned int*)
+void "combinations"(uint %n, uint* %A)
+begin
+bb1: ;;<label>
+ %reg111 = shl uint %n, ubyte 2 ;;<uint>
+ %cast112 = cast uint %reg111 to uint* ;;<uint*>
+ %reg113 = add uint* %A, %cast112 ;;<uint*>
+ store uint 1, uint* %reg113 ;;<void>
+ store uint 1, uint* %A ;;<void>
+ %reg128 = shr uint %n, ubyte 1 ;;<uint>:(unsigned operands)
+ %cond105 = setgt uint 1, %reg128 ;;<bool>:(unsigned operands)
+ br bool %cond105, label %bb3, label %bb2 ;;<void>
+
+bb2: ;;<label>
+ %reg129 = phi uint [ %reg131, %bb2 ], [ 1, %bb1 ] ;;<uint>
+ %reg130 = phi uint [ %reg132, %bb2 ], [ 1, %bb1 ] ;;<uint>
+ %reg117 = sub uint %n, %reg130 ;;<uint>
+ %reg118 = add uint %reg117, 1 ;;<uint>
+ %reg119 = mul uint %reg129, %reg118 ;;<uint>
+ %reg131 = div uint %reg119, %reg130 ;;<uint>:(unsigned operands)
+ %reg120 = shl uint %reg130, ubyte 2 ;;<uint>
+ %cast121 = cast uint %reg120 to uint* ;;<uint*>
+ %reg122 = add uint* %A, %cast121 ;;<uint*>
+ %reg124 = shl uint %reg117, ubyte 2 ;;<uint>
+ %cast125 = cast uint %reg124 to uint* ;;<uint*>
+ %reg126 = add uint* %A, %cast125 ;;<uint*>
+ store uint %reg131, uint* %reg126 ;;<void>
+ store uint %reg131, uint* %reg122 ;;<void>
+ %reg132 = add uint %reg130, 1 ;;<uint>
+ %cond47 = setle uint %reg132, %reg128 ;;<bool>:(unsigned operands)
+ br bool %cond47, label %bb2, label %bb3 ;;<void>
+
+bb3: ;;<label>
+ ret void ;;<void>
+end
+
+declare void "_Z12combinationsjPj" (uint, uint*) ;; Prototype for: void combinations(unsigned int, unsigned int*)