diff options
Diffstat (limited to 'test/CodeGen/X86/mfence.ll')
-rw-r--r-- | test/CodeGen/X86/mfence.ll | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/CodeGen/X86/mfence.ll b/test/CodeGen/X86/mfence.ll new file mode 100644 index 0000000..a1b2283 --- /dev/null +++ b/test/CodeGen/X86/mfence.ll @@ -0,0 +1,20 @@ +; RUN: llc < %s -march=x86 -mattr=+sse2 | not grep sfence +; RUN: llc < %s -march=x86 -mattr=+sse2 | not grep lfence +; RUN: llc < %s -march=x86 -mattr=+sse2 | grep mfence + + +declare void @llvm.memory.barrier( i1 , i1 , i1 , i1 , i1) + +define void @test() { + call void @llvm.memory.barrier( i1 true, i1 true, i1 false, i1 false, i1 true) + call void @llvm.memory.barrier( i1 true, i1 false, i1 true, i1 false, i1 true) + call void @llvm.memory.barrier( i1 true, i1 false, i1 false, i1 true, i1 true) + + call void @llvm.memory.barrier( i1 true, i1 true, i1 true, i1 false, i1 true) + call void @llvm.memory.barrier( i1 true, i1 true, i1 false, i1 true, i1 true) + call void @llvm.memory.barrier( i1 true, i1 false, i1 true, i1 true, i1 true) + + call void @llvm.memory.barrier( i1 true, i1 true, i1 true, i1 true , i1 true) + call void @llvm.memory.barrier( i1 false, i1 false, i1 false, i1 false , i1 true) + ret void +} |