]> granicus.if.org Git - llvm/commit
[SelectionDAG] Support promotion of the FPOWI integer operand
authorAlex Bradbury <asb@lowrisc.org>
Fri, 1 Feb 2019 03:46:28 +0000 (03:46 +0000)
committerAlex Bradbury <asb@lowrisc.org>
Fri, 1 Feb 2019 03:46:28 +0000 (03:46 +0000)
commitb70fae7bdc704aa037e9a5c42212e8713091f746
tree7ebcb873690526f22c856775487e1ad398c54406
parentff5877ff783cacf858e3f9cf8504af9eaeef8edb
[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
include/llvm/CodeGen/ISDOpcodes.h
lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
lib/CodeGen/SelectionDAG/LegalizeTypes.h
test/CodeGen/RISCV/float-intrinsics.ll