diff options
-rwxr-xr-x | llvm/test/CodeGen/SPARC/LeonCASAInstructionUT.ll | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/SPARC/LeonCASAInstructionUT.ll b/llvm/test/CodeGen/SPARC/LeonCASAInstructionUT.ll new file mode 100755 index 00000000000..0d41f314edc --- /dev/null +++ b/llvm/test/CodeGen/SPARC/LeonCASAInstructionUT.ll @@ -0,0 +1,14 @@ +; RUN: llc %s -O0 -march=sparc -mcpu=leon3 -mattr=+hasleoncasa -o - | FileCheck %s +; RUN: llc %s -O0 -march=sparc -mcpu=gr712rc -o - | FileCheck %s +; RUN: llc %s -O0 -march=sparc -mcpu=leon4 -o - | FileCheck %s +; RUN: llc %s -O0 -march=sparc -mcpu=gr740 -o - | FileCheck %s + +; CHECK-LABEL: casa_test +; CHECK: casa [%o0] 10, %o3, %o2 +define void @casa_test(i32* %ptr) { + %pair = cmpxchg i32* %ptr, i32 0, i32 1 monotonic monotonic + %r = extractvalue { i32, i1 } %pair, 0 + %stored1 = icmp eq i32 %r, 0 + + ret void +} |