This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Peak through BITCAST in isUsedByReturnOnly
ClosedPublic

Authored by luke on Jan 30 2023, 9:59 AM.

Details

Summary

A follow up to 47b1f8362aa409b591b5e9c8a9ff0e3e1d76ed9c,
This covers some more cases on soft-float ABIs with the f/d extension.
I left the TODO in as there is still the case where we need to handle rv32i without f/d, but that looks like it requires changes to SelectionDAGLegalize::ExpandFPLibCall

Diff Detail

Event Timeline

luke created this revision.Jan 30 2023, 9:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 30 2023, 9:59 AM
luke requested review of this revision.Jan 30 2023, 9:59 AM
reames requested changes to this revision.Jan 30 2023, 10:03 AM
reames added a subscriber: reames.

Can you update the review description to be more specific? The current text sounds like you're adding new libcalls, but you're really just peeking through a bitcast.

llvm/lib/Target/RISCV/RISCVISelLowering.cpp
13271

Move the bitcast check above the comment please?

13276

The comparison here is non-idiomatic. Use != instead.

This revision now requires changes to proceed.Jan 30 2023, 10:03 AM
luke added inline comments.Jan 30 2023, 10:05 AM
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
13276

Whoops, this was left in from an earlier version, will remove

luke updated this revision to Diff 493344.Jan 30 2023, 10:09 AM

Address comments, redo description

luke marked 2 inline comments as done.Jan 30 2023, 10:09 AM
luke retitled this revision from [RISCV] Tailcall some more libcalls on soft-float ABIs to [RISCV] Peak through BITCAST in isUsedByReturnOnly.
luke edited the summary of this revision. (Show Details)
reames accepted this revision.Jan 30 2023, 10:15 AM

LGTM

This revision is now accepted and ready to land.Jan 30 2023, 10:15 AM
asb accepted this revision.Jan 30 2023, 10:51 AM

LGTM, thanks!

s/Peak/Peek/ in the title

llvm/lib/Target/RISCV/RISCVISelLowering.cpp
13265–13269
jrtc27 added inline comments.Jan 30 2023, 11:04 AM
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
13265–13269

Never mind, that goes the wrong way...

luke added inline comments.Jan 30 2023, 3:38 PM
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
13265–13269

Didn't know that method existed, looks handy.

luke updated this revision to Diff 493439.Jan 30 2023, 3:39 PM

Fix commit message typo

This revision was landed with ongoing or failed builds.Jan 30 2023, 3:41 PM
This revision was automatically updated to reflect the committed changes.