diff options
| author | Sanjay Patel <spatel@rotateright.com> | 2016-05-22 19:55:48 +0000 |
|---|---|---|
| committer | Sanjay Patel <spatel@rotateright.com> | 2016-05-22 19:55:48 +0000 |
| commit | f71fc951738221cf3ae8fa647832bd5a360ed04d (patch) | |
| tree | 4ff6ea6e2b539e0cd8a97b40dab350dbc1fb4cbd /llvm/test/CodeGen/X86/vzero-excess.ll | |
| parent | 6c51f5aca87ec187acb939c57c170ba0b1dd0612 (diff) | |
| download | bcm5719-llvm-f71fc951738221cf3ae8fa647832bd5a360ed04d.tar.gz bcm5719-llvm-f71fc951738221cf3ae8fa647832bd5a360ed04d.zip | |
[x86, AVX] add test file to show vzeroupper pass excesses
llvm-svn: 270375
Diffstat (limited to 'llvm/test/CodeGen/X86/vzero-excess.ll')
| -rw-r--r-- | llvm/test/CodeGen/X86/vzero-excess.ll | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/vzero-excess.ll b/llvm/test/CodeGen/X86/vzero-excess.ll new file mode 100644 index 00000000000..4bc110dc6de --- /dev/null +++ b/llvm/test/CodeGen/X86/vzero-excess.ll @@ -0,0 +1,43 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py +; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx | FileCheck %s + +; FIXME: The vzeroupper added by the VZeroUpperInserter pass is unnecessary in these tests. + +define <8 x float> @zeroupper(<8 x float> %x) nounwind { +; CHECK-LABEL: zeroupper: +; CHECK: # BB#0: +; CHECK-NEXT: subq $56, %rsp +; CHECK-NEXT: vmovups %ymm0, (%rsp) # 32-byte Spill +; CHECK-NEXT: vzeroupper +; CHECK-NEXT: vzeroupper +; CHECK-NEXT: callq the_unknown +; CHECK-NEXT: vmovups (%rsp), %ymm0 # 32-byte Reload +; CHECK-NEXT: addq $56, %rsp +; CHECK-NEXT: retq +; + call void @llvm.x86.avx.vzeroupper() + call void @the_unknown() + ret <8 x float> %x +} + +define <8 x float> @zeroall(<8 x float> %x) nounwind { +; CHECK-LABEL: zeroall: +; CHECK: # BB#0: +; CHECK-NEXT: subq $56, %rsp +; CHECK-NEXT: vmovups %ymm0, (%rsp) # 32-byte Spill +; CHECK-NEXT: vzeroall +; CHECK-NEXT: vzeroupper +; CHECK-NEXT: callq the_unknown +; CHECK-NEXT: vmovups (%rsp), %ymm0 # 32-byte Reload +; CHECK-NEXT: addq $56, %rsp +; CHECK-NEXT: retq +; + call void @llvm.x86.avx.vzeroall() + call void @the_unknown() + ret <8 x float> %x +} + +declare void @llvm.x86.avx.vzeroupper() nounwind readnone +declare void @llvm.x86.avx.vzeroall() nounwind readnone +declare void @the_unknown() nounwind + |

