mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-11-01 00:17:01 +00:00 
			
		
		
		
	- Clear 'mayStore' flag when loading from the atomic variable before the spin loop - Clear kill flag from one use to multiple use in registers forming the address to that atomic variable - don't use a physical register as live-in register in BB (neither entry nor landing pad.) by copying it into virtual register (patch by Cameron Zwarich) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176538 91177308-0d34-0410-b5e6-96231b3b80d8
		
			
				
	
	
		
			20 lines
		
	
	
		
			447 B
		
	
	
	
		
			LLVM
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			447 B
		
	
	
	
		
			LLVM
		
	
	
	
	
	
| ; RUN: llc < %s -march=x86 -verify-machineinstrs | FileCheck %s
 | |
| 
 | |
| ; 64-bit load/store on x86-32
 | |
| ; FIXME: The generated code can be substantially improved.
 | |
| 
 | |
| define void @test1(i64* %ptr, i64 %val1) {
 | |
| ; CHECK: test1
 | |
| ; CHECK: cmpxchg8b
 | |
| ; CHECK-NEXT: jne
 | |
|   store atomic i64 %val1, i64* %ptr seq_cst, align 8
 | |
|   ret void
 | |
| }
 | |
| 
 | |
| define i64 @test2(i64* %ptr) {
 | |
| ; CHECK: test2
 | |
| ; CHECK: cmpxchg8b
 | |
|   %val = load atomic i64* %ptr seq_cst, align 8
 | |
|   ret i64 %val
 | |
| }
 |