summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/PowerPC
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2012-05-03 16:50:55 +0000
committerdim <dim@FreeBSD.org>2012-05-03 16:50:55 +0000
commit2c5e9d71aba3b1a85f07c08d2c09d40b8547264b (patch)
tree8575c732129e272992ac5d7b4c2519238fff4735 /test/CodeGen/PowerPC
parent1fc08f5e9ef733ef1ce6f363fecedc2260e78974 (diff)
downloadFreeBSD-src-2c5e9d71aba3b1a85f07c08d2c09d40b8547264b.zip
FreeBSD-src-2c5e9d71aba3b1a85f07c08d2c09d40b8547264b.tar.gz
Vendor import of llvm release_31 branch r155985:
http://llvm.org/svn/llvm-project/llvm/branches/release_31@155985
Diffstat (limited to 'test/CodeGen/PowerPC')
-rw-r--r--test/CodeGen/PowerPC/ppc-vaarg-agg.ll46
1 files changed, 46 insertions, 0 deletions
diff --git a/test/CodeGen/PowerPC/ppc-vaarg-agg.ll b/test/CodeGen/PowerPC/ppc-vaarg-agg.ll
new file mode 100644
index 0000000..d5ea044
--- /dev/null
+++ b/test/CodeGen/PowerPC/ppc-vaarg-agg.ll
@@ -0,0 +1,46 @@
+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-montavista-linux-gnuspe"
+; RUN: llc < %s -march=ppc32 | FileCheck %s
+
+%struct.__va_list_tag.0.9.18.23.32.41.48.55.62.67.72.77.82.87.90.93.96.101.105 = type { i8, i8, i16, i8*, i8* }
+
+define fastcc void @test1(%struct.__va_list_tag.0.9.18.23.32.41.48.55.62.67.72.77.82.87.90.93.96.101.105* %args) {
+entry:
+ br i1 undef, label %repeat, label %maxlen_reached
+
+repeat: ; preds = %entry
+ switch i32 undef, label %sw.bb323 [
+ i32 77, label %sw.bb72
+ i32 111, label %sw.bb309
+ i32 80, label %sw.bb313
+ i32 117, label %sw.bb326
+ i32 88, label %sw.bb321
+ ]
+
+sw.bb72: ; preds = %repeat
+ unreachable
+
+sw.bb309: ; preds = %repeat
+ unreachable
+
+sw.bb313: ; preds = %repeat
+ unreachable
+
+sw.bb321: ; preds = %repeat
+ unreachable
+
+sw.bb323: ; preds = %repeat
+ %0 = va_arg %struct.__va_list_tag.0.9.18.23.32.41.48.55.62.67.72.77.82.87.90.93.96.101.105* %args, i32
+ unreachable
+
+sw.bb326: ; preds = %repeat
+ unreachable
+
+maxlen_reached: ; preds = %entry
+ ret void
+}
+
+; If the SD nodes are not cleaup up correctly, then this can fail to compile
+; with an error like: Cannot select: ch = setlt [ID=6]
+; CHECK: @test1
+
OpenPOWER on IntegriCloud