Duncan Sands
2012-Jun-30 12:22 UTC
[LLVMdev] [NVPTX] Backend failure in LegalizeDAG due to unimplemented expand in target lowering
Hi Dmitry,> So instead of setOperationAction(ISD::STORE, MVT::i1, Expand); one > should probably do setOperationAction(ISD::STORE, MVT::i1, Custom); > and implement it in NVPTXTargetLowering::LowerOperation. > > But this issue makes a good point about the code efficiency: I suspect > such expansion will be very ugly in terms of performance. Probably we > can do much better if bool would use i32 instead of i1. I don't know > how to do that, though. Is it possible?did you declare i1 to be an illegal type? If so, you shouldn't get any stores of i1 at this stage (you may get trunc stores to i1, but that is different). Ciao, Duncan.> > Anyway, if this is a defect, then it's a blocker for us, and we'd much > appreciate a fix. > > - D. > > 2012/6/29 Eli Friedman <eli.friedman at gmail.com>: >> On Fri, Jun 29, 2012 at 2:11 PM, Dmitry N. Mikushin <maemarcus at gmail.com> wrote: >>> Hi again, >>> >>> Kind people on #llvm helped me to utilize bugpoint to reduce the >>> previously submitted test case. For record, it code be done with the >>> following command: >>> >>> $ bugpoint -llc-safe test.ll >>> >>> The resulting IR is attached, and it is crashing in the same way. Is >>> it a valid code? >> >> Looks like a bug in the NVPTXISelLowering.cpp: it has >> "setOperationAction(ISD::STORE, MVT::i1, Expand);", but the legalizer >> doesn't know how to handle that. >> >> -Eli > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
Dmitry N. Mikushin
2012-Jun-30 14:13 UTC
[LLVMdev] [NVPTX] Backend failure in LegalizeDAG due to unimplemented expand in target lowering
Hi Duncan,> did you declare i1 to be an illegal type?No. How? 2012/6/30 Duncan Sands <baldrick at free.fr>:> Hi Dmitry, >> So instead of setOperationAction(ISD::STORE, MVT::i1, Expand); one >> should probably do setOperationAction(ISD::STORE, MVT::i1, Custom); >> and implement it in NVPTXTargetLowering::LowerOperation. >> >> But this issue makes a good point about the code efficiency: I suspect >> such expansion will be very ugly in terms of performance. Probably we >> can do much better if bool would use i32 instead of i1. I don't know >> how to do that, though. Is it possible? > > did you declare i1 to be an illegal type? If so, you shouldn't get any > stores of i1 at this stage (you may get trunc stores to i1, but that is > different). > > Ciao, Duncan. > >> >> Anyway, if this is a defect, then it's a blocker for us, and we'd much >> appreciate a fix. >> >> - D. >> >> 2012/6/29 Eli Friedman <eli.friedman at gmail.com>: >>> On Fri, Jun 29, 2012 at 2:11 PM, Dmitry N. Mikushin <maemarcus at gmail.com> wrote: >>>> Hi again, >>>> >>>> Kind people on #llvm helped me to utilize bugpoint to reduce the >>>> previously submitted test case. For record, it code be done with the >>>> following command: >>>> >>>> $ bugpoint -llc-safe test.ll >>>> >>>> The resulting IR is attached, and it is crashing in the same way. Is >>>> it a valid code? >>> >>> Looks like a bug in the NVPTXISelLowering.cpp: it has >>> "setOperationAction(ISD::STORE, MVT::i1, Expand);", but the legalizer >>> doesn't know how to handle that. >>> >>> -Eli >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Duncan Sands
2012-Jun-30 17:21 UTC
[LLVMdev] [NVPTX] Backend failure in LegalizeDAG due to unimplemented expand in target lowering
Hi Dmitry,>> did you declare i1 to be an illegal type? > > No. How?I think it will be considered illegal if you don't add it to any register class. Ciao, Duncan.> > 2012/6/30 Duncan Sands <baldrick at free.fr>: >> Hi Dmitry, >>> So instead of setOperationAction(ISD::STORE, MVT::i1, Expand); one >>> should probably do setOperationAction(ISD::STORE, MVT::i1, Custom); >>> and implement it in NVPTXTargetLowering::LowerOperation. >>> >>> But this issue makes a good point about the code efficiency: I suspect >>> such expansion will be very ugly in terms of performance. Probably we >>> can do much better if bool would use i32 instead of i1. I don't know >>> how to do that, though. Is it possible? >> >> did you declare i1 to be an illegal type? If so, you shouldn't get any >> stores of i1 at this stage (you may get trunc stores to i1, but that is >> different). >> >> Ciao, Duncan. >> >>> >>> Anyway, if this is a defect, then it's a blocker for us, and we'd much >>> appreciate a fix. >>> >>> - D. >>> >>> 2012/6/29 Eli Friedman <eli.friedman at gmail.com>: >>>> On Fri, Jun 29, 2012 at 2:11 PM, Dmitry N. Mikushin <maemarcus at gmail.com> wrote: >>>>> Hi again, >>>>> >>>>> Kind people on #llvm helped me to utilize bugpoint to reduce the >>>>> previously submitted test case. For record, it code be done with the >>>>> following command: >>>>> >>>>> $ bugpoint -llc-safe test.ll >>>>> >>>>> The resulting IR is attached, and it is crashing in the same way. Is >>>>> it a valid code? >>>> >>>> Looks like a bug in the NVPTXISelLowering.cpp: it has >>>> "setOperationAction(ISD::STORE, MVT::i1, Expand);", but the legalizer >>>> doesn't know how to handle that. >>>> >>>> -Eli >>> _______________________________________________ >>> LLVM Developers mailing list >>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >>> >> >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Seemingly Similar Threads
- [LLVMdev] [NVPTX] Backend failure in LegalizeDAG due to unimplemented expand in target lowering
- [LLVMdev] [NVPTX] Backend failure in LegalizeDAG due to unimplemented expand in target lowering
- [LLVMdev] [NVPTX] Backend failure in LegalizeDAG due to unimplemented expand in target lowering
- [LLVMdev] [NVPTX] Backend failure in LegalizeDAG due to unimplemented expand in target lowering
- [LLVMdev] [NVPTX] Backend failure in LegalizeDAG due to unimplemented expand in target lowering