[PowerPC] [PowerPC] Enhance the fast selection of fptoi & fptrunc instruction and...
authorKang Zhang <shkzhang@cn.ibm.com>
Mon, 25 Feb 2019 02:46:16 +0000 (02:46 +0000)
committerKang Zhang <shkzhang@cn.ibm.com>
Mon, 25 Feb 2019 02:46:16 +0000 (02:46 +0000)
commit4faa4090c9e2c4b662475c7b5eb76d28849456b3
tree33028d47447f7107b389483dc1e266b2c1f3fb25
parent25e690273ac15efd5b2afa3ee5b3bde36913ca33
[PowerPC] [PowerPC] Enhance the fast selection of fptoi & fptrunc instruction and clean up related asserts

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
openeded.
For float trunc instruction, we do this silimar work like float convert integer
instruction to try to use VSX instruction.

Reviewed By: jsji

Differential Revision: https://reviews.llvm.org/D58430

llvm-svn: 354762
llvm/lib/Target/PowerPC/PPCFastISel.cpp
llvm/test/CodeGen/PowerPC/fast-isel-rsp.ll [new file with mode: 0644]
llvm/test/CodeGen/PowerPC/pr26180.ll