1 ; RUN: llc -mtriple=i386-linux-gnu %s -o - | FileCheck %s
4 define 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
11 define 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
18 define 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
25 define 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
32 define 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
39 define 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