From 9c865333476b6b3390df55a9192599cb20f2971d Mon Sep 17 00:00:00 2001 From: Justin Holewinski Date: Thu, 28 Apr 2011 00:19:55 +0000 Subject: [PATCH] PTX: support for select - selection of SELP instruction - new selp.ll test Patch by Dan Bailey git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130357 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/PTX/PTXInstrInfo.td | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lib/Target/PTX/PTXInstrInfo.td b/lib/Target/PTX/PTXInstrInfo.td index 9863abee296..1ac9d3f3dc8 100644 --- a/lib/Target/PTX/PTXInstrInfo.td +++ b/lib/Target/PTX/PTXInstrInfo.td @@ -483,6 +483,13 @@ multiclass PTX_SETP_FP; } +multiclass PTX_SELP { + def rr + : InstPTX<(outs RC:$r), (ins Preds:$a, RC:$b, RC:$c), + !strconcat("selp.", regclsname, "\t$r, $b, $c, $a"), + [(set RC:$r, (select Preds:$a, RC:$b, RC:$c))]>; +} + multiclass PTX_LD { def rr32 : InstPTX<(outs RC:$d), (ins MEMri32:$a), @@ -703,6 +710,14 @@ defm SETPLEf64 : PTX_SETP_FP; defm SETPGTf64 : PTX_SETP_FP; defm SETPGEf64 : PTX_SETP_FP; +// .selp + +defm PTX_SELPu16 : PTX_SELP; +defm PTX_SELPu32 : PTX_SELP; +defm PTX_SELPu64 : PTX_SELP; +defm PTX_SELPf32 : PTX_SELP; +defm PTX_SELPf64 : PTX_SELP; + ///===- Logic and Shift Instructions --------------------------------------===// defm SHL : INT3ntnc<"shl.b", PTXshl>;