xref: /aosp_15_r20/external/llvm/test/Assembler/half-conv.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: opt < %s -O3 -S | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker; RUN: verify-uselistorder %s
3*9880d681SAndroid Build Coastguard Worker; Testing half to float conversion.
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Workerdefine float @abc() nounwind {
6*9880d681SAndroid Build Coastguard Workerentry:
7*9880d681SAndroid Build Coastguard Worker  %a = alloca half, align 2
8*9880d681SAndroid Build Coastguard Worker  %.compoundliteral = alloca float, align 4
9*9880d681SAndroid Build Coastguard Worker  store half 0xH4C8D, half* %a, align 2
10*9880d681SAndroid Build Coastguard Worker  %tmp = load half, half* %a, align 2
11*9880d681SAndroid Build Coastguard Worker  %conv = fpext half %tmp to float
12*9880d681SAndroid Build Coastguard Worker; CHECK: 0x4032340000000000
13*9880d681SAndroid Build Coastguard Worker  ret float %conv
14*9880d681SAndroid Build Coastguard Worker}
15