xref: /aosp_15_r20/external/llvm/test/CodeGen/X86/pr18014.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=x86_64-linux-pc -mcpu=penryn | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker; Ensure PSRAD is generated as the condition is consumed by both PADD and
4*9880d681SAndroid Build Coastguard Worker; BLENDVPS. PAND requires all bits setting properly.
5*9880d681SAndroid Build Coastguard Worker
6*9880d681SAndroid Build Coastguard Workerdefine <4 x i32> @foo(<4 x i32>* %p, <4 x i1> %cond, <4 x i32> %v1, <4 x i32> %v2, <4 x i32> %v3) {
7*9880d681SAndroid Build Coastguard Worker  %sext_cond = sext <4 x i1> %cond to <4 x i32>
8*9880d681SAndroid Build Coastguard Worker  %t1 = add <4 x i32> %v1, %sext_cond
9*9880d681SAndroid Build Coastguard Worker  %t2 = select <4 x i1> %cond, <4 x i32> %v1, <4 x i32> %v2
10*9880d681SAndroid Build Coastguard Worker  store <4 x i32> %t2, <4 x i32>* %p
11*9880d681SAndroid Build Coastguard Worker  ret <4 x i32> %t1
12*9880d681SAndroid Build Coastguard Worker; CHECK: foo
13*9880d681SAndroid Build Coastguard Worker; CHECK: pslld
14*9880d681SAndroid Build Coastguard Worker; CHECK: psrad
15*9880d681SAndroid Build Coastguard Worker; CHECK: ret
16*9880d681SAndroid Build Coastguard Worker}
17