1 ; RUN: llc -aarch64-sve-vector-bits-min=256 < %s | FileCheck %s
3 target triple = "aarch64"
6 ; NOTE: SVE lowering for the BSP pseudoinst is not currently implemented, so we
7 ; don't currently expect the code below to lower to BSL/BIT/BIF. Once
8 ; this is implemented, this test will be fleshed out.
11 define <8 x i32> @fixed_bitselect_v8i32(<8 x i32>* %pre_cond_ptr, <8 x i32>* %left_ptr, <8 x i32>* %right_ptr) #0 {
12 ; CHECK-LABEL: fixed_bitselect_v8i32:
13 ; CHECK-NOT: bsl {{.*}}, {{.*}}, {{.*}}
14 ; CHECK-NOT: bit {{.*}}, {{.*}}, {{.*}}
15 ; CHECK-NOT: bif {{.*}}, {{.*}}, {{.*}}
17 %pre_cond = load <8 x i32>, <8 x i32>* %pre_cond_ptr
18 %left = load <8 x i32>, <8 x i32>* %left_ptr
19 %right = load <8 x i32>, <8 x i32>* %right_ptr
21 %neg_cond = sub <8 x i32> zeroinitializer, %pre_cond
22 %min_cond = add <8 x i32> %pre_cond, <i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1>
23 %left_bits_0 = and <8 x i32> %neg_cond, %left
24 %right_bits_0 = and <8 x i32> %min_cond, %right
25 %bsl0000 = or <8 x i32> %right_bits_0, %left_bits_0
26 ret <8 x i32> %bsl0000
29 attributes #0 = { "target-features"="+sve" }