From 511c8f6a2498afe811316fe3c11360a1a3ba881a Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Thu, 8 Mar 2007 19:27:32 +0000 Subject: [PATCH] Fix test case. llvm-svn: 35029 --- test/CodeGen/ARM/bx_fold.ll | 37 +++++++++++++++++++-------------- test/CodeGen/ARM/insn-sched1.ll | 2 +- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/test/CodeGen/ARM/bx_fold.ll b/test/CodeGen/ARM/bx_fold.ll index c088903d370..437b3189141 100644 --- a/test/CodeGen/ARM/bx_fold.ll +++ b/test/CodeGen/ARM/bx_fold.ll @@ -1,25 +1,30 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | not grep bx +; RUN: llvm-as < %s | llc -march=arm +; RUN: llvm-as < %s | llc -march=arm | not grep bx -void %test(int %Ptr, ubyte* %L) { +define void @test(i32 %Ptr, i8* %L) { entry: br label %bb1 -bb: - %tmp7 = getelementptr ubyte* %L, uint %indvar - store ubyte 0, ubyte* %tmp7 - %indvar.next = add uint %indvar, 1 +bb: ; preds = %bb1 + %gep.upgrd.1 = zext i32 %indvar to i64 ; [#uses=1] + %tmp7 = getelementptr i8* %L, i64 %gep.upgrd.1 ; [#uses=1] + store i8 0, i8* %tmp7 + %indvar.next = add i32 %indvar, 1 ; [#uses=1] br label %bb1 -bb1: - %indvar = phi uint [ 0, %entry ], [ %indvar.next, %bb ] - %i.0 = cast uint %indvar to int - %Ptr_addr.0 = sub int %Ptr, %i.0 - %tmp12 = seteq int %i.0, %Ptr - %tmp12.not = xor bool %tmp12, true - %bothcond = and bool %tmp12.not, false - br bool %bothcond, label %bb, label %bb18 +bb1: ; preds = %bb, %entry + %indvar = phi i32 [ 0, %entry ], [ %indvar.next, %bb ] ; [#uses=3] + %i.0 = bitcast i32 %indvar to i32 ; [#uses=2] + %tmp = tail call i32 (...)* @bar( ) ; [#uses=1] + %tmp2 = add i32 %i.0, %tmp ; [#uses=1] + %Ptr_addr.0 = sub i32 %Ptr, %tmp2 ; [#uses=0] + %tmp12 = icmp eq i32 %i.0, %Ptr ; [#uses=1] + %tmp12.not = xor i1 %tmp12, true ; [#uses=1] + %bothcond = and i1 %tmp12.not, false ; [#uses=1] + br i1 %bothcond, label %bb, label %bb18 -bb18: +bb18: ; preds = %bb1 ret void } + +declare i32 @bar(...) diff --git a/test/CodeGen/ARM/insn-sched1.ll b/test/CodeGen/ARM/insn-sched1.ll index 5c9a28a1d71..7145351da07 100644 --- a/test/CodeGen/ARM/insn-sched1.ll +++ b/test/CodeGen/ARM/insn-sched1.ll @@ -1,5 +1,5 @@ ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+v6 && -; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=arm-apple-darwin -mattr=+v6 | grep mov | wc -l | grep 2 +; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=arm-apple-darwin -mattr=+v6 | grep mov | wc -l | grep 3 int %test(int %x) { %tmp = cast int %x to short