Home | History | Annotate | Download | only in X86
      1 ; RUN: llc < %s -mtriple=x86_64-apple-macosx10.7.0 -verify-machineinstrs | FileCheck %s
      2 ; RUN: llc < %s -mtriple=x86_64-apple-macosx10.7.0 -O0 | FileCheck %s
      3 
      4 define void @test1(i32* %ptr, i32 %val1) {
      5 ; CHECK: test1
      6 ; CHECK: xchgl	%esi, (%rdi)
      7   store atomic i32 %val1, i32* %ptr seq_cst, align 4
      8   ret void
      9 }
     10 
     11 define void @test2(i32* %ptr, i32 %val1) {
     12 ; CHECK: test2
     13 ; CHECK: movl	%esi, (%rdi)
     14   store atomic i32 %val1, i32* %ptr release, align 4
     15   ret void
     16 }
     17 
     18 define i32 @test3(i32* %ptr) {
     19 ; CHECK: test3
     20 ; CHECK: movl	(%rdi), %eax
     21   %val = load atomic i32* %ptr seq_cst, align 4
     22   ret i32 %val
     23 }
     24