<div dir="ltr"><div><div><div>Hi again,<br><br></div>I figured out the problem. Actually there is no problem with the TabelGen implementing instructions with no operand.<br></div>The problem with my code was that the class for my no-operand-operator was inhereted from a class which a a variable was assigned to some bit range that was no used/initiated in the new class. I don't know exactly the nature of the problem, but when I accidentally changed the super class, I was able to define my instruction with no operand. As the compiler was telling me, there was like a flattening issue!!<br></div>Just wanted to tell this if anyone in the future is going to face it!<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 9, 2015 at 5:54 PM, Sky Flyer <span dir="ltr"><<a href="mailto:skylake007@googlemail.com" target="_blank">skylake007@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>I found A solution.<br></div><br></div>Like the CLREX solution of AArch64.<br></div>I define an InstAlias, then add a default value to the "clr" instruction (i.e. clr 0) and then change may base calss to match this.<br><br></div>Thanks everyone.<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 6, 2015 at 8:21 PM, 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On 11/6/2015 11:35 AM, Sky Flyer via llvm-dev wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Guys, I stuck at this point. Could you please give me a hint how to<br>
solve this problem without touching the LLVM backbone?!<br>
Why LLVM doesn't let me define an instruction consisting of an operator<br>
with no operand?<br>
</blockquote>
<br>
<br></span>
Could you try it without the pattern?  I.e. just this:<span><br>
<br>
     class TestInst<string opc, string asmstr, dag oops, dag iops,<br>
                    list<dag> pattern> : Instruction { ... }<br>
<br></span>
     class ALU<string opc> : TestInst<opc, "", (outs), (ins)>;<br>
<br>
See if you get the same error.  I suspect it has to do with the intrinsic itself, not the instruction definition.<span><font color="#888888"><br>
<br>
-Krzysztof<br>
<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></div>
</div></div></blockquote></div><br></div>