mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-10-31 08:16:47 +00:00 
			
		
		
		
	This is a preliminary patch for fast instruction selection on PowerPC. Code generation can differ between DAG isel and fast isel. Existing tests that specify -O0 were written to expect DAG isel. Make this explicit by adding -fast-isel=false to the tests. In some cases specifying -fast-isel=false produces different code even when there isn't a fast instruction selector specified. This is because TM.Options.EnableFastISel = 1 at -O0 whether or not a FastISel object exists. Thus disabling fast isel can actually produce less conservative code. Because of this, some of the expected code generation in the -O0 tests needs to be adjusted. In particular, handling of function arguments is less conservative with -fast-isel=false (see isOnlyUsedInEntryBlock() in SelectionDAGBuilder.cpp). This results in fewer stack accesses and, in some cases, reduced stack size as uselessly loaded values are no longer stored back to spill locations in the stack. No functional change with this patch; test case adjustments only. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183939 91177308-0d34-0410-b5e6-96231b3b80d8
		
			
				
	
	
		
			19 lines
		
	
	
		
			631 B
		
	
	
	
		
			LLVM
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			631 B
		
	
	
	
		
			LLVM
		
	
	
	
	
	
| ; RUN: llc -O0 -mtriple=powerpc-unknown-linux-gnu -mattr=+altivec -verify-machineinstrs < %s | FileCheck %s
 | |
| ; RUN: llc -O0 -mtriple=powerpc64-unknown-linux-gnu -mattr=+altivec -verify-machineinstrs -fast-isel=false < %s | FileCheck %s
 | |
| 
 | |
| ; This verifies that we generate correct spill/reload code for vector regs.
 | |
| 
 | |
| define void @addrtaken(i32 %i, <4 x float> %w) nounwind {
 | |
| entry:
 | |
|   %i.addr = alloca i32, align 4
 | |
|   %w.addr = alloca <4 x float>, align 16
 | |
|   store i32 %i, i32* %i.addr, align 4
 | |
|   store <4 x float> %w, <4 x float>* %w.addr, align 16
 | |
|   call void @foo(i32* %i.addr)
 | |
|   ret void
 | |
| }
 | |
| 
 | |
| ; CHECK: stvx 2,
 | |
| 
 | |
| declare void @foo(i32*)
 |