Hi, all I am trying to add "not" instruction support to PTX backend. I add the line below in PTXInstrInfo.td, defm NOT : PTX_LOGIC<"not", not>; But I get errors below, ------------------------------------------------------------------------------- Included from PTX.td:75: PTXInstrInfo.td:732:10: error: Value 'PTX_LOGIC::opnode' of type 'SDNode' is incompatible with initializer 'not' defm NOT : PTX_LOGIC<"not", not>; ^ llvm[3]: Building PTX.td subtarget information with tblgen Included from PTX.td:75: PTXInstrInfo.td:732:10: error: Value 'PTX_LOGIC::opnode' of type 'SDNode' is incompatible with initializer 'not' defm NOT : PTX_LOGIC<"not", not>; ^ llvm[3]: Building PTX.td assembly writer with tblgen Included from PTX.td:75: PTXInstrInfo.td:732:10: error: Value 'PTX_LOGIC::opnode' of type 'SDNode' is incompatible with initializer 'not' defm NOT : PTX_LOGIC<"not", not>; ^ ------------------------------------------------------------------------------- How do I fix those errors? I also see that multiclass PTX_LOGIC only handles 3 operand form, i.e., xor.pred d, a, b;. Should I add something to make PTX_LOGIC support 2 operand form? Thanks. Regards, chenwj -- Wei-Ren Chen (陳韋任) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667
Justin Holewinski
2011-May-08 14:31 UTC
[LLVMdev] [LLVMDev] Add not instruction to PTX backend
On Sun, May 8, 2011 at 2:41 AM, 陳韋任 <chenwj at iis.sinica.edu.tw> wrote:> Hi, all > > I am trying to add "not" instruction support to PTX backend. > I add the line below in PTXInstrInfo.td, > > defm NOT : PTX_LOGIC<"not", not>; > > But I get errors below, > > > ------------------------------------------------------------------------------- > Included from PTX.td:75: > PTXInstrInfo.td:732:10: error: Value 'PTX_LOGIC::opnode' of type 'SDNode' > is incompatible with initializer 'not' > defm NOT : PTX_LOGIC<"not", not>; > ^ > llvm[3]: Building PTX.td subtarget information with tblgen > Included from PTX.td:75: > PTXInstrInfo.td:732:10: error: Value 'PTX_LOGIC::opnode' of type 'SDNode' > is incompatible with initializer 'not' > defm NOT : PTX_LOGIC<"not", not>; > ^ > llvm[3]: Building PTX.td assembly writer with tblgen > Included from PTX.td:75: > PTXInstrInfo.td:732:10: error: Value 'PTX_LOGIC::opnode' of type 'SDNode' > is incompatible with initializer 'not' > defm NOT : PTX_LOGIC<"not", not>; > ^ > > ------------------------------------------------------------------------------- > > How do I fix those errors? > > I also see that multiclass PTX_LOGIC only handles 3 operand form, > i.e., xor.pred d, a, b;. Should I add something to make PTX_LOGIC > support 2 operand form? >We're been writing multiclasses for each unique type of instruction. The current PTX_LOGIC version is for 3-operand instructions. A new multiclass needs to be created for 2-operand logic instructions.> > Thanks. > > Regards, > chenwj > > -- > Wei-Ren Chen (陳韋任) > Computer Systems Lab, Institute of Information Science, > Academia Sinica, Taiwan (R.O.C.) > Tel:886-2-2788-3799 #1667 > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-- Thanks, Justin Holewinski -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110508/b52d724f/attachment.html>
Hi, Justin> We're been writing multiclasses for each unique type of instruction. The > current PTX_LOGIC version is for 3-operand instructions. A new multiclass > needs to be created for 2-operand logic instructions.I am trying to add a multiclass for 2-operand logic instructions. For example, multiclass PTX_LOGIC_2OP<string opcstr, SDNode opnode> { def ripreds : InstPTX<(outs Preds:$d), (ins Preds:$a), !strconcat(opcstr, ".pred\t$d, $a"), [(set Preds:$d, (opnode Preds:$a))]>; ... } But the error is still the same. Where else should I look into? Thanks. Regards, chenwj -- Wei-Ren Chen (陳韋任) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667
Reasonably Related Threads
- [LLVMdev] [LLVMDev] Add not instruction to PTX backend
- [LLVMdev] [LLVMDev] Add not instruction to PTX backend
- [LLVMdev] [LLVMDev] Add not instruction to PTX backend
- [LLVMdev] [LLVMDev] Add not instruction to PTX backend
- [LLVMdev] proposal: add macro expansion of for-loop to TableGen