mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Eliminate more uses of llvm-as and llvm-dis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81293 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c
|
||||
; RUN: llc < %s -march=c
|
||||
|
||||
; Make sure that global variables do not collide if they have the same name,
|
||||
; but different types.
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c
|
||||
; RUN: llc < %s -march=c
|
||||
|
||||
; This case was emitting code that looked like this:
|
||||
; ...
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c
|
||||
; RUN: llc < %s -march=c
|
||||
|
||||
; Test const pointer refs & forward references
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c
|
||||
; RUN: llc < %s -march=c
|
||||
|
||||
global i32* bitcast (float* @2 to i32*) ;; Forward numeric reference
|
||||
global float* @2 ;; Duplicate forward numeric reference
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c
|
||||
; RUN: llc < %s -march=c
|
||||
|
||||
@sptr1 = global [11 x i8]* @somestr ;; Forward ref to a constant
|
||||
@somestr = constant [11 x i8] c"hello world"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c
|
||||
; RUN: llc < %s -march=c
|
||||
|
||||
@fptr = global void ()* @f ;; Forward ref method defn
|
||||
declare void @f() ;; External method
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c
|
||||
; RUN: llc < %s -march=c
|
||||
|
||||
@array = constant [2 x i32] [ i32 12, i32 52 ] ; <[2 x i32]*> [#uses=1]
|
||||
@arrayPtr = global i32* getelementptr ([2 x i32]* @array, i64 0, i64 0) ; <i32**> [#uses=0]
|
||||
|
@@ -1,3 +1,3 @@
|
||||
; RUN: llvm-as < %s | llc -march=c
|
||||
; RUN: llc < %s -march=c
|
||||
|
||||
@MyIntList = external global { \2*, i32 }
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c
|
||||
; RUN: llc < %s -march=c
|
||||
|
||||
; The C Writer bombs on this testcase because it tries the print the prototype
|
||||
; for the test function, which tries to print the argument name. The function
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c
|
||||
; RUN: llc < %s -march=c
|
||||
|
||||
; Indirect function call test... found by Joel & Brian
|
||||
;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c
|
||||
; RUN: llc < %s -march=c
|
||||
|
||||
; This testcase fails because the C backend does not arrange to output the
|
||||
; contents of a structure type before it outputs the structure type itself.
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c
|
||||
; RUN: llc < %s -march=c
|
||||
|
||||
define void @test() {
|
||||
%X = alloca [4 x i32] ; <[4 x i32]*> [#uses=0]
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c
|
||||
; RUN: llc < %s -march=c
|
||||
|
||||
|
||||
declare void @foo(...)
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c
|
||||
; RUN: llc < %s -march=c
|
||||
|
||||
%MPI_Comm = type %struct.Comm*
|
||||
%struct.Comm = type opaque
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c
|
||||
; RUN: llc < %s -march=c
|
||||
|
||||
@bob = external global i32 ; <i32*> [#uses=0]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c
|
||||
; RUN: llc < %s -march=c
|
||||
|
||||
%BitField = type i32
|
||||
%tokenptr = type i32*
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c
|
||||
; RUN: llc < %s -march=c
|
||||
|
||||
@testString = internal constant [18 x i8] c"Escaped newline\5Cn\00" ; <[18 x i8]*> [#uses=1]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c
|
||||
; RUN: llc < %s -march=c
|
||||
|
||||
; Apparently this constant was unsigned in ISO C 90, but not in C 99.
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c
|
||||
; RUN: llc < %s -march=c
|
||||
|
||||
; This testcase breaks the C backend, because gcc doesn't like (...) functions
|
||||
; with no arguments at all.
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c
|
||||
; RUN: llc < %s -march=c
|
||||
|
||||
; The C backend was dying when there was no typename for a struct type!
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c
|
||||
; RUN: llc < %s -march=c
|
||||
|
||||
%X = type { i32, float }
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c
|
||||
; RUN: llc < %s -march=c
|
||||
|
||||
; Make sure hex constant does not continue into a valid hexadecimal letter/number
|
||||
@version = global [3 x i8] c"\001\00"
|
||||
|
@@ -1,3 +1,3 @@
|
||||
; RUN: llvm-as < %s | llc -march=c
|
||||
; RUN: llc < %s -march=c
|
||||
|
||||
@version = global [3 x i8] c"1\00\00"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c
|
||||
; RUN: llc < %s -march=c
|
||||
|
||||
declare i32 @callee(i32, i32)
|
||||
|
||||
|
@@ -1,3 +1,3 @@
|
||||
; RUN: llvm-as < %s | llc -march=c | grep common | grep X
|
||||
; RUN: llc < %s -march=c | grep common | grep X
|
||||
|
||||
@X = linkonce global i32 5
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c
|
||||
; RUN: llc < %s -march=c
|
||||
|
||||
; This is a non-normal FP value: it's a nan.
|
||||
@NAN = global { float } { float 0x7FF8000000000000 } ; <{ float }*> [#uses=0]
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c
|
||||
; RUN: llc < %s -march=c
|
||||
|
||||
%A = type { i32, i8*, { i32, i32, i32, i32, i32, i32, i32, i32 }*, i16 }
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c
|
||||
; RUN: llc < %s -march=c
|
||||
|
||||
; reduced from DOOM.
|
||||
%union._XEvent = type { i32 }
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c
|
||||
; RUN: llc < %s -march=c
|
||||
@y = weak global i8 0 ; <i8*> [#uses=1]
|
||||
|
||||
define i32 @testcaseshr() {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c | grep builtin_return_address
|
||||
; RUN: llc < %s -march=c | grep builtin_return_address
|
||||
|
||||
declare i8* @llvm.returnaddress(i32)
|
||||
|
||||
|
@@ -4,7 +4,7 @@
|
||||
; this testcase for example, which caused the CBE to mangle one, screwing
|
||||
; everything up. :( Test that this does not happen anymore.
|
||||
;
|
||||
; RUN: llvm-as < %s | llc -march=c | not grep _memcpy
|
||||
; RUN: llc < %s -march=c | not grep _memcpy
|
||||
|
||||
declare void @llvm.memcpy.i32(i8*, i8*, i32, i32)
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
; This is a non-normal FP value
|
||||
; RUN: llvm-as < %s | llc -march=c | grep FPConstant | grep static
|
||||
; RUN: llc < %s -march=c | grep FPConstant | grep static
|
||||
|
||||
define float @func() {
|
||||
ret float 0xFFF0000000000000
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c | grep func1 | grep WEAK
|
||||
; RUN: llc < %s -march=c | grep func1 | grep WEAK
|
||||
|
||||
define linkonce i32 @func1() {
|
||||
ret i32 5
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c
|
||||
; RUN: llc < %s -march=c
|
||||
|
||||
declare void @llvm.va_end(i8*)
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
; The CBE should not emit code that casts the function pointer. This causes
|
||||
; GCC to get testy and insert trap instructions instead of doing the right
|
||||
; thing. :(
|
||||
; RUN: llvm-as < %s | llc -march=c
|
||||
; RUN: llc < %s -march=c
|
||||
|
||||
declare void @external(i8*)
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c | not grep extern.*msg
|
||||
; RUN: llc < %s -march=c | not grep extern.*msg
|
||||
; PR472
|
||||
|
||||
@msg = internal global [6 x i8] c"hello\00" ; <[6 x i8]*> [#uses=1]
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c
|
||||
; RUN: llc < %s -march=c
|
||||
|
||||
define i32 @foo() {
|
||||
ret i32 and (i32 123456, i32 ptrtoint (i32 ()* @foo to i32))
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c | grep volatile
|
||||
; RUN: llc < %s -march=c | grep volatile
|
||||
|
||||
define void @test(i32* %P) {
|
||||
%X = volatile load i32* %P ; <i32> [#uses=1]
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c
|
||||
; RUN: llc < %s -march=c
|
||||
|
||||
%JNIEnv = type %struct.JNINa*
|
||||
%struct.JNINa = type { i8*, i8*, i8*, void (%JNIEnv*)* }
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c | not grep -- --65535
|
||||
; RUN: llc < %s -march=c | not grep -- --65535
|
||||
; PR596
|
||||
|
||||
target datalayout = "e-p:32:32"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c | grep fmod
|
||||
; RUN: llc < %s -march=c | grep fmod
|
||||
|
||||
define double @test(double %A, double %B) {
|
||||
%C = frem double %A, %B ; <double> [#uses=1]
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c | grep {\\* *volatile *\\*}
|
||||
; RUN: llc < %s -march=c | grep {\\* *volatile *\\*}
|
||||
|
||||
@G = external global void ()* ; <void ()**> [#uses=2]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c | \
|
||||
; RUN: llc < %s -march=c | \
|
||||
; RUN: grep __BITCAST | count 14
|
||||
|
||||
define i32 @test1(float %F) {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
; For PR1099
|
||||
; RUN: llvm-as < %s | llc -march=c | grep {(llvm_cbe_tmp2 == llvm_cbe_b_2e_0_2e_0_2e_val)}
|
||||
; RUN: llc < %s -march=c | grep {(llvm_cbe_tmp2 == llvm_cbe_b_2e_0_2e_0_2e_val)}
|
||||
|
||||
target datalayout = "e-p:32:32"
|
||||
target triple = "i686-apple-darwin8"
|
||||
|
@@ -1,5 +1,5 @@
|
||||
; PR918
|
||||
; RUN: llvm-as < %s | llc -march=c | not grep {l_structtype_s l_fixarray_array3}
|
||||
; RUN: llc < %s -march=c | not grep {l_structtype_s l_fixarray_array3}
|
||||
|
||||
%structtype_s = type { i32 }
|
||||
%fixarray_array3 = type [3 x %structtype_s]
|
||||
|
@@ -1,5 +1,5 @@
|
||||
; RUN: llvm-as < %s | llc -march=c | grep __builtin_stack_save
|
||||
; RUN: llvm-as < %s | llc -march=c | grep __builtin_stack_restore
|
||||
; RUN: llc < %s -march=c | grep __builtin_stack_save
|
||||
; RUN: llc < %s -march=c | grep __builtin_stack_restore
|
||||
; PR1028
|
||||
|
||||
declare i8* @llvm.stacksave()
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c
|
||||
; RUN: llc < %s -march=c
|
||||
; PR1181
|
||||
target datalayout = "e-p:64:64"
|
||||
target triple = "x86_64-apple-darwin8"
|
||||
|
@@ -1,7 +1,7 @@
|
||||
; PR1164
|
||||
; RUN: llvm-as < %s | llc -march=c | grep {llvm_cbe_A = \\*llvm_cbe_G;}
|
||||
; RUN: llvm-as < %s | llc -march=c | grep {llvm_cbe_B = \\*(<mp_0_1);}
|
||||
; RUN: llvm-as < %s | llc -march=c | grep {return (((unsigned int )(((unsigned int )llvm_cbe_A) + ((unsigned int )llvm_cbe_B))));}
|
||||
; RUN: llc < %s -march=c | grep {llvm_cbe_A = \\*llvm_cbe_G;}
|
||||
; RUN: llc < %s -march=c | grep {llvm_cbe_B = \\*(<mp_0_1);}
|
||||
; RUN: llc < %s -march=c | grep {return (((unsigned int )(((unsigned int )llvm_cbe_A) + ((unsigned int )llvm_cbe_B))));}
|
||||
|
||||
@G = global i32 123
|
||||
@ltmp_0_1 = global i32 123
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c | grep {packed}
|
||||
; RUN: llc < %s -march=c | grep {packed}
|
||||
|
||||
%struct.p = type <{ i16 }>
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c | \
|
||||
; RUN: llc < %s -march=c | \
|
||||
; RUN: grep {struct __attribute__ ((packed, aligned(} | count 4
|
||||
|
||||
define void @test(i32* %P) {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c
|
||||
; RUN: llc < %s -march=c
|
||||
|
||||
declare {i32, i32} @foo()
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c | grep {llvm_cbe_t.*&1}
|
||||
; RUN: llc < %s -march=c | grep {llvm_cbe_t.*&1}
|
||||
define i32 @test(i32 %r) {
|
||||
%s = icmp eq i32 %r, 0
|
||||
%t = add i1 %s, %s
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c | grep {"m"(llvm_cbe_newcw))}
|
||||
; RUN: llc < %s -march=c | grep {"m"(llvm_cbe_newcw))}
|
||||
; PR2407
|
||||
|
||||
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c
|
||||
; RUN: llc < %s -march=c
|
||||
; PR2907
|
||||
target datalayout = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f128:64:128"
|
||||
target triple = "powerpc-apple-darwin9.5"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c
|
||||
; RUN: llc < %s -march=c
|
||||
|
||||
define void @func() nounwind {
|
||||
entry:
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c | grep {\\* ((unsigned int )}
|
||||
; RUN: llc < %s -march=c | grep {\\* ((unsigned int )}
|
||||
; PR2408
|
||||
|
||||
define i32 @a(i32 %a) {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=c
|
||||
; RUN: llc < %s -march=c
|
||||
@.str15 = external global [2 x i8]
|
||||
|
||||
define <4 x i32> @foo(<4 x i32> %a, i32 %b) {
|
||||
|
Reference in New Issue
Block a user