Cleanup a bunch of tests. In particular do not allow target directives in
authorChris Lattner <sabre@nondot.org>
Fri, 7 Jan 2005 22:05:31 +0000 (22:05 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 7 Jan 2005 22:05:31 +0000 (22:05 +0000)
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
test/CodeGen/Generic/2003-05-27-useboolinotherbb.ll
test/CodeGen/Generic/2003-05-27-usefsubasbool.ll
test/CodeGen/Generic/2003-05-28-ManyArgs.ll
test/CodeGen/Generic/2003-05-30-BadPreselectPhi.ll
test/CodeGen/Generic/2003-07-06-BadIntCmp.ll
test/CodeGen/Generic/2003-07-07-BadLongConst.ll
test/CodeGen/Generic/2003-07-08-BadCastToBool.ll
test/CodeGen/Generic/badarg6.ll

index 632b984ee98c240ea2de7be2b7789bf8ddbe3db8..37b5584d896d468c9b719d14e2f82de299e88e5a 100644 (file)
@@ -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 <NULL VALUE> 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     <NULL VALUE>, %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            ; <bool> [#uses=1]
         br bool %tmp.184, label %shortcirc_next.1, label %shortcirc_done.1
index 3864d53062229d157be4f213b8474a09021c13b0..73b18edc6d767cd20dd4a081b64a534ad8d34d39 100644 (file)
@@ -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 <NULL VALUE> 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    <NULL_VALUE>, .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
 
index 5b756b56ee83438bfbb855d42869ceeeaa41cdd6..52df931cb32eb311c123ad094084c1c153f330c9 100644 (file)
@@ -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 <NULL VALUE> 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    <NULL VALUE>, .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
 
index 4fcc10525f13b1d193fc28e762d813d7d68ae66f..1a89b2b69c4786aeb666f579d35524f2325c728d 100644 (file)
@@ -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 }
index 7e6be13fdf2e05d84fc206aad03e04ffd696ff7e..518e7834b14128d0fe671842ca5ad928a5cfcaff 100644 (file)
@@ -8,33 +8,7 @@
 ;;           the Phi instead of in predecessor blocks.  This later
 ;;           causes llc to produces an invalid register <NULL VALUE>
 ;;           for the phi arguments.
-;;
-;; PreSelection Output:
-;; *** LLVM code after pre-selection for function handlerfn:
-;; 
-;; 
-;; %struct..task* %handlerfn(%struct..packet*) {
-;; ; <label>:0             ; No predecessors!
-;;         setne %struct..packet* %0, null         ; <bool>:0 [#uses=1]
-;;         br bool %0, label %1, label %2
-;; 
-;; ; <label>:1             ; preds = %0
-;;         br label %2
-;; 
-;; ; <label>:2             ; preds = %0, %1
-;;         %addrOfGlobal = getelementptr int* %v2, long 0          ; <int*> [#uses=1]
-;;         %addrOfGlobal1 = getelementptr int* %v1, long 0         ; <int*> [#uses=1]
-;;         phi int* [ %addrOfGlobal, %1 ], [ %addrOfGlobal1, %0 ]          ; <int*>:0 [#uses=1]
-;;         cast int* %0 to %struct..packet*                ; <%struct..packet*>:1 [#uses=1]
-;;         call void %append( %struct..packet* %0, %struct..packet* %1 )
-;;         ret %struct..task* null
-;; }
-;; llc: ../../../include/llvm/CodeGen/MachineInstr.h:294: int MachineOperand::getAllocatedRegNum() const: Assertion `hasAllocatedReg()' failed.
-;; 
-
 
-target endian = little
-target pointersize = 32
        %struct..packet = type { %struct..packet*, int, int, int, [4 x sbyte] }
        %struct..task = type { %struct..task*, int, int, %struct..packet*, int, %struct..task* (%struct..packet*)*, int, int }
 %v1 = external global int
index 197ff2fdef6ec2054d883a1e9b1971f1ea37f631..59f90d5d0a33d4de5277fa06d7883a2208fec674 100644 (file)
 ;; Error: llc generates a branch-on-xcc instead of branch-on-icc, which
 ;;        is wrong because the value being compared (int euclid = x*x + y*y)
 ;;       overflows, so that the 64-bit and 32-bit compares are not equal.
-;; 
-;; LLC Output:
-;; 
-;; !****** Outputing Function: CheckOutside_34 ******
-;;         .align  4
-;;         .global CheckOutside_34
-;;         .type   CheckOutside_34, 2
-;; CheckOutside_34:
-;; .L_CheckOutside_34_LL_0:
-;;         save    %o6, -192, %o6
-;;         mulx    %i1, %i1, %i1
-;;         mulx    %i0, %i0, %i0
-;;         sethi   %lm(4194304), %o1
-;;         or      %g0, 1, %o0
-;;         add     %i0, %i1, %i0
-;;         sra     %o1, 0, %o1
-;;         subcc   %i0, %o1, %g0
-;;         bg      %xcc, .L_CheckOutside_34_LL_3
-;;         nop     
-;;         ba      .L_CheckOutside_34_LL_1
-;;         nop     
-;; ...
-;; 
-;;
-
 
-target endian = little
-target pointersize = 32
-%.str_1 = internal constant [6 x sbyte] c"true\0A\00"          ; <[6 x sbyte]*> [#uses=1]
-%.str_2 = internal constant [7 x sbyte] c"false\0A\00"         ; <[7 x sbyte]*> [#uses=1]
+%.str_1 = internal constant [6 x sbyte] c"true\0A\00"
+%.str_2 = internal constant [7 x sbyte] c"false\0A\00"
 
 implementation   ; Functions:
 
index 1b49b776bc05f978c255cb3ed0232be11c12e596..13708ef673e90b9c8fbd27fc00cf987aaa3d728e 100644 (file)
@@ -1,7 +1,5 @@
 ; RUN: llvm-as -f %s -o - | llc
 
-target endian = big
-target pointersize = 64
 
 %.str_1 = internal constant [42 x sbyte] c"   ui = %u (0x%x)\09\09UL-ui = %lld (0x%llx)\0A\00"
 
index b51105a0b192bfb7783791114bf39a3f5ee7d053..52932c23b9f000f99058645cd1a4e3ec13eb3986 100644 (file)
 ;;        (2) (A or NOT(B)) was being folded into A orn B, which is ok
 ;;            for bitwise operations but not booleans!  For booleans,
 ;;            the result has to be compared with 0.
-;; 
-;; LLC Output for the basic block (LLVM assembly is shown below):
-;; 
-;; .L_adj_7_LL_4:
-;;         sethi   0, %i0
-;;         subcc   %i1, 2, %g0
-;;         move    %icc, 1, %i0
-;;         orn     %i0, %i1, %i0
-;;         ba      .L_adj_7_LL_5
-;;         nop     
-;; 
-
-
-target endian = big
-target pointersize = 64
 
 %.str_1 = internal constant [30 x sbyte] c"d = %d, ct = %d, d ^ ct = %d\0A\00"
 
index 9b564f8684b6379eaea7040605c1ebf4ee4ab890..79507c2a3161a1711ba565da61da1cb1080ac4b4 100644 (file)
@@ -2,11 +2,6 @@
 
 ; On this code, llc did not pass the sixth argument (%reg321) to printf.
 ; It passed the first five in %o0 - %o4, but never initialized %o5.
-; Fix in  SparcInstrSelection.cpp: 
-; 2030c2030
-; -                 if (i < target.getRegInfo().GetNumOfIntArgRegs())
-; +                 if (i <= target.getRegInfo().GetNumOfIntArgRegs())
-; 
 
 %.LC12 = internal global [44 x sbyte] c"\09\09M = %g, I = %g, V = %g\0A\09\09O = %g, E = %g\0A\0A\00"           ; <[44 x sbyte]*>