Skip to content
This repository has been archived by the owner on Apr 23, 2020. It is now read-only.

Commit

Permalink
[X86] Add scheduling tests for AVX1 256-bit zero-idioms. NFC
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342726 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Andrea Di Biagio authored and Andrea Di Biagio committed Sep 21, 2018
1 parent da1fb72 commit 3ce8ac0
Showing 1 changed file with 84 additions and 0 deletions.
84 changes: 84 additions & 0 deletions test/CodeGen/X86/avx-schedule.ll
Original file line number Diff line number Diff line change
Expand Up @@ -5424,6 +5424,90 @@ define void @test_zeroupper() {
call void @llvm.x86.avx.vzeroupper()
ret void
}

define void @test_avx256_zero_idioms() {
; GENERIC-LABEL: test_avx256_zero_idioms:
; GENERIC: # %bb.0:
; GENERIC-NEXT: #APP
; GENERIC-NEXT: vxorps %ymm0, %ymm0, %ymm0 # sched: [1:1.00]
; GENERIC-NEXT: vxorpd %ymm1, %ymm1, %ymm1 # sched: [1:1.00]
; GENERIC-NEXT: vandnps %ymm2, %ymm2, %ymm2 # sched: [1:1.00]
; GENERIC-NEXT: vandnpd %ymm3, %ymm3, %ymm3 # sched: [1:1.00]
; GENERIC-NEXT: #NO_APP
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; SANDY-LABEL: test_avx256_zero_idioms:
; SANDY: # %bb.0:
; SANDY-NEXT: #APP
; SANDY-NEXT: vxorps %ymm0, %ymm0, %ymm0 # sched: [1:1.00]
; SANDY-NEXT: vxorpd %ymm1, %ymm1, %ymm1 # sched: [1:1.00]
; SANDY-NEXT: vandnps %ymm2, %ymm2, %ymm2 # sched: [1:1.00]
; SANDY-NEXT: vandnpd %ymm3, %ymm3, %ymm3 # sched: [1:1.00]
; SANDY-NEXT: #NO_APP
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_avx256_zero_idioms:
; HASWELL: # %bb.0:
; HASWELL-NEXT: #APP
; HASWELL-NEXT: vxorps %ymm0, %ymm0, %ymm0 # sched: [1:1.00]
; HASWELL-NEXT: vxorpd %ymm1, %ymm1, %ymm1 # sched: [1:1.00]
; HASWELL-NEXT: vandnps %ymm2, %ymm2, %ymm2 # sched: [1:1.00]
; HASWELL-NEXT: vandnpd %ymm3, %ymm3, %ymm3 # sched: [1:1.00]
; HASWELL-NEXT: #NO_APP
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_avx256_zero_idioms:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: #APP
; BROADWELL-NEXT: vxorps %ymm0, %ymm0, %ymm0 # sched: [1:1.00]
; BROADWELL-NEXT: vxorpd %ymm1, %ymm1, %ymm1 # sched: [1:1.00]
; BROADWELL-NEXT: vandnps %ymm2, %ymm2, %ymm2 # sched: [1:1.00]
; BROADWELL-NEXT: vandnpd %ymm3, %ymm3, %ymm3 # sched: [1:1.00]
; BROADWELL-NEXT: #NO_APP
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_avx256_zero_idioms:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: #APP
; SKYLAKE-NEXT: vxorps %ymm0, %ymm0, %ymm0 # sched: [1:0.33]
; SKYLAKE-NEXT: vxorpd %ymm1, %ymm1, %ymm1 # sched: [1:0.33]
; SKYLAKE-NEXT: vandnps %ymm2, %ymm2, %ymm2 # sched: [1:0.33]
; SKYLAKE-NEXT: vandnpd %ymm3, %ymm3, %ymm3 # sched: [1:0.33]
; SKYLAKE-NEXT: #NO_APP
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_avx256_zero_idioms:
; SKX: # %bb.0:
; SKX-NEXT: #APP
; SKX-NEXT: vxorps %ymm0, %ymm0, %ymm0 # sched: [1:0.33]
; SKX-NEXT: vxorpd %ymm1, %ymm1, %ymm1 # sched: [1:0.33]
; SKX-NEXT: vandnps %ymm2, %ymm2, %ymm2 # sched: [1:0.33]
; SKX-NEXT: vandnpd %ymm3, %ymm3, %ymm3 # sched: [1:0.33]
; SKX-NEXT: #NO_APP
; SKX-NEXT: retq # sched: [7:1.00]
;
; BTVER2-LABEL: test_avx256_zero_idioms:
; BTVER2: # %bb.0:
; BTVER2-NEXT: #APP
; BTVER2-NEXT: vxorps %ymm0, %ymm0, %ymm0 # sched: [1:1.00]
; BTVER2-NEXT: vxorpd %ymm1, %ymm1, %ymm1 # sched: [1:1.00]
; BTVER2-NEXT: vandnps %ymm2, %ymm2, %ymm2 # sched: [1:1.00]
; BTVER2-NEXT: vandnpd %ymm3, %ymm3, %ymm3 # sched: [1:1.00]
; BTVER2-NEXT: #NO_APP
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_avx256_zero_idioms:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: #APP
; ZNVER1-NEXT: vxorps %ymm0, %ymm0, %ymm0 # sched: [1:0.25]
; ZNVER1-NEXT: vxorpd %ymm1, %ymm1, %ymm1 # sched: [1:0.25]
; ZNVER1-NEXT: vandnps %ymm2, %ymm2, %ymm2 # sched: [1:0.25]
; ZNVER1-NEXT: vandnpd %ymm3, %ymm3, %ymm3 # sched: [1:0.25]
; ZNVER1-NEXT: #NO_APP
; ZNVER1-NEXT: retq # sched: [1:0.50]
call void asm sideeffect "vxorps %ymm0, %ymm0, %ymm0\0Avxorpd %ymm1, %ymm1, %ymm1\0Avandnps %ymm2, %ymm2, %ymm2\0Avandnpd %ymm3, %ymm3, %ymm3", ""()
ret void
}
declare void @llvm.x86.avx.vzeroupper() nounwind

!0 = !{i32 1}

0 comments on commit 3ce8ac0

Please sign in to comment.