Add a test for i1 zeroext arguments on x86-64. We currently generate code that
conforms to the ABI, but DAGCombine could in theory recognize the sequence of zext asserts and truncates and generate incorrect code. llvm-svn: 127754
This commit is contained in:
		
							parent
							
								
									f6ce2fb1b3
								
							
						
					
					
						commit
						49e354bcb6
					
				| 
						 | 
				
			
			@ -0,0 +1,23 @@
 | 
			
		|||
; RUN: llc < %s -march=x86-64 | FileCheck %s
 | 
			
		||||
 | 
			
		||||
; CHECK: @bar1
 | 
			
		||||
; CHECK: movzbl
 | 
			
		||||
; CHECK: callq
 | 
			
		||||
define void @bar1(i1 zeroext %v1) nounwind ssp {
 | 
			
		||||
entry:
 | 
			
		||||
  %conv = zext i1 %v1 to i32
 | 
			
		||||
  %call = tail call i32 (...)* @foo(i32 %conv) nounwind
 | 
			
		||||
  ret void
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
; CHECK: @bar2
 | 
			
		||||
; CHECK-NOT: movzbl
 | 
			
		||||
; CHECK: callq
 | 
			
		||||
define void @bar2(i8 zeroext %v1) nounwind ssp {
 | 
			
		||||
entry:
 | 
			
		||||
  %conv = zext i8 %v1 to i32
 | 
			
		||||
  %call = tail call i32 (...)* @foo(i32 %conv) nounwind
 | 
			
		||||
  ret void
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
declare i32 @foo(...)
 | 
			
		||||
		Loading…
	
		Reference in New Issue