From 69140ec4fa97df8d7ff7686d6e0e68a9fefd8f4d Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Sun, 25 Oct 2009 08:01:41 +0000 Subject: Add a couple of ARM cross-rc coalescing tests. llvm-svn: 85051 --- llvm/test/CodeGen/Thumb2/cross-rc-coalescing-1.ll | 52 +++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 llvm/test/CodeGen/Thumb2/cross-rc-coalescing-1.ll (limited to 'llvm/test/CodeGen/Thumb2/cross-rc-coalescing-1.ll') diff --git a/llvm/test/CodeGen/Thumb2/cross-rc-coalescing-1.ll b/llvm/test/CodeGen/Thumb2/cross-rc-coalescing-1.ll new file mode 100644 index 00000000000..572f1e8975a --- /dev/null +++ b/llvm/test/CodeGen/Thumb2/cross-rc-coalescing-1.ll @@ -0,0 +1,52 @@ +; RUN: llc < %s -mtriple=thumbv7-apple-darwin9 -mcpu=cortex-a8 + +%struct.FILE = type { i8*, i32, i32, i16, i16, %struct.__sbuf, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %struct.__sbuf, %struct.__sFILEX*, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 } +%struct.__sFILEX = type opaque +%struct.__sbuf = type { i8*, i32 } + +declare arm_apcscc i32 @fgetc(%struct.FILE* nocapture) nounwind + +define arm_apcscc i32 @main(i32 %argc, i8** nocapture %argv) nounwind { +entry: + br i1 undef, label %bb, label %bb1 + +bb: ; preds = %entry + unreachable + +bb1: ; preds = %entry + br i1 undef, label %bb.i1, label %bb1.i2 + +bb.i1: ; preds = %bb1 + unreachable + +bb1.i2: ; preds = %bb1 + %0 = call arm_apcscc i32 @fgetc(%struct.FILE* undef) nounwind ; [#uses=0] + br i1 undef, label %bb2.i3, label %bb3.i4 + +bb2.i3: ; preds = %bb1.i2 + br i1 undef, label %bb4.i, label %bb3.i4 + +bb3.i4: ; preds = %bb2.i3, %bb1.i2 + unreachable + +bb4.i: ; preds = %bb2.i3 + br i1 undef, label %bb5.i, label %get_image.exit + +bb5.i: ; preds = %bb4.i + unreachable + +get_image.exit: ; preds = %bb4.i + br i1 undef, label %bb28, label %bb27 + +bb27: ; preds = %get_image.exit + br label %bb.i + +bb.i: ; preds = %bb.i, %bb27 + %1 = fptrunc double undef to float ; [#uses=1] + %2 = fptoui float %1 to i8 ; [#uses=1] + store i8 %2, i8* undef, align 1 + br label %bb.i + +bb28: ; preds = %get_image.exit + unreachable +} -- cgit v1.2.3