1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx -show-mc-encoding | FileCheck %s --check-prefix=AVX 3; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512vl -show-mc-encoding | FileCheck %s --check-prefix=AVX512VL 4 5define <4 x double> @test_x86_avx_vzeroall(<4 x double> %a, <4 x double> %b) { 6; AVX-LABEL: test_x86_avx_vzeroall: 7; AVX: # %bb.0: 8; AVX-NEXT: vaddpd %ymm1, %ymm0, %ymm0 # encoding: [0xc5,0xfd,0x58,0xc1] 9; AVX-NEXT: vmovupd %ymm0, {{[-0-9]+}}(%r{{[sb]}}p) # 32-byte Spill 10; AVX-NEXT: # encoding: [0xc5,0xfd,0x11,0x44,0x24,0xc8] 11; AVX-NEXT: vzeroall # encoding: [0xc5,0xfc,0x77] 12; AVX-NEXT: vmovups {{[-0-9]+}}(%r{{[sb]}}p), %ymm0 # 32-byte Reload 13; AVX-NEXT: # encoding: [0xc5,0xfc,0x10,0x44,0x24,0xc8] 14; AVX-NEXT: retq # encoding: [0xc3] 15; 16; AVX512VL-LABEL: test_x86_avx_vzeroall: 17; AVX512VL: # %bb.0: 18; AVX512VL-NEXT: vaddpd %ymm1, %ymm0, %ymm16 # encoding: [0x62,0xe1,0xfd,0x28,0x58,0xc1] 19; AVX512VL-NEXT: vzeroall # encoding: [0xc5,0xfc,0x77] 20; AVX512VL-NEXT: vmovapd %ymm16, %ymm0 # encoding: [0x62,0xb1,0xfd,0x28,0x28,0xc0] 21; AVX512VL-NEXT: retq # encoding: [0xc3] 22 %c = fadd <4 x double> %a, %b 23 call void @llvm.x86.avx.vzeroall() 24 ret <4 x double> %c 25} 26declare void @llvm.x86.avx.vzeroall() nounwind 27 28define <4 x double> @test_x86_avx_vzeroupper(<4 x double> %a, <4 x double> %b) { 29; AVX-LABEL: test_x86_avx_vzeroupper: 30; AVX: # %bb.0: 31; AVX-NEXT: vaddpd %ymm1, %ymm0, %ymm0 # encoding: [0xc5,0xfd,0x58,0xc1] 32; AVX-NEXT: vmovupd %ymm0, {{[-0-9]+}}(%r{{[sb]}}p) # 32-byte Spill 33; AVX-NEXT: # encoding: [0xc5,0xfd,0x11,0x44,0x24,0xc8] 34; AVX-NEXT: vzeroupper # encoding: [0xc5,0xf8,0x77] 35; AVX-NEXT: vmovups {{[-0-9]+}}(%r{{[sb]}}p), %ymm0 # 32-byte Reload 36; AVX-NEXT: # encoding: [0xc5,0xfc,0x10,0x44,0x24,0xc8] 37; AVX-NEXT: retq # encoding: [0xc3] 38; 39; AVX512VL-LABEL: test_x86_avx_vzeroupper: 40; AVX512VL: # %bb.0: 41; AVX512VL-NEXT: vaddpd %ymm1, %ymm0, %ymm16 # encoding: [0x62,0xe1,0xfd,0x28,0x58,0xc1] 42; AVX512VL-NEXT: vzeroupper # encoding: [0xc5,0xf8,0x77] 43; AVX512VL-NEXT: vmovapd %ymm16, %ymm0 # encoding: [0x62,0xb1,0xfd,0x28,0x28,0xc0] 44; AVX512VL-NEXT: retq # encoding: [0xc3] 45 %c = fadd <4 x double> %a, %b 46 call void @llvm.x86.avx.vzeroupper() 47 ret <4 x double> %c 48} 49declare void @llvm.x86.avx.vzeroupper() nounwind 50