<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 19, 2016 at 6:10 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 2/18/2016 6:01 PM, Rail Shafigulin via llvm-dev wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
[(set SR:$rD, (Esenciasetflag (i32 GPR:$rA), (i32<br>
immSExt16:$imm), (i32 Cond)))]> {<br>
</blockquote>
<br></span>
I suspect that the "set SR:$rD" is the problem here. The Esenciasetflag does not have any values that can be assigned to a<br>
register, so it's probably this part that causes the pattern to fail.<br></blockquote><div><br></div><div>Would you mind showing how to make Esenciasetflag to actually set a flag? I can't figure out the syntax. <br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
Tablegen creates a xxxGenDAGISel.inc file in your target's build directory. The "index" numbers that the debugging info shows correspond to the numbers in that file. Here's an example from HexagonGenDAGISel.inc:<br>
<br>
/*28*/ OPC_Scope, 88|128,3/*472*/, /*->503*/ // 3 children in Scope<br>
/*31*/ OPC_MoveChild, 1,<br>
/*33*/ OPC_CheckOpcode, TARGET_VAL(ISD::ADD),<br>
/*36*/ OPC_RecordChild0, // #2 = $base<br>
/*37*/ OPC_RecordChild1, // #3 = $offset<br>
/*38*/ OPC_MoveChild, 1,<br>
/*40*/ OPC_CheckOpcode, TARGET_VAL(ISD::Constant),<br>
/*43*/ OPC_Scope, 65, /*->110*/ // 7 children in Scope<br>
/*45*/ OPC_CheckPredicate, 0, // Predicate_u32ImmPred<br>
/*47*/ OPC_MoveParent,<br>
/*48*/ OPC_CheckType, MVT::i32,<br>
<br>
When the matcher says "false predicate at index 123", you can look at the line marked with /*123*/ and see exactly what predicate it was checking. This helps immensely with solving such problems.<span class="HOEnZb"><font color="#888888"><br>
<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"><br>-- <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>