This is an archive of the discontinued LLVM Phabricator instance.

[RISCV][Zfa] Fix fceil/ffloor codegen bugs
ClosedPublic

Authored by joshua-arch1 on Mar 21 2023, 4:54 AM.

Details

Summary

In https://reviews.llvm.org/D143982, I confused ceil and floor. Ceil should use fround instructions with 'rup' and floor should use 'rdn'.

Diff Detail

Event Timeline

joshua-arch1 created this revision.Mar 21 2023, 4:54 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 21 2023, 4:54 AM
joshua-arch1 requested review of this revision.Mar 21 2023, 4:54 AM
joshua-arch1 edited the summary of this revision. (Show Details)Mar 21 2023, 5:01 AM
craig.topper added inline comments.Mar 21 2023, 9:55 AM
llvm/lib/Target/RISCV/RISCVInstrInfoZfa.td
229

The float and half tests are updated, but I only see a .td change for double. Did you upload only part of the patch.

Also use -U99999 when uploading patches.

jrtc27 added inline comments.Mar 21 2023, 9:56 AM
llvm/lib/Target/RISCV/RISCVInstrInfoZfa.td
227

Also the formatting for these is wrong, it should be FPR64:$rs1

231

Can we give these names?

joshua-arch1 marked an inline comment as done.
craig.topper added inline comments.Mar 21 2023, 6:45 PM
llvm/lib/Target/RISCV/RISCVInstrInfoZfa.td
197

There shouldn't be a space after the : either

231

I will give them names in another patch.

Please add a description when you post a new diff to describe what changed.

joshua-arch1 edited the summary of this revision. (Show Details)Mar 21 2023, 6:58 PM
joshua-arch1 edited the summary of this revision. (Show Details)
This comment was removed by joshua-arch1.
This revision is now accepted and ready to land.Mar 21 2023, 7:03 PM

Remove all the space between FPR32/FPR64/FPR16 and the ':' as well as after the ':'

craig.topper retitled this revision from [RISCV][Zfa] Fix FROUND codegen bugs to [RISCV][Zfa] Fix fceil/ffloor codegen bugs.Mar 31 2023, 12:12 PM
craig.topper edited the summary of this revision. (Show Details)

I pre-committed the formatting change as a1786a7224d067ca1a7ccbd721e3dec7f10266dd. I will commit the rest of this with attribution to the patch author in a few minutes.

This revision was automatically updated to reflect the committed changes.