Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fmadd.s/.d implementation #44

Open
rtcw50 opened this issue Jun 27, 2017 · 0 comments
Open

fmadd.s/.d implementation #44

rtcw50 opened this issue Jun 27, 2017 · 0 comments

Comments

@rtcw50
Copy link

rtcw50 commented Jun 27, 2017

I take it from other comments in the issues list that pull requests aren't being reviewed/merged, so I'd like to present some changes that implement fmadd.s/.d code generation to any that are interested.

The code is available at
https://github.com/rtcw50/riscv-llvm (branch riscv-trunk on this fork)
https://github.com/rtcw50/riscv-clang(branch riscv-trunk on this fork)

The clang code makes -ffp-contract=on the default (it can be disabled either with #pragma FP_CONTRACT OFF or -ffp-contract=off). This allows the fma intrinsic to be generated by default, lowered to ISD:FMA, and subsequently codegen'd to fmadd.

A few tests added to test/CodeGen/RISCV to test the presence or absence of fmadd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant