[PowerPC] Implement the isSelectSupported() target hook
authorKang Zhang <shkzhang@cn.ibm.com>
Thu, 20 Dec 2018 06:19:59 +0000 (06:19 +0000)
committerKang Zhang <shkzhang@cn.ibm.com>
Thu, 20 Dec 2018 06:19:59 +0000 (06:19 +0000)
commitca8db48974835e12bc8506f45032d175bfec2e76
tree3438bd1e740540942ca1abeb427dc93fa8baa725
parentbd788ce5db2e6933c7f4d370cec4bdaa3a8e7c72
[PowerPC] Implement the isSelectSupported() target hook

Summary:
PowerPC has scalar selects (isel) and vector mask selects (xxsel). But PowerPC
does not have vector CR selects, PowerPC does not support scalar condition
selects on vectors.
In addition to implementing this hook, isSelectSupported() should return false
when the SelectSupportKind is ScalarCondVectorVal, so that predictable selects
are converted into branch sequences.

Reviewed By: steven.zhang,  hfinkel

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

llvm-svn: 349727
llvm/lib/Target/PowerPC/PPCISelLowering.h
llvm/test/CodeGen/PowerPC/select-i1-vs-i1.ll