1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-unknown- -mcpu=core2 | FileCheck %s --check-prefixes=CHECK,X86
3 ; RUN: llc < %s -mtriple=x86_64-unknown- -mcpu=core2 | FileCheck %s --check-prefixes=CHECK,X64
6 define void @t1(i64* nocapture %p) nounwind ssp {
8 ; X86: # %bb.0: # %entry
10 ; X86-NEXT: pushl %esi
11 ; X86-NEXT: movl {{[0-9]+}}(%esp), %esi
12 ; X86-NEXT: xorl %eax, %eax
13 ; X86-NEXT: xorl %edx, %edx
14 ; X86-NEXT: xorl %ecx, %ecx
15 ; X86-NEXT: movl $1, %ebx
16 ; X86-NEXT: lock cmpxchg8b (%esi)
22 ; X64: # %bb.0: # %entry
23 ; X64-NEXT: movl $1, %ecx
24 ; X64-NEXT: xorl %eax, %eax
25 ; X64-NEXT: lock cmpxchgq %rcx, (%rdi)
28 %r = cmpxchg i64* %p, i64 0, i64 1 seq_cst seq_cst