1 ; RUN: llc -mtriple=i386-linux-gnu %s -o - | FileCheck %s
3 define i64 @test_add(i64* %addr, i64 %inc) {
4 ; CHECK-LABEL: test_add:
5 ; CHECK: calll __sync_fetch_and_add_8
6 %old = atomicrmw add i64* %addr, i64 %inc seq_cst
10 define i64 @test_sub(i64* %addr, i64 %inc) {
11 ; CHECK-LABEL: test_sub:
12 ; CHECK: calll __sync_fetch_and_sub_8
13 %old = atomicrmw sub i64* %addr, i64 %inc seq_cst
17 define i64 @test_and(i64* %andr, i64 %inc) {
18 ; CHECK-LABEL: test_and:
19 ; CHECK: calll __sync_fetch_and_and_8
20 %old = atomicrmw and i64* %andr, i64 %inc seq_cst
24 define i64 @test_or(i64* %orr, i64 %inc) {
25 ; CHECK-LABEL: test_or:
26 ; CHECK: calll __sync_fetch_and_or_8
27 %old = atomicrmw or i64* %orr, i64 %inc seq_cst
31 define i64 @test_xor(i64* %xorr, i64 %inc) {
32 ; CHECK-LABEL: test_xor:
33 ; CHECK: calll __sync_fetch_and_xor_8
34 %old = atomicrmw xor i64* %xorr, i64 %inc seq_cst
38 define i64 @test_nand(i64* %nandr, i64 %inc) {
39 ; CHECK-LABEL: test_nand:
40 ; CHECK: calll __sync_fetch_and_nand_8
41 %old = atomicrmw nand i64* %nandr, i64 %inc seq_cst