mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-11-04 05:17:07 +00:00 
			
		
		
		
	to use the information in the module rather than TargetOptions. We've had and clang has used the use-soft-float attribute for some time now so have the backends set a subtarget feature based on a particular function now that subtargets are created based on functions and function attributes. For the one middle end soft float check go ahead and create an overloadable TargetLowering::useSoftFloat function that just checks the TargetSubtargetInfo in all cases. Also remove the command line option that hard codes whether or not soft-float is set by using the attribute for all of the target specific test cases - for the generic just go ahead and add the attribute in the one case that showed up. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237079 91177308-0d34-0410-b5e6-96231b3b80d8
		
			
				
	
	
		
			14 lines
		
	
	
		
			471 B
		
	
	
	
		
			LLVM
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			471 B
		
	
	
	
		
			LLVM
		
	
	
	
	
	
; RUN: llc < %s -march=x86-64 -mattr=+sse4.1,-avx | FileCheck %s --check-prefix=CHECK-HARD-FLOAT
 | 
						|
; RUN: llc < %s -march=x86-64 -mattr=+sse4.1,-avx,+soft-float | FileCheck %s --check-prefix=CHECK-SOFT-FLOAT
 | 
						|
 | 
						|
target triple = "x86_64-unknown-linux-gnu"
 | 
						|
 | 
						|
declare float @llvm.floor.f32(float)
 | 
						|
 | 
						|
; CHECK-SOFT-FLOAT: callq floorf
 | 
						|
; CHECK-HARD-FLOAT: roundss $1, %xmm0, %xmm0
 | 
						|
define float @myfloor(float %a) {
 | 
						|
  %val = tail call float @llvm.floor.f32(float %a)
 | 
						|
  ret float %val
 | 
						|
}
 |