mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-10-31 08:16:47 +00:00 
			
		
		
		
	r182680 replaced CountLeadingZeros_32 with a template function countLeadingZeros that relies on using the correct argument type to give the right result. The type passed in the XCore backend after this revision was incorrect in a couple of places. Patch by Robert Lytton. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185430 91177308-0d34-0410-b5e6-96231b3b80d8
		
			
				
	
	
		
			20 lines
		
	
	
		
			337 B
		
	
	
	
		
			LLVM
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			337 B
		
	
	
	
		
			LLVM
		
	
	
	
	
	
| ; RUN: llc < %s -march=xcore -mcpu=xs1b-generic | FileCheck %s
 | |
| 
 | |
| ; CHECK: .section .cp.rodata.cst4,"aMc",@progbits,4
 | |
| ; CHECK: .LCPI0_0:
 | |
| ; CHECK: .long 12345678
 | |
| ; CHECK: f:
 | |
| ; CHECK: ldw r0, cp[.LCPI0_0]
 | |
| define i32 @f() {
 | |
| entry:
 | |
| 	ret i32 12345678
 | |
| }
 | |
| 
 | |
| define i32 @g() {
 | |
| entry:
 | |
| ; CHECK: g:
 | |
| ; CHECK: mkmsk r0, 1
 | |
| ; CHECK: retsp 0
 | |
|   ret i32 1;
 | |
| }
 |