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>;