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

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Mon May 23 10:17:38 PDT 2016


Hi Quentin -
I wasn't sure if we have a policy on this, but I figured it was ok to add a
FIXME test showing current behavior since I've proposed a patch to fix it
just now. :)
http://reviews.llvm.org/D20529

On Mon, May 23, 2016 at 11:12 AM, Quentin Colombet <qcolombet at apple.com>
wrote:

>
> > On May 22, 2016, at 12:55 PM, Sanjay Patel via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
> >
> > 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
>
> Shouldn’t we use CHECK-NOT for the second vzeroupper and XFAIL the test
> for now.
>
> > +; 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
> > +
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160523/b665eddd/attachment.html>


More information about the llvm-commits mailing list