[llvm-bugs] [Bug 27823] New: [X86][AVX] Calling vzeroall or vzeroupper causes a second vzeroupper to be emitted

via llvm-bugs llvm-bugs at lists.llvm.org
Fri May 20 05:54:50 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=27823

            Bug ID: 27823
           Summary: [X86][AVX] Calling vzeroall or vzeroupper causes a
                    second vzeroupper to be emitted
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: llvm-dev at redking.me.uk
                CC: llvm-bugs at lists.llvm.org, spatel+llvm at rotateright.com
    Classification: Unclassified

The second vzeroupper is completely superfluous (and incredibly expensive) in
both cases:

define void @test_mm256_zeroall() {
; X32-LABEL: test_mm256_zeroall:
; X32:       # BB#0:
; X32-NEXT:    vzeroall
; X32-NEXT:    vzeroupper
; X32-NEXT:    retl
;
; X64-LABEL: test_mm256_zeroall:
; X64:       # BB#0:
; X64-NEXT:    vzeroall
; X64-NEXT:    vzeroupper
; X64-NEXT:    retq
  call void @llvm.x86.avx.vzeroall()
  ret void
}
declare void @llvm.x86.avx.vzeroall() nounwind readnone

define void @test_mm256_zeroupper() {
; X32-LABEL: test_mm256_zeroupper:
; X32:       # BB#0:
; X32-NEXT:    vzeroupper
; X32-NEXT:    vzeroupper
; X32-NEXT:    retl
;
; X64-LABEL: test_mm256_zeroupper:
; X64:       # BB#0:
; X64-NEXT:    vzeroupper
; X64-NEXT:    vzeroupper
; X64-NEXT:    retq
  call void @llvm.x86.avx.vzeroupper()
  ret void
}
declare void @llvm.x86.avx.vzeroupper() nounwind readnone

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160520/4ae5059f/attachment-0001.html>


More information about the llvm-bugs mailing list