diff options
author | Nadav Rotem <nrotem@apple.com> | 2012-09-02 12:10:19 +0000 |
---|---|---|
committer | Nadav Rotem <nrotem@apple.com> | 2012-09-02 12:10:19 +0000 |
commit | 9f40cb32ac31283f8636d516e7b10f3ad921955c (patch) | |
tree | 975488b92abdc8d73e2313554cff5e927e5f48f7 /lib/Target/ARM/ARMISelLowering.h | |
parent | 7de7078933292b0487f1f39f539bece922e3dde5 (diff) |
Not all targets have efficient ISel code generation for select instructions.
For example, the ARM target does not have efficient ISel handling for vector
selects with scalar conditions. This patch adds a TLI hook which allows the
different targets to report which selects are supported well and which selects
should be converted to CF duting codegen prepare.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163093 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMISelLowering.h')
-rw-r--r-- | lib/Target/ARM/ARMISelLowering.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMISelLowering.h b/lib/Target/ARM/ARMISelLowering.h index 13b83de85d..757c68ee37 100644 --- a/lib/Target/ARM/ARMISelLowering.h +++ b/lib/Target/ARM/ARMISelLowering.h @@ -257,6 +257,11 @@ namespace llvm { virtual const char *getTargetNodeName(unsigned Opcode) const; + virtual bool isSelectSupported(SelectSupportKind Kind) const { + // ARM does not support scalar condition selects on vectors. + return (Kind != ScalarCondVectorVal); + } + /// getSetCCResultType - Return the value type to use for ISD::SETCC. virtual EVT getSetCCResultType(EVT VT) const; |