mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-10-31 08:16:47 +00:00 
			
		
		
		
	git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86345 91177308-0d34-0410-b5e6-96231b3b80d8
		
			
				
	
	
		
			25 lines
		
	
	
		
			460 B
		
	
	
	
		
			LLVM
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			460 B
		
	
	
	
		
			LLVM
		
	
	
	
	
	
| ; RUN: llc < %s -march=x86-64 | FileCheck %s
 | |
| 
 | |
| define i64 @test0(i64 %x) nounwind {
 | |
|   %t = icmp eq i64 %x, 0
 | |
|   %r = zext i1 %t to i64
 | |
|   ret i64 %r
 | |
| ; CHECK: test0:
 | |
| ; CHECK: 	testq	%rdi, %rdi
 | |
| ; CHECK: 	sete	%al
 | |
| ; CHECK: 	movzbl	%al, %eax
 | |
| ; CHECK: 	ret
 | |
| }
 | |
| 
 | |
| define i64 @test1(i64 %x) nounwind {
 | |
|   %t = icmp slt i64 %x, 1
 | |
|   %r = zext i1 %t to i64
 | |
|   ret i64 %r
 | |
| ; CHECK: test1:
 | |
| ; CHECK: 	testq	%rdi, %rdi
 | |
| ; CHECK: 	setle	%al
 | |
| ; CHECK: 	movzbl	%al, %eax
 | |
| ; CHECK: 	ret
 | |
| }
 | |
| 
 |