aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/PowerPC
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2010-04-02 08:54:30 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2010-04-02 08:54:30 +0000
commit104bd8179fb5f6551c65c94ebcd0a4918b060189 (patch)
treecf5763d092b81cecc168fa28032247ee495d06e2 /test/CodeGen/PowerPC
parent2f12f10af369d468b14617276446166383d692ed (diff)
Notes
Diffstat (limited to 'test/CodeGen/PowerPC')
-rw-r--r--test/CodeGen/PowerPC/2010-04-01-MachineCSEBug.ll70
-rw-r--r--test/CodeGen/PowerPC/eqv-andc-orc-nor.ll24
-rw-r--r--test/CodeGen/PowerPC/tango.net.ftp.FtpClient.ll4
3 files changed, 85 insertions, 13 deletions
diff --git a/test/CodeGen/PowerPC/2010-04-01-MachineCSEBug.ll b/test/CodeGen/PowerPC/2010-04-01-MachineCSEBug.ll
new file mode 100644
index 000000000000..8fd05502ba86
--- /dev/null
+++ b/test/CodeGen/PowerPC/2010-04-01-MachineCSEBug.ll
@@ -0,0 +1,70 @@
+; RUN: llc < %s -mtriple=powerpc-apple-darwin10.0
+; rdar://7819990
+
+%0 = type { i32 }
+%1 = type { i64 }
+%struct.Buffer = type { [1024 x i8], i64, i64, i64 }
+%struct.InStream = type { %struct.Buffer, %0, %1, i32*, %struct.InStreamMethods* }
+%struct.InStreamMethods = type { void (%struct.InStream*, i8*, i32)*, void (%struct.InStream*, i64)*, i64 (%struct.InStream*)*, void (%struct.InStream*)* }
+
+define i64 @t(%struct.InStream* %is) nounwind optsize ssp {
+entry:
+ br i1 undef, label %is_read_byte.exit, label %bb.i
+
+bb.i: ; preds = %entry
+ br label %is_read_byte.exit
+
+is_read_byte.exit: ; preds = %bb.i, %entry
+ br i1 undef, label %is_read_byte.exit22, label %bb.i21
+
+bb.i21: ; preds = %is_read_byte.exit
+ unreachable
+
+is_read_byte.exit22: ; preds = %is_read_byte.exit
+ br i1 undef, label %is_read_byte.exit19, label %bb.i18
+
+bb.i18: ; preds = %is_read_byte.exit22
+ br label %is_read_byte.exit19
+
+is_read_byte.exit19: ; preds = %bb.i18, %is_read_byte.exit22
+ br i1 undef, label %is_read_byte.exit16, label %bb.i15
+
+bb.i15: ; preds = %is_read_byte.exit19
+ unreachable
+
+is_read_byte.exit16: ; preds = %is_read_byte.exit19
+ %0 = shl i64 undef, 32 ; <i64> [#uses=1]
+ br i1 undef, label %is_read_byte.exit13, label %bb.i12
+
+bb.i12: ; preds = %is_read_byte.exit16
+ unreachable
+
+is_read_byte.exit13: ; preds = %is_read_byte.exit16
+ %1 = shl i64 undef, 24 ; <i64> [#uses=1]
+ br i1 undef, label %is_read_byte.exit10, label %bb.i9
+
+bb.i9: ; preds = %is_read_byte.exit13
+ unreachable
+
+is_read_byte.exit10: ; preds = %is_read_byte.exit13
+ %2 = shl i64 undef, 16 ; <i64> [#uses=1]
+ br i1 undef, label %is_read_byte.exit7, label %bb.i6
+
+bb.i6: ; preds = %is_read_byte.exit10
+ br label %is_read_byte.exit7
+
+is_read_byte.exit7: ; preds = %bb.i6, %is_read_byte.exit10
+ %3 = shl i64 undef, 8 ; <i64> [#uses=1]
+ br i1 undef, label %is_read_byte.exit4, label %bb.i3
+
+bb.i3: ; preds = %is_read_byte.exit7
+ unreachable
+
+is_read_byte.exit4: ; preds = %is_read_byte.exit7
+ %4 = or i64 0, %0 ; <i64> [#uses=1]
+ %5 = or i64 %4, %1 ; <i64> [#uses=1]
+ %6 = or i64 %5, %2 ; <i64> [#uses=1]
+ %7 = or i64 %6, %3 ; <i64> [#uses=1]
+ %8 = or i64 %7, 0 ; <i64> [#uses=1]
+ ret i64 %8
+}
diff --git a/test/CodeGen/PowerPC/eqv-andc-orc-nor.ll b/test/CodeGen/PowerPC/eqv-andc-orc-nor.ll
index 558fd1b3199b..f99089b3bb02 100644
--- a/test/CodeGen/PowerPC/eqv-andc-orc-nor.ll
+++ b/test/CodeGen/PowerPC/eqv-andc-orc-nor.ll
@@ -9,66 +9,66 @@
; RUN: llc < %s -march=ppc32 | \
; RUN: grep nand | count 1
-define i32 @EQV1(i32 %X, i32 %Y) {
+define i32 @EQV1(i32 %X, i32 %Y) nounwind {
%A = xor i32 %X, %Y ; <i32> [#uses=1]
%B = xor i32 %A, -1 ; <i32> [#uses=1]
ret i32 %B
}
-define i32 @EQV2(i32 %X, i32 %Y) {
+define i32 @EQV2(i32 %X, i32 %Y) nounwind {
%A = xor i32 %X, -1 ; <i32> [#uses=1]
%B = xor i32 %A, %Y ; <i32> [#uses=1]
ret i32 %B
}
-define i32 @EQV3(i32 %X, i32 %Y) {
+define i32 @EQV3(i32 %X, i32 %Y) nounwind {
%A = xor i32 %X, -1 ; <i32> [#uses=1]
%B = xor i32 %Y, %A ; <i32> [#uses=1]
ret i32 %B
}
-define i32 @ANDC1(i32 %X, i32 %Y) {
+define i32 @ANDC1(i32 %X, i32 %Y) nounwind {
%A = xor i32 %Y, -1 ; <i32> [#uses=1]
%B = and i32 %X, %A ; <i32> [#uses=1]
ret i32 %B
}
-define i32 @ANDC2(i32 %X, i32 %Y) {
+define i32 @ANDC2(i32 %X, i32 %Y) nounwind {
%A = xor i32 %X, -1 ; <i32> [#uses=1]
%B = and i32 %A, %Y ; <i32> [#uses=1]
ret i32 %B
}
-define i32 @ORC1(i32 %X, i32 %Y) {
+define i32 @ORC1(i32 %X, i32 %Y) nounwind {
%A = xor i32 %Y, -1 ; <i32> [#uses=1]
%B = or i32 %X, %A ; <i32> [#uses=1]
ret i32 %B
}
-define i32 @ORC2(i32 %X, i32 %Y) {
+define i32 @ORC2(i32 %X, i32 %Y) nounwind {
%A = xor i32 %X, -1 ; <i32> [#uses=1]
%B = or i32 %A, %Y ; <i32> [#uses=1]
ret i32 %B
}
-define i32 @NOR1(i32 %X) {
+define i32 @NOR1(i32 %X) nounwind {
%Y = xor i32 %X, -1 ; <i32> [#uses=1]
ret i32 %Y
}
-define i32 @NOR2(i32 %X, i32 %Y) {
+define i32 @NOR2(i32 %X, i32 %Y) nounwind {
%Z = or i32 %X, %Y ; <i32> [#uses=1]
%R = xor i32 %Z, -1 ; <i32> [#uses=1]
ret i32 %R
}
-define i32 @NAND1(i32 %X, i32 %Y) {
+define i32 @NAND1(i32 %X, i32 %Y) nounwind {
%Z = and i32 %X, %Y ; <i32> [#uses=1]
%W = xor i32 %Z, -1 ; <i32> [#uses=1]
ret i32 %W
}
-define void @VNOR(<4 x float>* %P, <4 x float>* %Q) {
+define void @VNOR(<4 x float>* %P, <4 x float>* %Q) nounwind {
%tmp = load <4 x float>* %P ; <<4 x float>> [#uses=1]
%tmp.upgrd.1 = bitcast <4 x float> %tmp to <4 x i32> ; <<4 x i32>> [#uses=1]
%tmp2 = load <4 x float>* %Q ; <<4 x float>> [#uses=1]
@@ -80,7 +80,7 @@ define void @VNOR(<4 x float>* %P, <4 x float>* %Q) {
ret void
}
-define void @VANDC(<4 x float>* %P, <4 x float>* %Q) {
+define void @VANDC(<4 x float>* %P, <4 x float>* %Q) nounwind {
%tmp = load <4 x float>* %P ; <<4 x float>> [#uses=1]
%tmp.upgrd.4 = bitcast <4 x float> %tmp to <4 x i32> ; <<4 x i32>> [#uses=1]
%tmp2 = load <4 x float>* %Q ; <<4 x float>> [#uses=1]
diff --git a/test/CodeGen/PowerPC/tango.net.ftp.FtpClient.ll b/test/CodeGen/PowerPC/tango.net.ftp.FtpClient.ll
index 8a1288afa40c..6f103462664f 100644
--- a/test/CodeGen/PowerPC/tango.net.ftp.FtpClient.ll
+++ b/test/CodeGen/PowerPC/tango.net.ftp.FtpClient.ll
@@ -1,4 +1,6 @@
-; RUN: llc < %s
+; RN: llc < %s
+; RUN: false
+; XFAIL: *
; PR4534
; ModuleID = 'tango.net.ftp.FtpClient.bc'