[PATCH] D57078: [PowerPC] Enhance the fast selection of cmp instruction and clean up related asserts

Zixuan Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 22 19:12:05 PST 2019


wuzish created this revision.
wuzish added reviewers: hfinkel, nemanjai, jsji.
Herald added subscribers: llvm-commits, kbarton, hiraditya.

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.


Repository:
  rL LLVM

https://reviews.llvm.org/D57078

Files:
  llvm/lib/Target/PowerPC/PPCFastISel.cpp
  llvm/test/CodeGen/PowerPC/fast-isel-cmp-imm.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57078.183017.patch
Type: text/x-patch
Size: 9055 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190123/881eec44/attachment.bin>


More information about the llvm-commits mailing list