diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2012-08-17 23:24:29 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2012-08-17 23:24:29 +0000 |
commit | 79a6b30d8a97853ee0f5432678423bc5ce309a09 (patch) | |
tree | ca38cf92c48d3b4c0be1fb5013d713a22cfaa475 /llvm/test/CodeGen/X86/atomic-pointer.ll | |
parent | ff5760132d992c109f71e1bfed555fed046a243e (diff) | |
download | bcm5719-llvm-79a6b30d8a97853ee0f5432678423bc5ce309a09.tar.gz bcm5719-llvm-79a6b30d8a97853ee0f5432678423bc5ce309a09.zip |
Make atomic load and store of pointers work. Tighten verification of atomic operations
so other unexpected operations don't slip through. Based on patch by Logan Chien.
PR11786/PR13186.
llvm-svn: 162146
Diffstat (limited to 'llvm/test/CodeGen/X86/atomic-pointer.ll')
-rw-r--r-- | llvm/test/CodeGen/X86/atomic-pointer.ll | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/atomic-pointer.ll b/llvm/test/CodeGen/X86/atomic-pointer.ll new file mode 100644 index 00000000000..a455277be4d --- /dev/null +++ b/llvm/test/CodeGen/X86/atomic-pointer.ll @@ -0,0 +1,22 @@ +; RUN: llc < %s -mtriple=i686-none-linux | FileCheck %s + +define i32* @test_atomic_ptr_load(i32** %a0) { +; CHECK: test_atomic_ptr_load +; CHECK: movl +; CHECK: movl +; CHECK: ret +0: + %0 = load atomic i32** %a0 seq_cst, align 4 + ret i32* %0 +} + +define void @test_atomic_ptr_store(i32* %a0, i32** %a1) { +; CHECK: test_atomic_ptr_store +; CHECK: movl +; CHECK: movl +; CHECK: xchgl +; CHECK: ret +0: + store atomic i32* %a0, i32** %a1 seq_cst, align 4 + ret void +} |