2017-02-02 12:17:12 +08:00
|
|
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
2017-10-23 22:17:59 +08:00
|
|
|
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx | FileCheck %s --check-prefix=CHECK --check-prefix=AVX
|
|
|
|
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512vl | FileCheck %s --check-prefix=CHECK --check-prefix=AVX512VL
|
2010-08-12 01:39:23 +08:00
|
|
|
|
2017-02-02 12:17:15 +08:00
|
|
|
define <4 x double> @test_x86_avx_vzeroall(<4 x double> %a, <4 x double> %b) {
|
2017-02-07 12:10:57 +08:00
|
|
|
; AVX-LABEL: test_x86_avx_vzeroall:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX: # BB#0:
|
2017-02-07 12:10:57 +08:00
|
|
|
; AVX-NEXT: vaddpd %ymm1, %ymm0, %ymm0
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX-NEXT: vmovupd %ymm0, -{{[0-9]+}}(%rsp) # 32-byte Spill
|
2017-02-07 12:10:57 +08:00
|
|
|
; AVX-NEXT: vzeroall
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX-NEXT: vmovups -{{[0-9]+}}(%rsp), %ymm0 # 32-byte Reload
|
2017-10-23 22:17:59 +08:00
|
|
|
; AVX-NEXT: ret{{[l|q]}}
|
2017-02-07 12:10:57 +08:00
|
|
|
;
|
|
|
|
; AVX512VL-LABEL: test_x86_avx_vzeroall:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX512VL: # BB#0:
|
2017-02-07 12:10:57 +08:00
|
|
|
; AVX512VL-NEXT: vaddpd %ymm1, %ymm0, %ymm16
|
|
|
|
; AVX512VL-NEXT: vzeroall
|
|
|
|
; AVX512VL-NEXT: vmovapd %ymm16, %ymm0
|
2017-10-23 22:17:59 +08:00
|
|
|
; AVX512VL-NEXT: ret{{[l|q]}}
|
2017-02-02 12:17:15 +08:00
|
|
|
%c = fadd <4 x double> %a, %b
|
|
|
|
call void @llvm.x86.avx.vzeroall()
|
|
|
|
ret <4 x double> %c
|
|
|
|
}
|
|
|
|
declare void @llvm.x86.avx.vzeroall() nounwind
|
2010-08-12 01:39:23 +08:00
|
|
|
|
2017-02-02 12:17:15 +08:00
|
|
|
define <4 x double> @test_x86_avx_vzeroupper(<4 x double> %a, <4 x double> %b) {
|
2017-02-07 12:10:57 +08:00
|
|
|
; AVX-LABEL: test_x86_avx_vzeroupper:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX: # BB#0:
|
2017-02-07 12:10:57 +08:00
|
|
|
; AVX-NEXT: vaddpd %ymm1, %ymm0, %ymm0
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX-NEXT: vmovupd %ymm0, -{{[0-9]+}}(%rsp) # 32-byte Spill
|
2017-02-07 12:10:57 +08:00
|
|
|
; AVX-NEXT: vzeroupper
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX-NEXT: vmovups -{{[0-9]+}}(%rsp), %ymm0 # 32-byte Reload
|
2017-10-23 22:17:59 +08:00
|
|
|
; AVX-NEXT: ret{{[l|q]}}
|
2017-02-07 12:10:57 +08:00
|
|
|
;
|
|
|
|
; AVX512VL-LABEL: test_x86_avx_vzeroupper:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX512VL: # BB#0:
|
2017-02-07 12:10:57 +08:00
|
|
|
; AVX512VL-NEXT: vaddpd %ymm1, %ymm0, %ymm16
|
|
|
|
; AVX512VL-NEXT: vzeroupper
|
|
|
|
; AVX512VL-NEXT: vmovapd %ymm16, %ymm0
|
2017-10-23 22:17:59 +08:00
|
|
|
; AVX512VL-NEXT: ret{{[l|q]}}
|
2017-02-02 12:17:15 +08:00
|
|
|
%c = fadd <4 x double> %a, %b
|
|
|
|
call void @llvm.x86.avx.vzeroupper()
|
|
|
|
ret <4 x double> %c
|
|
|
|
}
|
|
|
|
declare void @llvm.x86.avx.vzeroupper() nounwind
|