<div dir="ltr">Hi Dominique,<div><br></div><div>This is generally a frontend-specific list. You should email to the llvm-dev (<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>) list if you have questions about SelectionDAG.</div><div><br></div><div>Alex</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 24 July 2017 at 11:16, Dominique Torette via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple">
<div class="m_-335600902597178832WordSection1">
<p class="MsoNormal">Hi,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I’m trying to complete the lowering for a new microcontroller. I’m using LLVM 3.8.<u></u><u></u></p>
<p class="MsoNormal">For now this lowering crashes on ‘Store’ node, which is actually not yet defined.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I’ve tried to map the ISel ‘Store’ node to architecture specific instructions.<u></u><u></u></p>
<p class="MsoNormal">I’ve define the following semantic to my architecture specific instructions:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Monospace"> def MOVSUTO_SU_rr : CLPSUInst_rr<0b1000001100,<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Monospace"> <wbr> (ins SURegisterOperand:$RegA),<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Monospace"> <wbr> (outs SURegisterOperand:$RegB),<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Monospace"> <wbr>
</span><span lang="FR-BE" style="font-size:10.0pt;font-family:Monospace">[],<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="FR-BE" style="font-size:10.0pt;font-family:Monospace"> <wbr> "movsuto_su\t$RegA,$RegB","RR"<wbr>,<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="FR-BE" style="font-size:10.0pt;font-family:Monospace"> <wbr>
</span><span style="font-size:10.0pt;font-family:Monospace;color:#1a1a1a">[(store</span><span style="font-size:10.0pt;font-family:Monospace"> (i16 SURegisterOperand:$RegA), i16:$RegB)], NoItinerary><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Monospace"> {<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Monospace"> <wbr> bits<9> <wbr> RegA;<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Monospace"> <wbr> bits<9> <wbr> RegB;<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Monospace"><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Monospace"> <wbr> let Inst{19-11} = RegA;<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Monospace"> let Inst{8-0} = RegB;<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Monospace"> }<u></u><u></u></span></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Monospace">SURegisterOperand are 16 bits operands.</span><u></u><u></u></p>
<p class="MsoNormal">During the generation of ISelection matchers tables, I got the following assertion.<u></u><u></u></p>
<p class="MsoNormal">This assertion start to occur when the pattern is introduced on the
<span style="font-size:10.0pt;font-family:Monospace">MOVSUTO_SU_rr.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Monospace"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Monospace">How to avoid such assertion? What is a concrete type? According to the definition of SURegisterOperand, these are 16 bits signed integer.
</span><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">[ 33%] Building CLPGenDAGISel.inc...<u></u><u></u></p>
<p class="MsoNormal">llvm-tblgen: /home/dte/Projects/CLP/clp-<wbr>llvm/trunk/llvm-project/llvm/<wbr>utils/TableGen/<wbr>CodeGenDAGPatterns.h:74: llvm::MVT::SimpleValueType llvm::EEVT::TypeSet::<wbr>getConcrete() const: Assertion `isConcrete() && "Type isn't concrete yet"' failed.<u></u><u></u></p>
<p class="MsoNormal">#0 0x0000000000633741 llvm::sys::PrintStackTrace(<wbr>llvm::raw_ostream&) /home/dte/Projects/CLP/clp-<wbr>llvm/trunk/llvm-project/llvm/<wbr>lib/Support/Unix/Signals.inc:<wbr>322:0<u></u><u></u></p>
<p class="MsoNormal">#1 0x0000000000633abd PrintStackTraceSignalHandler(<wbr>void*) /home/dte/Projects/CLP/clp-<wbr>llvm/trunk/llvm-project/llvm/<wbr>lib/Support/Unix/Signals.inc:<wbr>380:0<u></u><u></u></p>
<p class="MsoNormal">#2 0x0000000000632242 llvm::sys::RunSignalHandlers() /home/dte/Projects/CLP/clp-<wbr>llvm/trunk/llvm-project/llvm/<wbr>lib/Support/Signals.cpp:44:0<u></u><u></u></p>
<p class="MsoNormal">#3 0x0000000000633259 SignalHandler(int) /home/dte/Projects/CLP/clp-<wbr>llvm/trunk/llvm-project/llvm/<wbr>lib/Support/Unix/Signals.inc:<wbr>210:0<u></u><u></u></p>
<p class="MsoNormal">#4 0x00000031fec0f790 __restore_rt (/lib64/libpthread.so.0+<wbr>0x31fec0f790)<u></u><u></u></p>
<p class="MsoNormal">#5 0x00000031fe832625 __GI_raise (/lib64/libc.so.6+<wbr>0x31fe832625)<u></u><u></u></p>
<p class="MsoNormal">#6 0x00000031fe833e05 __GI_abort (/lib64/libc.so.6+<wbr>0x31fe833e05)<u></u><u></u></p>
<p class="MsoNormal">#7 0x00000031fe82b74e __assert_fail_base (/lib64/libc.so.6+<wbr>0x31fe82b74e)<u></u><u></u></p>
<p class="MsoNormal">#8 0x00000031fe82b810 __GI___assert_perror_fail (/lib64/libc.so.6+<wbr>0x31fe82b810)<u></u><u></u></p>
<p class="MsoNormal">#9 0x000000000047b8fe llvm::EEVT::TypeSet::<wbr>getConcrete() const /home/dte/Projects/CLP/clp-<wbr>llvm/trunk/llvm-project/llvm/<wbr>utils/TableGen/<wbr>CodeGenDAGPatterns.h:75:0<u></u><u></u></p>
<p class="MsoNormal">#10 0x000000000047be57 llvm::TreePatternNode::<wbr>getType(unsigned int) const /home/dte/Projects/CLP/clp-<wbr>llvm/trunk/llvm-project/llvm/<wbr>utils/TableGen/<wbr>CodeGenDAGPatterns.h:371:0<u></u><u></u></p>
<p class="MsoNormal">#11 0x0000000000523c1d (anonymous namespace)::MatcherGen::<wbr>EmitResultInstructionAsOperand<wbr>(llvm::TreePatternNode const*, llvm::SmallVectorImpl<unsigned int>&) /home/dte/Projects/CLP/clp-<wbr>llvm/trunk/llvm-project/llvm/<wbr>utils/TableGen/<wbr>DAGISelMatcherGen.cpp:844:0<u></u><u></u></p>
<p class="MsoNormal">#12 0x0000000000524608 (anonymous namespace)::MatcherGen::<wbr>EmitResultOperand(llvm::<wbr>TreePatternNode const*, llvm::SmallVectorImpl<unsigned int>&) /home/dte/Projects/CLP/clp-<wbr>llvm/trunk/llvm-project/llvm/<wbr>utils/TableGen/<wbr>DAGISelMatcherGen.cpp:942:0<u></u><u></u></p>
<p class="MsoNormal">#13 0x0000000000524768 (anonymous namespace)::MatcherGen::<wbr>EmitResultCode() /home/dte/Projects/CLP/clp-<wbr>llvm/trunk/llvm-project/llvm/<wbr>utils/TableGen/<wbr>DAGISelMatcherGen.cpp:966:0<u></u><u></u></p>
<p class="MsoNormal">#14 0x0000000000524b26 llvm::ConvertPatternToMatcher(<wbr>llvm::PatternToMatch const&, unsigned int, llvm::CodeGenDAGPatterns const&) /home/dte/Projects/CLP/clp-<wbr>llvm/trunk/llvm-project/llvm/<wbr>utils/TableGen/<wbr>DAGISelMatcherGen.cpp:1021:0<u></u><u></u></p>
<p class="MsoNormal">#15 0x0000000000510f36 (anonymous namespace)::DAGISelEmitter::<wbr>run(llvm::raw_ostream&) /home/dte/Projects/CLP/clp-<wbr>llvm/trunk/llvm-project/llvm/<wbr>utils/TableGen/DAGISelEmitter.<wbr>cpp:153:0<u></u><u></u></p>
<p class="MsoNormal">#16 0x0000000000511089 llvm::EmitDAGISel(llvm::<wbr>RecordKeeper&, llvm::raw_ostream&) /home/dte/Projects/CLP/clp-<wbr>llvm/trunk/llvm-project/llvm/<wbr>utils/TableGen/DAGISelEmitter.<wbr>cpp:171:0<u></u><u></u></p>
<p class="MsoNormal">#17 0x00000000005c74fd (anonymous namespace)::LLVMTableGenMain(<wbr>llvm::raw_ostream&, llvm::RecordKeeper&) /home/dte/Projects/CLP/clp-<wbr>llvm/trunk/llvm-project/llvm/<wbr>utils/TableGen/TableGen.cpp:<wbr>129:0<u></u><u></u></p>
<p class="MsoNormal">#18 0x000000000065016c llvm::TableGenMain(char*, bool (*)(llvm::raw_ostream&, llvm::RecordKeeper&)) /home/dte/Projects/CLP/clp-<wbr>llvm/trunk/llvm-project/llvm/<wbr>lib/TableGen/Main.cpp:109:0<u></u><u></u></p>
<p class="MsoNormal">#19 0x00000000005c79d5 main /home/dte/Projects/CLP/clp-<wbr>llvm/trunk/llvm-project/llvm/<wbr>utils/TableGen/TableGen.cpp:<wbr>188:0<u></u><u></u></p>
<p class="MsoNormal">#20 0x00000031fe81ed5d __libc_start_main (/lib64/libc.so.6+<wbr>0x31fe81ed5d)<u></u><u></u></p>
<p class="MsoNormal">#21 0x0000000000404fb9 _start (/home/dte/Projects/CLP/build_<wbr>dir/bin/llvm-tblgen+0x404fb9)<u></u><u></u></p>
<p class="MsoNormal">Stack dump:<u></u><u></u></p>
<p class="MsoNormal">0. Program arguments: ../../../bin/llvm-tblgen -gen-dag-isel -I /home/dte/Projects/CLP/clp-<wbr>llvm/trunk/llvm-project/llvm/<wbr>lib/Target/CLP -I /home/dte/Projects/CLP/clp-<wbr>llvm/trunk/llvm-project/llvm/<wbr>lib/Target -I /home/dte/Projects/CLP/clp-<wbr>llvm/trunk/llvm-project/llvm/<wbr>include
/home/dte/Projects/CLP/clp-<wbr>llvm/trunk/llvm-project/llvm/<wbr>lib/Target/CLP/CLP.td -o /home/dte/Projects/CLP/build_<wbr>dir/lib/Target/CLP/<wbr>CLPGenDAGISel.inc.tmp
<u></u><u></u></p>
<p class="MsoNormal">/bin/sh: line 1: 82456 Aborted (core dumped) ../../../bin/llvm-tblgen -gen-dag-isel -I /home/dte/Projects/CLP/clp-<wbr>llvm/trunk/llvm-project/llvm/<wbr>lib/Target/CLP -I /home/dte/Projects/CLP/clp-<wbr>llvm/trunk/llvm-project/llvm/<wbr>lib/Target
-I /home/dte/Projects/CLP/clp-<wbr>llvm/trunk/llvm-project/llvm/<wbr>include /home/dte/Projects/CLP/clp-<wbr>llvm/trunk/llvm-project/llvm/<wbr>lib/Target/CLP/CLP.td -o /home/dte/Projects/CLP/build_<wbr>dir/lib/Target/CLP/<wbr>CLPGenDAGISel.inc.tmp<u></u><u></u></p>
<p class="MsoNormal">gmake[2]: *** [lib/Target/CLP/CLPGenDAGISel.<wbr>inc.tmp] Error 134<u></u><u></u></p>
<p class="MsoNormal">gmake[1]: *** [lib/Target/CLP/CMakeFiles/<wbr>CLPCommonTableGen.dir/all] Error 2<u></u><u></u></p>
<p class="MsoNormal">gmake: *** [all] Error 2<u></u><u></u></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><br>
<br>
<br>
<br>
<br>
<br>
<u></u><u></u></span></p>
<table class="m_-335600902597178832MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="536" style="width:402.0pt">
<tbody>
<tr>
<td style="padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><img width="536" height="49" id="m_-335600902597178832_x0000_i1025" src="http://www.spacebel.be/wp-content/uploads/2011/06/image-sign-sbp.jpg" alt="http://www.spacebel.be/wp-content/uploads/2011/06/image-sign-sbp.jpg"></span><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><u></u><u></u></span></p>
</td>
</tr>
<tr>
<td style="border:solid silver 1.0pt;padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal" align="center" style="text-align:center">
<b><span lang="FR-BE" style="font-size:10.0pt">Dominique Torette</span></b><span lang="FR-BE" style="font-size:10.0pt">
<br>
System Architect<br>
Rue des Chasseurs Ardennais - Liège Science Park - B-4031 Angleur <br>
Tel: <a href="tel:+32%204%20361%2081%2011" value="+3243618111" target="_blank">+32 (0) 4 361 81 11</a> - Fax: <a href="tel:+32%204%20361%2081%2020" value="+3243618120" target="_blank">+32 (0) 4 361 81 20</a> <br>
</span><span style="font-size:10.0pt"><a href="http://www.spacebel.be/" target="_blank"><span lang="FR-BE" style="color:blue">www.spacebel.be</span></a></span><span lang="FR-BE" style="font-size:12.0pt;font-family:"Times New Roman","serif""><u></u><u></u></span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><span lang="FR-BE"><u></u> <u></u></span></p>
</div>
<br clear="both">
------------------------------<wbr>------------------------------<wbr>------------------<br>
<br>
E-MAIL DISCLAIMER<br>
<br>
The present message may contain confidential and/or legally privileged information. If you are not the intended addressee and in case of a transmission error, please notify the sender immediately and destroy this E-mail. Disclosure, reproduction or distribution of this document and its possible attachments is strictly forbidden.<br>
<br>
SPACEBEL denies all liability for incomplete, improper, inaccurate, intercepted, (partly) destroyed, lost and/or belated transmission of the current information given that unencrypted electronic transmission cannot currently be guaranteed to be secure or error free.<br>
Upon request or in conformity with formal, contractual agreements, an originally signed hard copy will be sent to you to confirm the information contained in this E-mail.<br>
<br>
SPACEBEL denies all liability where E-mail is used for private use.<br>
<br>
SPACEBEL cannot be held responsible for possible viruses that might corrupt this message and/or your computer system.<br>
------------------------------<wbr>------------------------------<wbr>-------------------<br>
</div>
<br>______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>