Page MenuHomePhabricator

[PowerPC] Enhance the fast selection of fptoi & fptrunc instruction and clean up related asserts
ClosedPublic

Authored by ZhangKang on Feb 20 2019, 1:05 AM.

Details

Summary

Fast selection of llvm fptoi & fptrunc instructions is not handled well about VSX instruction support.

We'd use VSX float convert integer instruction instead of non-vsx float convert integer instruction if the operand register class is VSSRC or VSFRC because i32 and i64 are mapped to VSSRC and VSFRC correspondingly if VSX feature is opened.
For float trunc instruction, we do this silimar work like float convert integer instruction to try to use VSX instruction.

Diff Detail

Repository
rL LLVM

Event Timeline

ZhangKang created this revision.Feb 20 2019, 1:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 20 2019, 1:05 AM
jsji accepted this revision.Feb 22 2019, 7:59 AM

LGTM, except minor comments update.

llvm/lib/Target/PowerPC/PPCFastISel.cpp
1210 ↗(On Diff #187526)

We should update the comments here too.

1217 ↗(On Diff #187526)

We should update the comments here too.

This revision is now accepted and ready to land.Feb 22 2019, 7:59 AM
ZhangKang marked 2 inline comments as done.Feb 23 2019, 12:57 AM
ZhangKang updated this revision to Diff 188032.Feb 23 2019, 1:00 AM

Modify the comments to follow the reviewers' suggestions.

Have modifed the comments.

This revision was automatically updated to reflect the committed changes.