1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i386-unknown-unknown -mattr=+sse2 | FileCheck %s --check-prefix=X32
3 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=-sse2 | FileCheck %s --check-prefix=X64
5 ; It doesn't matter if an x86-64 target has specified "no-sse2"; we still can use mfence.
21 define i32 @fence(ptr %ptr) {
24 ; X32-NEXT: movl {{[0-9]+}}(%esp), %eax
26 ; X32-NEXT: movl (%eax), %eax
32 ; X64-NEXT: movl (%rdi), %eax
34 %atomic = atomicrmw add ptr %ptr, i32 0 seq_cst