142b8b027e0154885f7668f3f643d35985aa4fa6
[oota-llvm.git] / test / CodeGen / Mips / atomicSCr6.ll
1 ; RUN: llc -asm-show-inst  -march=mips64el -mcpu=mips64r6 < %s -filetype=asm -o - | FileCheck %s -check-prefix=CHK64 
2 ; RUN: llc -asm-show-inst  -march=mipsel -mcpu=mips32r6 < %s -filetype=asm -o -| FileCheck %s -check-prefix=CHK32
3
4 define internal i32 @atomic_load_test1() #0 {
5 entry:
6
7   %load_add = alloca i32*, align 8
8   %.atomicdst = alloca i32, align 4
9   %0 = load i32*, i32** %load_add, align 8
10   %1 = load atomic i32, i32* %0 acquire, align 4
11   store i32 %1, i32* %.atomicdst, align 4
12   %2 = load i32, i32* %.atomicdst, align 4
13   
14   ret i32 %2
15 }
16
17 define internal i64 @atomic_load_test2() #0 {
18 entry:
19
20   %load_add = alloca i64*, align 16
21   %.atomicdst = alloca i64, align 8
22   %0 = load i64*, i64** %load_add, align 16
23   %1 = load atomic i64, i64* %0 acquire, align 8
24   store i64 %1, i64* %.atomicdst, align 8
25   %2 = load i64, i64* %.atomicdst, align 8
26   
27   ret i64 %2
28 }
29 ;CHK32:  LL_R6
30 ;CHK32:  SC_R6
31 ;CHK64:  LLD_R6
32 ;CHK64:  SCD_R6