[mlir][LLVMIR] Add support for translating FCmp & FP constants
authorMin-Yih Hsu <minyihh@uci.edu>
Thu, 21 Apr 2022 00:46:16 +0000 (17:46 -0700)
committerMin-Yih Hsu <minyihh@uci.edu>
Mon, 2 May 2022 23:22:35 +0000 (16:22 -0700)
commite927a336a58b93ea2b2cddfc511e531695273d8d
treeac48099840b5ccb73a793a4f44bbcbd7924a21e1
parent19fb52cbfec7fcb013b9354df4d069a03a7cd3f6
[mlir][LLVMIR] Add support for translating FCmp & FP constants

This patch add supports for translating FCmp and more kinds of FP
constants in addition to 32 & 64-bit ones. However, we can't express
ppc_fp128 constants right now because the semantics for its underlying
APFloat is `S_PPCDoubleDouble` but mlir::FloatType doesn't support such
semantics right now.

Differential Revision: https://reviews.llvm.org/D124630
mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp
mlir/test/Target/LLVMIR/Import/basic.ll