1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+avx | FileCheck %s 3 4define <8 x i32> @select00(i32 %a, <8 x i32> %b) nounwind { 5; CHECK-LABEL: select00: 6; CHECK: ## BB#0: 7; CHECK-NEXT: vxorps %ymm1, %ymm1, %ymm1 8; CHECK-NEXT: cmpl $255, %edi 9; CHECK-NEXT: je LBB0_2 10; CHECK-NEXT: ## BB#1: 11; CHECK-NEXT: vmovaps %ymm0, %ymm1 12; CHECK-NEXT: LBB0_2: 13; CHECK-NEXT: vxorps %ymm1, %ymm0, %ymm0 14; CHECK-NEXT: retq 15 %cmpres = icmp eq i32 %a, 255 16 %selres = select i1 %cmpres, <8 x i32> zeroinitializer, <8 x i32> %b 17 %res = xor <8 x i32> %b, %selres 18 ret <8 x i32> %res 19} 20 21define <4 x i64> @select01(i32 %a, <4 x i64> %b) nounwind { 22; CHECK-LABEL: select01: 23; CHECK: ## BB#0: 24; CHECK-NEXT: vxorps %ymm1, %ymm1, %ymm1 25; CHECK-NEXT: cmpl $255, %edi 26; CHECK-NEXT: je LBB1_2 27; CHECK-NEXT: ## BB#1: 28; CHECK-NEXT: vmovaps %ymm0, %ymm1 29; CHECK-NEXT: LBB1_2: 30; CHECK-NEXT: vxorps %ymm1, %ymm0, %ymm0 31; CHECK-NEXT: retq 32 %cmpres = icmp eq i32 %a, 255 33 %selres = select i1 %cmpres, <4 x i64> zeroinitializer, <4 x i64> %b 34 %res = xor <4 x i64> %b, %selres 35 ret <4 x i64> %res 36} 37 38