This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Define the vfsqrt RVV intrinsics
ClosedPublic

Authored by evandro on Dec 22 2020, 9:57 PM.

Details

Summary

Define the vfsqrt IR intrinsics for the respective V instructions.

Authored-by: Roger Ferrer Ibanez <rofirrim@gmail.com>
Co-Authored-by: Evandro Menezes <evandro.menezes@sifive.com>

Diff Detail

Event Timeline

evandro created this revision.Dec 22 2020, 9:57 PM
evandro requested review of this revision.Dec 22 2020, 9:57 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 22 2020, 9:57 PM
HsiangKai added inline comments.Dec 23 2020, 8:46 AM
llvm/include/llvm/IR/IntrinsicsRISCV.td
346

There is no .vx form for vfsqrt. There should be no need to specify ExtendOperand.

352

vector_in should only be vector type in this case. We could replace llvm_any_ty with LLVMMatchType<0>.

355

There is no .vx form for vfsqrt. There should be no need to specify ExtendOperand.

evandro marked 3 inline comments as done.Dec 23 2020, 6:02 PM
evandro updated this revision to Diff 313642.Dec 23 2020, 6:21 PM

Address @HsiangKai's comments.

khchen added inline comments.Dec 23 2020, 6:45 PM
llvm/test/CodeGen/RISCV/rvv/vfsqrt-rv32.ll
14

please update tests without undef input.
https://reviews.llvm.org/D93013?id=310804#inline-868720

craig.topper added inline comments.Dec 24 2020, 12:04 PM
llvm/include/llvm/IR/IntrinsicsRISCV.td
342

Is this class unused?

evandro marked 2 inline comments as done.Jan 4 2021, 5:13 PM
evandro updated this revision to Diff 314483.Jan 4 2021, 5:17 PM
craig.topper added inline comments.Jan 4 2021, 7:50 PM
llvm/test/CodeGen/RISCV/rvv/vfsqrt-rv32.ll
513

We're missing tests for double in the rv32 file.

evandro added inline comments.Jan 5 2021, 7:35 AM
llvm/test/CodeGen/RISCV/rvv/vfsqrt-rv32.ll
513

Ain't it the case for virtually all other RVV intrinsics so far?

craig.topper added inline comments.Jan 5 2021, 9:19 AM
llvm/test/CodeGen/RISCV/rvv/vfsqrt-rv32.ll
513

Yes. I didn’t catch it until after a bunch of patches had been committed. Some of the most recent patches have it right.

Would you rather fix this patch now or wait and fix all the tests together?

evandro added inline comments.Jan 6 2021, 1:54 PM
llvm/test/CodeGen/RISCV/rvv/vfsqrt-rv32.ll
513

I'd rather do it later, if at all possible.

This revision is now accepted and ready to land.Jan 6 2021, 1:55 PM
This revision was automatically updated to reflect the committed changes.