mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-10-31 08:16:47 +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
		
			
				
	
	
		
			23 lines
		
	
	
		
			476 B
		
	
	
	
		
			LLVM
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			476 B
		
	
	
	
		
			LLVM
		
	
	
	
	
	
| ; RUN: llc < %s -mtriple=i686-none-linux -verify-machineinstrs | FileCheck %s
 | |
| 
 | |
| define i32* @test_atomic_ptr_load(i32** %a0) {
 | |
| ; CHECK: test_atomic_ptr_load
 | |
| ; CHECK: movl
 | |
| ; CHECK: movl
 | |
| ; CHECK: ret
 | |
| 0:
 | |
|   %0 = load atomic i32** %a0 seq_cst, align 4
 | |
|   ret i32* %0
 | |
| }
 | |
| 
 | |
| define void @test_atomic_ptr_store(i32* %a0, i32** %a1) {
 | |
| ; CHECK: test_atomic_ptr_store
 | |
| ; CHECK: movl
 | |
| ; CHECK: movl
 | |
| ; CHECK: xchgl
 | |
| ; CHECK: ret
 | |
| 0:
 | |
|   store atomic i32* %a0, i32** %a1 seq_cst, align 4
 | |
|   ret void
 | |
| }
 |