mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-10-31 08:16:47 +00:00 
			
		
		
		
	Now that 3.3 is branched, we are re-enabling virtual registers to help iron out bugs before the next release. Some of the post-RA passes do not play well with virtual registers, so we disable them for now. The needed functionality of the PrologEpilogInserter pass is copied to a new backend-specific NVPTXPrologEpilog pass. The test for this commit is not breaking the existing tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182998 91177308-0d34-0410-b5e6-96231b3b80d8
		
			
				
	
	
		
			27 lines
		
	
	
		
			676 B
		
	
	
	
		
			LLVM
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			676 B
		
	
	
	
		
			LLVM
		
	
	
	
	
	
| ; RUN: llc < %s -march=nvptx -mcpu=sm_20 | FileCheck %s
 | |
| ; RUN: llc < %s -march=nvptx64 -mcpu=sm_20 | FileCheck %s
 | |
| 
 | |
| define ptx_device float @test_fabsf(float %f) {
 | |
| ; CHECK: abs.f32 %f{{[0-9]+}}, %f{{[0-9]+}};
 | |
| ; CHECK: ret;
 | |
| 	%x = call float @llvm.fabs.f32(float %f)
 | |
| 	ret float %x
 | |
| }
 | |
| 
 | |
| define ptx_device double @test_fabs(double %d) {
 | |
| ; CHECK: abs.f64 %fl{{[0-9]+}}, %fl{{[0-9]+}};
 | |
| ; CHECK: ret;
 | |
| 	%x = call double @llvm.fabs.f64(double %d)
 | |
| 	ret double %x
 | |
| }
 | |
| 
 | |
| define float @test_nvvm_sqrt(float %a) {
 | |
|   %val = call float @llvm.nvvm.sqrt.f(float %a)
 | |
|   ret float %val
 | |
| }
 | |
| 
 | |
| 
 | |
| declare float @llvm.fabs.f32(float)
 | |
| declare double @llvm.fabs.f64(double)
 | |
| declare float @llvm.nvvm.sqrt.f(float)
 |