mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-11-04 05:17:07 +00:00 
			
		
		
		
	Summary: Currently fast-isel-abort will only abort for regular instructions, and just warn for function calls, terminators, function arguments. There is already fast-isel-abort-args but nothing for calls and terminators. This change turns the fast-isel-abort options into an integer option, so that multiple levels of strictness can be defined. This will help no being surprised when the "abort" option indeed does not abort, and enables the possibility to write test that verifies that no intrinsics are forgotten by fast-isel. Reviewers: resistor, echristo Subscribers: jfb, llvm-commits Differential Revision: http://reviews.llvm.org/D7941 From: Mehdi Amini <mehdi.amini@apple.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230775 91177308-0d34-0410-b5e6-96231b3b80d8
		
			
				
	
	
		
			50 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			LLVM
		
	
	
	
	
	
			
		
		
	
	
			50 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			LLVM
		
	
	
	
	
	
; RUN: llc < %s -fast-isel -fast-isel-abort=2 -verify-machineinstrs -mtriple=x86_64-apple-darwin10
 | 
						|
 | 
						|
; Just make sure these don't abort when lowering the arguments.
 | 
						|
define i32 @t1(i32 %a, i32 %b, i32 %c) {
 | 
						|
entry:
 | 
						|
  %add = add nsw i32 %b, %a
 | 
						|
  %add1 = add nsw i32 %add, %c
 | 
						|
  ret i32 %add1
 | 
						|
}
 | 
						|
 | 
						|
define i64 @t2(i64 %a, i64 %b, i64 %c) {
 | 
						|
entry:
 | 
						|
  %add = add nsw i64 %b, %a
 | 
						|
  %add1 = add nsw i64 %add, %c
 | 
						|
  ret i64 %add1
 | 
						|
}
 | 
						|
 | 
						|
define i64 @t3(i32 %a, i64 %b, i32 %c) {
 | 
						|
entry:
 | 
						|
  %conv = sext i32 %a to i64
 | 
						|
  %add = add nsw i64 %conv, %b
 | 
						|
  %conv1 = sext i32 %c to i64
 | 
						|
  %add2 = add nsw i64 %add, %conv1
 | 
						|
  ret i64 %add2
 | 
						|
}
 | 
						|
 | 
						|
define float @t4(float %a, float %b, float %c, float %d, float %e, float %f, float %g, float %h) {
 | 
						|
entry:
 | 
						|
  %add1 = fadd float %a, %b
 | 
						|
  %add2 = fadd float %c, %d
 | 
						|
  %add3 = fadd float %e, %f
 | 
						|
  %add4 = fadd float %g, %h
 | 
						|
  %add5 = fadd float %add1, %add2
 | 
						|
  %add6 = fadd float %add3, %add4
 | 
						|
  %add7 = fadd float %add5, %add6
 | 
						|
  ret float %add7
 | 
						|
}
 | 
						|
 | 
						|
define double @t5(double %a, double %b, double %c, double %d, double %e, double %f, double %g, double %h) {
 | 
						|
entry:
 | 
						|
  %add1 = fadd double %a, %b
 | 
						|
  %add2 = fadd double %c, %d
 | 
						|
  %add3 = fadd double %e, %f
 | 
						|
  %add4 = fadd double %g, %h
 | 
						|
  %add5 = fadd double %add1, %add2
 | 
						|
  %add6 = fadd double %add3, %add4
 | 
						|
  %add7 = fadd double %add5, %add6
 | 
						|
  ret double %add7
 | 
						|
}
 |