xref: /aosp_15_r20/external/llvm/test/CodeGen/AMDGPU/anyext.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=amdgcn -mcpu=verde -verify-machineinstrs | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=amdgcn -mcpu=tonga -verify-machineinstrs | FileCheck %s
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: {{^}}anyext_i1_i32:
5*9880d681SAndroid Build Coastguard Worker; CHECK: v_cndmask_b32_e64
6*9880d681SAndroid Build Coastguard Workerdefine void @anyext_i1_i32(i32 addrspace(1)* %out, i32 %cond) {
7*9880d681SAndroid Build Coastguard Workerentry:
8*9880d681SAndroid Build Coastguard Worker  %0 = icmp eq i32 %cond, 0
9*9880d681SAndroid Build Coastguard Worker  %1 = zext i1 %0 to i8
10*9880d681SAndroid Build Coastguard Worker  %2 = xor i8 %1, -1
11*9880d681SAndroid Build Coastguard Worker  %3 = and i8 %2, 1
12*9880d681SAndroid Build Coastguard Worker  %4 = zext i8 %3 to i32
13*9880d681SAndroid Build Coastguard Worker  store i32 %4, i32 addrspace(1)* %out
14*9880d681SAndroid Build Coastguard Worker  ret void
15*9880d681SAndroid Build Coastguard Worker}
16