[llvm] r270375 - [x86, AVX] add test file to show vzeroupper pass excesses

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Sun May 22 12:55:54 PDT 2016


Author: spatel
Date: Sun May 22 14:55:48 2016
New Revision: 270375

URL: http://llvm.org/viewvc/llvm-project?rev=270375&view=rev
Log:
[x86, AVX] add test file to show vzeroupper pass excesses

Added:
    llvm/trunk/test/CodeGen/X86/vzero-excess.ll

Added: llvm/trunk/test/CodeGen/X86/vzero-excess.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/vzero-excess.ll?rev=270375&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/X86/vzero-excess.ll (added)
+++ llvm/trunk/test/CodeGen/X86/vzero-excess.ll Sun May 22 14:55:48 2016
@@ -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
+




More information about the llvm-commits mailing list