summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm-c/Target.h
diff options
context:
space:
mode:
authorAlex Bradbury <asb@lowrisc.org>2018-12-13 10:49:05 +0000
committerAlex Bradbury <asb@lowrisc.org>2018-12-13 10:49:05 +0000
commit919f5fb8ca5f24ec791725a498b0e37fa70bc55a (patch)
tree4146429091d15161e9d013960b3f1c976061eb6f /llvm/include/llvm-c/Target.h
parentdfe861087d0d93540d8711f6052b2ab281a258d5 (diff)
downloadbcm5719-llvm-919f5fb8ca5f24ec791725a498b0e37fa70bc55a.tar.gz
bcm5719-llvm-919f5fb8ca5f24ec791725a498b0e37fa70bc55a.zip
[RISCV] Add support for the various RISC-V FMA instruction variants
Adds support for the various RISC-V FMA instructions (fmadd, fmsub, fnmsub, fnmadd). The criteria for choosing whether a fused add or subtract is used, as well as whether the product is negated or not, is whether some of the arguments to the llvm.fma.* intrinsic are negated or not. In the tests, extraneous fadd instructions were added to avoid the negation being performed using a xor trick, which prevented the proper FMA forms from being selected and thus tested. The FMA instruction patterns might seem incorrect (e.g., fnmadd: -rs1 * rs2 - rs3), but they should be correct. The misleading names were inherited from MIPS, where the negation happens after computing the sum. The llvm.fmuladd.* intrinsics still do not generate RISC-V FMA instructions, as that depends on TargetLowering::isFMAFasterthanFMulAndFAdd. Some comments in the test files about what type of instructions are there tested were updated, to better reflect the current content of those test files. Differential Revision: https://reviews.llvm.org/D54205 Patch by Luís Marques. llvm-svn: 349023
Diffstat (limited to 'llvm/include/llvm-c/Target.h')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud