xref: /aosp_15_r20/external/llvm/test/CodeGen/AMDGPU/fcmp-cnd.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker;RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker;Not checking arguments 2 and 3 to CNDE, because they may change between
4*9880d681SAndroid Build Coastguard Worker;registers and literal.x depending on what the optimizer does.
5*9880d681SAndroid Build Coastguard Worker;CHECK: CNDE  T{{[0-9]+\.[XYZW], T[0-9]+\.[XYZW]}}
6*9880d681SAndroid Build Coastguard Worker
7*9880d681SAndroid Build Coastguard Workerdefine void @test(i32 addrspace(1)* %out, float addrspace(1)* %in) {
8*9880d681SAndroid Build Coastguard Workerentry:
9*9880d681SAndroid Build Coastguard Worker  %0 = load float, float addrspace(1)* %in
10*9880d681SAndroid Build Coastguard Worker  %cmp = fcmp oeq float %0, 0.000000e+00
11*9880d681SAndroid Build Coastguard Worker  %value = select i1 %cmp, i32 2, i32 3
12*9880d681SAndroid Build Coastguard Worker  store i32 %value, i32 addrspace(1)* %out
13*9880d681SAndroid Build Coastguard Worker  ret void
14*9880d681SAndroid Build Coastguard Worker}
15