diff options
author | Chris Dewhurst <chris.dewhurst@lero.ie> | 2016-09-09 09:08:13 +0000 |
---|---|---|
committer | Chris Dewhurst <chris.dewhurst@lero.ie> | 2016-09-09 09:08:13 +0000 |
commit | ddad6e028ec3f348fab624988d6ad1d4c1316f3e (patch) | |
tree | f5798e610d6910eb61461251021e3a8f260a7af9 /llvm/test | |
parent | faf36c2e0b0dd074727e6b40078d87ed02eed117 (diff) | |
download | bcm5719-llvm-ddad6e028ec3f348fab624988d6ad1d4c1316f3e.tar.gz bcm5719-llvm-ddad6e028ec3f348fab624988d6ad1d4c1316f3e.zip |
[Sparc][LEON] Unit test for CASA instruction supported by some LEON processors added.
llvm-svn: 281021
Diffstat (limited to 'llvm/test')
-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 +} |