1; RUN: llc -mtriple=i386-linux-gnu %s -o - | FileCheck %s 2; XFAIL: * 3 4define i64 @test_add(i64* %addr, i64 %inc) { 5; CHECK-LABEL: test_add: 6; CHECK: calll __sync_fetch_and_add_8 7 %old = atomicrmw add i64* %addr, i64 %inc seq_cst 8 ret i64 %old 9} 10 11define i64 @test_sub(i64* %addr, i64 %inc) { 12; CHECK-LABEL: test_sub: 13; CHECK: calll __sync_fetch_and_sub_8 14 %old = atomicrmw sub i64* %addr, i64 %inc seq_cst 15 ret i64 %old 16} 17 18define i64 @test_and(i64* %andr, i64 %inc) { 19; CHECK-LABEL: test_and: 20; CHECK: calll __sync_fetch_and_and_8 21 %old = atomicrmw and i64* %andr, i64 %inc seq_cst 22 ret i64 %old 23} 24 25define i64 @test_or(i64* %orr, i64 %inc) { 26; CHECK-LABEL: test_or: 27; CHECK: calll __sync_fetch_and_or_8 28 %old = atomicrmw or i64* %orr, i64 %inc seq_cst 29 ret i64 %old 30} 31 32define i64 @test_xor(i64* %xorr, i64 %inc) { 33; CHECK-LABEL: test_xor: 34; CHECK: calll __sync_fetch_and_xor_8 35 %old = atomicrmw xor i64* %xorr, i64 %inc seq_cst 36 ret i64 %old 37} 38 39define i64 @test_nand(i64* %nandr, i64 %inc) { 40; CHECK-LABEL: test_nand: 41; CHECK: calll __sync_fetch_and_nand_8 42 %old = atomicrmw nand i64* %nandr, i64 %inc seq_cst 43 ret i64 %old 44} 45