This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Enhance the fast selection of cmp instruction and clean up related asserts
ClosedPublic

Authored by wuzish on Jan 22 2019, 7:12 PM.

Details

Summary

Fast selection of llvm icmp and fcmp instructions is not handled well about VSX instruction support.

We'd use VSX float comparison instruction instead of non-vsx float comparison 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.

If the target does not have corresponding VSX instruction comparison for some type, just copy VSX-related register to common float register class and use non-vsx comparison instruction.

Diff Detail

Repository
rL LLVM

Event Timeline

wuzish created this revision.Jan 22 2019, 7:12 PM

Make patch up-to-date.

gentle pin 😄

hfinkel accepted this revision.Jan 24 2019, 8:56 AM

LGTM

This revision is now accepted and ready to land.Jan 24 2019, 8:56 AM
This revision was automatically updated to reflect the committed changes.