44 lines · plain
1; RUN: llc -mtriple=i386-linux-gnu -mcpu=i386 %s -o - | FileCheck %s2 3define i64 @test_add(ptr %addr, i64 %inc) {4; CHECK-LABEL: test_add:5; CHECK: calll __atomic_fetch_add_86 %old = atomicrmw add ptr %addr, i64 %inc seq_cst7 ret i64 %old8}9 10define i64 @test_sub(ptr %addr, i64 %inc) {11; CHECK-LABEL: test_sub:12; CHECK: calll __atomic_fetch_sub_813 %old = atomicrmw sub ptr %addr, i64 %inc seq_cst14 ret i64 %old15}16 17define i64 @test_and(ptr %andr, i64 %inc) {18; CHECK-LABEL: test_and:19; CHECK: calll __atomic_fetch_and_820 %old = atomicrmw and ptr %andr, i64 %inc seq_cst21 ret i64 %old22}23 24define i64 @test_or(ptr %orr, i64 %inc) {25; CHECK-LABEL: test_or:26; CHECK: calll __atomic_fetch_or_827 %old = atomicrmw or ptr %orr, i64 %inc seq_cst28 ret i64 %old29}30 31define i64 @test_xor(ptr %xorr, i64 %inc) {32; CHECK-LABEL: test_xor:33; CHECK: calll __atomic_fetch_xor_834 %old = atomicrmw xor ptr %xorr, i64 %inc seq_cst35 ret i64 %old36}37 38define i64 @test_nand(ptr %nandr, i64 %inc) {39; CHECK-LABEL: test_nand:40; CHECK: calll __atomic_fetch_nand_841 %old = atomicrmw nand ptr %nandr, i64 %inc seq_cst42 ret i64 %old43}44