diff options
author | Alex Bradbury <asb@lowrisc.org> | 2019-02-01 03:46:28 +0000 |
---|---|---|
committer | Alex Bradbury <asb@lowrisc.org> | 2019-02-01 03:46:28 +0000 |
commit | b70fae7bdc704aa037e9a5c42212e8713091f746 (patch) | |
tree | 7ebcb873690526f22c856775487e1ad398c54406 /include/llvm/CodeGen | |
parent | ff5877ff783cacf858e3f9cf8504af9eaeef8edb (diff) | |
download | llvm-b70fae7bdc704aa037e9a5c42212e8713091f746.tar.gz |
[SelectionDAG] Support promotion of the FPOWI integer operand
For targets where i32 is not a legal type (e.g. 64-bit RISC-V),
LegalizeIntegerTypes must promote the integer operand of ISD::FPOWI. As this
is a signed value, this should be sign-extended.
This patch enables all tests in test/CodeGen/RISCVfloat-intrinsics.ll for
RV64, as prior to this patch that file couldn't be compiled for RV64 due to an
assertion when performing codegen for fpowi.
Differential Revision: https://reviews.llvm.org/D54574
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352832 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r-- | include/llvm/CodeGen/ISDOpcodes.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/ISDOpcodes.h b/include/llvm/CodeGen/ISDOpcodes.h index b664f7e2010..8f9957eff9c 100644 --- a/include/llvm/CodeGen/ISDOpcodes.h +++ b/include/llvm/CodeGen/ISDOpcodes.h @@ -579,7 +579,9 @@ namespace ISD { /// is often a storage-only type but has native conversions. FP16_TO_FP, FP_TO_FP16, - /// Perform various unary floating-point operations inspired by libm. + /// Perform various unary floating-point operations inspired by libm. For + /// FPOWI, the result is undefined if if the integer operand doesn't fit + /// into 32 bits. FNEG, FABS, FSQRT, FCBRT, FSIN, FCOS, FPOWI, FPOW, FLOG, FLOG2, FLOG10, FEXP, FEXP2, FCEIL, FTRUNC, FRINT, FNEARBYINT, FROUND, FFLOOR, |