<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 29, 2016 at 10:22 AM, Krzysztof Parzyszek via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="">On 1/28/2016 8:11 PM, Rail Shafigulin via llvm-dev wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Would anyone be able to figure out why this is happening? I can provide<br>
more code if needed.<br>
</blockquote>
<br></span>
The error message should show what types have been inferred so far.<br>
<br>
You can overcome this problem by specifying the exact type in the pattern, e.g. instead of Class:$Reg, have (i32 Class:$Reg).<br>
<br>
This happens when the value can have multiple types what can be represented in the same register class. For example, a 32-bit register could hold i32, v2i16, v4i8, etc. When tablegen cannot figure out which of those it's dealing with, it will complain.<span class=""><font color="#888888"><br>
<br>
-Krzysztof<br>
<br>
-- <br>
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</font></span></blockquote></div><br><br clear="all"></div><div class="gmail_extra">I think I understand it. But looks like I have everything labelled properly. Maybe I missed something. Here are more details:<br><br>defm SFEQ : SF<0x0, "l.sfeq", Escala_CC_EQ>;<br><br>multiclass SF<bits<5> op2Val, string asmstr, PatLeaf Cond> {<br> def _rr : SF_RR<op2Val, asmstr, Cond>;<br> def _ri : SF_RI<op2Val, asmstr, Cond>;<br>}<br><br>class SF_RR<bits<5> op2Val, string asmstr, PatLeaf Cond><br> : InstRR<0x9, (outs), (ins GPR:$rA, GPR:$rB),<br> !strconcat(asmstr, "\t$rA, $rB"),<br> [(Escalasetflag (i32 GPR:$rA), (i32 GPR:$rB), Cond)]> {<br> bits<5> op2;<br> bits<5> rA;<br> bits<5> rB;<br><br> let Inst{25-21} = op2;<br> let Inst{20-16} = rA;<br> let Inst{15-11} = rB;<br><br> let op2 = op2Val;<br>}<br><br>class SF_RI<bits<5> op2Val, string asmstr, PatLeaf Cond><br> : InstRI<0xf, (outs), (ins GPR:$rA, s16imm:$imm),<br> !strconcat(asmstr, "i\t$rA, $imm"),<br> [(Escalasetflag (i32 GPR:$rA), immSExt16:$imm, Cond)]> {<br> bits<5> op2;<br> bits<5> rA;<br> bits<16> imm;<br><br> let Inst{25-21} = op2;<br> let Inst{20-16} = rA;<br> let Inst{15-0} = imm;<br><br> let format = AFrm;<br> let op2 = op2Val;<br>}<br><br></div><div class="gmail_extra">I would appreciate any feedback.<br></div><div class="gmail_extra"> <br></div><div class="gmail_extra">-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Rail Shafigulin<br></div>Software Engineer <br>Esencia Technologies<br></div></div></div></div>
</div></div>