mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-10-30 16:17:05 +00:00 
			
		
		
		
	This was done with the following sed invocation to catch label lines demarking function boundaries:
    sed -i '' "s/^;\( *\)\([A-Z0-9_]*\):\( *\)test\([A-Za-z0-9_-]*\):\( *\)$/;\1\2-LABEL:\3test\4:\5/g" test/CodeGen/*/*.ll
which was written conservatively to avoid false positives rather than false negatives. I scanned through all the changes and everything looks correct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186258 91177308-0d34-0410-b5e6-96231b3b80d8
		
	
		
			
				
	
	
		
			43 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			LLVM
		
	
	
	
	
	
			
		
		
	
	
			43 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			LLVM
		
	
	
	
	
	
| ; RUN: llc < %s -mtriple=armv7-none-linux-gnueabi -pre-RA-sched=source | FileCheck %s
 | |
| ; Test that we correctly align elements when using va_arg
 | |
| 
 | |
| ; CHECK-LABEL: test1:
 | |
| ; CHECK-NOT: bfc
 | |
| ; CHECK: add	[[REG:(r[0-9]+)|(lr)]], {{(r[0-9]+)|(lr)}}, #7
 | |
| ; CHECK: bfc	[[REG]], #0, #3
 | |
| ; CHECK-NOT: bfc
 | |
| 
 | |
| define i64 @test1(i32 %i, ...) nounwind optsize {
 | |
| entry:
 | |
|   %g = alloca i8*, align 4
 | |
|   %g1 = bitcast i8** %g to i8*
 | |
|   call void @llvm.va_start(i8* %g1)
 | |
|   %0 = va_arg i8** %g, i64
 | |
|   call void @llvm.va_end(i8* %g1)
 | |
|   ret i64 %0
 | |
| }
 | |
| 
 | |
| ; CHECK-LABEL: test2:
 | |
| ; CHECK-NOT: bfc
 | |
| ; CHECK: add	[[REG:(r[0-9]+)|(lr)]], {{(r[0-9]+)|(lr)}}, #7
 | |
| ; CHECK: bfc	[[REG]], #0, #3
 | |
| ; CHECK-NOT:	bfc
 | |
| ; CHECK: bx	lr
 | |
| 
 | |
| define double @test2(i32 %a, i32 %b, ...) nounwind optsize {
 | |
| entry:
 | |
|   %ap = alloca i8*, align 4                       ; <i8**> [#uses=3]
 | |
|   %ap1 = bitcast i8** %ap to i8*                  ; <i8*> [#uses=2]
 | |
|   call void @llvm.va_start(i8* %ap1)
 | |
|   %0 = va_arg i8** %ap, i32                       ; <i32> [#uses=0]
 | |
|   store i32 %0, i32* undef
 | |
|   %1 = va_arg i8** %ap, double                    ; <double> [#uses=1]
 | |
|   call void @llvm.va_end(i8* %ap1)
 | |
|   ret double %1
 | |
| }
 | |
| 
 | |
| 
 | |
| declare void @llvm.va_start(i8*) nounwind
 | |
| 
 | |
| declare void @llvm.va_end(i8*) nounwind
 |