diff options
author | Lang Hames <lhames@gmail.com> | 2013-06-28 18:36:42 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2013-06-28 18:36:42 +0000 |
commit | c22e39d83dcbfe0bee919fdf2d0aaf0944b20cef (patch) | |
tree | 7a2ede7fd26dba765dbf52d734d23e55bdd0450c /llvm/test/CodeGen/ARM/atomic-load-store.ll | |
parent | ff9a5c29feba4388a8dc52289abe9d31c0b348fc (diff) | |
download | bcm5719-llvm-c22e39d83dcbfe0bee919fdf2d0aaf0944b20cef.tar.gz bcm5719-llvm-c22e39d83dcbfe0bee919fdf2d0aaf0944b20cef.zip |
Add missing case to switch statement - DAGTypeLegalizer::ExpandIntegerResult
should expand ATOMIC_CMP_SWAP nodes the same way that it does for ATOMIC_SWAP.
Since ATOMIC_LOADs on some targets (e.g. older ARM variants) get legalized to
ATOMIC_CMP_SWAPs, the missing case had been causing i64 atomic loads to crash
during isel.
<rdar://problem/14074644>
llvm-svn: 185186
Diffstat (limited to 'llvm/test/CodeGen/ARM/atomic-load-store.ll')
-rw-r--r-- | llvm/test/CodeGen/ARM/atomic-load-store.ll | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/atomic-load-store.ll b/llvm/test/CodeGen/ARM/atomic-load-store.ll index 12a8fe4cd88..66916a7c2e2 100644 --- a/llvm/test/CodeGen/ARM/atomic-load-store.ll +++ b/llvm/test/CodeGen/ARM/atomic-load-store.ll @@ -2,6 +2,7 @@ ; RUN: llc < %s -mtriple=armv7-apple-ios -O0 | FileCheck %s -check-prefix=ARM ; RUN: llc < %s -mtriple=thumbv7-apple-ios | FileCheck %s -check-prefix=THUMBTWO ; RUN: llc < %s -mtriple=thumbv6-apple-ios | FileCheck %s -check-prefix=THUMBONE +; RUN llc < %s -mtriple=armv4-apple-ios | FileCheck %s -check-prefix=ARMV4 define void @test1(i32* %ptr, i32 %val1) { ; ARM: test1 @@ -54,3 +55,17 @@ define void @test4(i8* %ptr1, i8* %ptr2) { store atomic i8 %val, i8* %ptr2 seq_cst, align 1 ret void } + +define i64 @test_old_load_64bit(i64* %p) { +; ARMV4: test_old_load_64bit +; ARMV4: ___sync_val_compare_and_swap_8 + %1 = load atomic i64* %p seq_cst, align 8 + ret i64 %1 +} + +define void @test_old_store_64bit(i64* %p, i64 %v) { +; ARMV4: test_old_store_64bit +; ARMV4: ___sync_lock_test_and_set_8 + store atomic i64 %v, i64* %p seq_cst, align 8 + ret void +} |