From 9cd87dbccbbda47e42d5ca27effdf62c86bee9e5 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 7 Jan 2005 22:05:31 +0000 Subject: [PATCH] Cleanup a bunch of tests. In particular do not allow target directives in the .ll file or it forces the V9 backend. This is the CodeGen/Generic dir, so there is no use in doing that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19355 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/Generic/2003-05-27-phifcmpd.ll | 57 +------------------ .../Generic/2003-05-27-useboolinotherbb.ll | 54 +----------------- .../Generic/2003-05-27-usefsubasbool.ll | 54 +----------------- test/CodeGen/Generic/2003-05-28-ManyArgs.ll | 2 - .../Generic/2003-05-30-BadPreselectPhi.ll | 26 --------- test/CodeGen/Generic/2003-07-06-BadIntCmp.ll | 31 +--------- .../Generic/2003-07-07-BadLongConst.ll | 2 - .../Generic/2003-07-08-BadCastToBool.ll | 15 ----- test/CodeGen/Generic/badarg6.ll | 5 -- 9 files changed, 5 insertions(+), 241 deletions(-) diff --git a/test/CodeGen/Generic/2003-05-27-phifcmpd.ll b/test/CodeGen/Generic/2003-05-27-phifcmpd.ll index 632b984ee98..37b5584d896 100644 --- a/test/CodeGen/Generic/2003-05-27-phifcmpd.ll +++ b/test/CodeGen/Generic/2003-05-27-phifcmpd.ll @@ -1,61 +1,6 @@ ; RUN: llvm-as -f %s -o - | llc -;; Date: May 28, 2003. -;; From: test/Programs/MultiSource/McCat-05-eks/QRfact.c -;; Function: Matrix QRiterate(Matrix A, Matrix U) -;; -;; Error: llc produces an invalid register for the -;; phi argument %tmp.213 produced by fcmpd: -;; -;; LLC Output: -;; -;; !****** Outputing Function: QRiterate_1 ****** -;; -;; .section ".text" -;; .align 4 -;; .global QRiterate_1 -;; .type QRiterate_1, 2 -;; QRiterate_1: -;; .L_QRiterate_1_LL_0: -;; save %o6, -192, %o6 -;; brgz %i0, .L_QRiterate_1_LL_1 -;; add %g0, %g0, %o0 -;; ba .L_QRiterate_1_LL_2 -;; nop -;; -;; .L_QRiterate_1_LL_1: -;; sethi %lm(LLVMGlobal__2), %o1 -;; sethi %hh(LLVMGlobal__2), %o0 -;; or %o0, %hm(LLVMGlobal__2), %o0 -;; sllx %o0, 32, %o0 -;; or %o1, %o0, %o1 -;; or %o1, %lo(LLVMGlobal__2), %o1 -;; ldd [%o1+0], %f32 -;; fcmpd %fcc0, %f2, %f32 -;; ba .L_QRiterate_1_LL_2 -;; add , %g0, %o0 -;; -;; .L_QRiterate_1_LL_2: -;; brnz %o0, .L_QRiterate_1_LL_1 -;; nop -;; ba .L_QRiterate_1_LL_3 -;; nop -;; -;; .L_QRiterate_1_LL_3: -;; jmpl %i7+8, %g0 -;; restore %g0, 0, %g0 -;; -;; .EndOf_QRiterate_1: -;; .size QRiterate_1, .EndOf_QRiterate_1-QRiterate_1 -;; - - -target endian = big -target pointersize = 64 - -implementation ; Functions: - -internal void %QRiterate(int %p.1, double %tmp.212) { +void %QRiterate(int %p.1, double %tmp.212) { entry: ; No predecessors! %tmp.184 = setgt int %p.1, 0 ; [#uses=1] br bool %tmp.184, label %shortcirc_next.1, label %shortcirc_done.1 diff --git a/test/CodeGen/Generic/2003-05-27-useboolinotherbb.ll b/test/CodeGen/Generic/2003-05-27-useboolinotherbb.ll index 3864d530622..73b18edc6d7 100644 --- a/test/CodeGen/Generic/2003-05-27-useboolinotherbb.ll +++ b/test/CodeGen/Generic/2003-05-27-useboolinotherbb.ll @@ -1,59 +1,7 @@ ; RUN: llvm-as -f %s -o - | llc -;; Date: May 27, 2003. -;; From: Variant of 2003-05-27-usefsubasbool.ll -;; -;; Error: llc fails to save a boolean value in a register (and later uses an -;; invalid register in a BRNZ) for a boolean value -;; used only by branches but in a different basic block. -;; -;; Cause: In SparcInstrSelection.cpp, for SetCC, when a result of setCC -;; is used only for branches, it is not saved into an int. register. -;; But if the boolean is used in a branch in a different basic block, -;; that branch uses a BRNZ inst. instead of a branch-on-CC. -;; -;; LLC Output before fix: -;; !****** Outputing Function: QRiterate_1 ****** -;; -;; .section ".text" -;; .align 4 -;; .global QRiterate_1 -;; .type QRiterate_1, 2 -;; QRiterate_1: -;; .L_QRiterate_1_LL_0: -;; save %o6, -192, %o6 -;; sethi %lm(LLVMGlobal__2), %o2 -;; sethi %hh(LLVMGlobal__2), %o1 -;; or %o1, %hm(LLVMGlobal__2), %o1 -;; sllx %o1, 32, %o1 -;; or %o2, %o1, %o2 -;; or %o2, %lo(LLVMGlobal__2), %o2 -;; ldd [%o2+0], %f32 -;; fcmpd %fcc0, %f0, %f32 -;; ba .L_QRiterate_1_LL_1 -;; nop -;; -;; .L_QRiterate_1_LL_1: -;; brnz , .L_QRiterate_1_LL_1 -;; nop -;; ba .L_QRiterate_1_LL_2 -;; nop -;; -;; .L_QRiterate_1_LL_2: -;; jmpl %i7+8, %g0 -;; restore %g0, 0, %g0 -;; -;; .EndOf_QRiterate_1: -;; .size QRiterate_1, .EndOf_QRiterate_1-QRiterate_1 -;; -target endian = big -target pointersize = 64 - -implementation ; Functions: - -internal void %QRiterate(double %tmp.212) { -entry: ; No predecessors! +void %QRiterate(double %tmp.212) { %tmp.213 = setne double %tmp.212, 0.000000e+00 br label %shortcirc_next.1 diff --git a/test/CodeGen/Generic/2003-05-27-usefsubasbool.ll b/test/CodeGen/Generic/2003-05-27-usefsubasbool.ll index 5b756b56ee8..52df931cb32 100644 --- a/test/CodeGen/Generic/2003-05-27-usefsubasbool.ll +++ b/test/CodeGen/Generic/2003-05-27-usefsubasbool.ll @@ -1,58 +1,6 @@ ; RUN: llvm-as -f %s -o - | llc -;; Date: May 27, 2003. -;; From: test/Programs/MultiSource/McCat-05-eks/QRfact.c -;; Function: Matrix QRiterate(Matrix A, Matrix U) -;; -;; Error: llc produces an invalid register for the -;; a boolean value computed using setne with a double. -;; -;; Cause: In SparcInstrSelection.cpp, for SetCC, when a result of setne -;; is used for a branch, it can generate a "branch-on-integer-register" -;; for integer registers. In that case, it never saves the value of -;; the boolean result. It was attempting to do the same thing for an -;; FP compare! -;; -;; LLC Output: -;; !****** Outputing Function: QRiterate_1 ****** -;; -;; .section ".text" -;; .align 4 -;; .global QRiterate_1 -;; .type QRiterate_1, 2 -;; QRiterate_1: -;; .L_QRiterate_1_LL_0: -;; save %o6, -192, %o6 -;; sethi %hh(LLVMGlobal__2), %o1 -;; sethi %lm(LLVMGlobal__2), %o0 -;; or %o1, %hm(LLVMGlobal__2), %o1 -;; sllx %o1, 32, %o1 -;; or %o0, %o1, %o0 -;; or %o0, %lo(LLVMGlobal__2), %o0 -;; ldd [%o0+0], %f32 -;; ba .L_QRiterate_1_LL_1 -;; fcmpd %fcc0, %f0, %f32 -;; -;; .L_QRiterate_1_LL_1: -;; brnz , .L_QRiterate_1_LL_1 -;; nop -;; ba .L_QRiterate_1_LL_2 -;; nop -;; -;; .L_QRiterate_1_LL_2: -;; jmpl %i7+8, %g0 -;; restore %g0, 0, %g0 -;; -;; .EndOf_QRiterate_1: -;; .size QRiterate_1, .EndOf_QRiterate_1-QRiterate_1 -;; - -target endian = big -target pointersize = 64 - -implementation ; Functions: - -internal void %QRiterate(double %tmp.212) { +void %QRiterate(double %tmp.212) { entry: ; No predecessors! br label %shortcirc_next.1 diff --git a/test/CodeGen/Generic/2003-05-28-ManyArgs.ll b/test/CodeGen/Generic/2003-05-28-ManyArgs.ll index 4fcc10525f1..1a89b2b69c4 100644 --- a/test/CodeGen/Generic/2003-05-28-ManyArgs.ll +++ b/test/CodeGen/Generic/2003-05-28-ManyArgs.ll @@ -19,8 +19,6 @@ ;; and/or to stack locations as needed. ;; -target endian = little -target pointersize = 32 %struct..s_annealing_sched = type { uint, float, float, float, float } %struct..s_chan = type { uint, float, float, float, float } %struct..s_det_routing_arch = type { uint, float, float, float, uint, int, short, short, short, float, float } diff --git a/test/CodeGen/Generic/2003-05-30-BadPreselectPhi.ll b/test/CodeGen/Generic/2003-05-30-BadPreselectPhi.ll index 7e6be13fdf2..518e7834b14 100644 --- a/test/CodeGen/Generic/2003-05-30-BadPreselectPhi.ll +++ b/test/CodeGen/Generic/2003-05-30-BadPreselectPhi.ll @@ -8,33 +8,7 @@ ;; the Phi instead of in predecessor blocks. This later ;; causes llc to produces an invalid register ;; for the phi arguments. -;; -;; PreSelection Output: -;; *** LLVM code after pre-selection for function handlerfn: -;; -;; -;; %struct..task* %handlerfn(%struct..packet*) { -;; ;