[llvm-dev] Failure to match a DAG after a minor pattern change in a custom Target

Rail Shafigulin via llvm-dev llvm-dev at lists.llvm.org
Fri Mar 4 17:53:46 PST 2016


Thanks for the reply. I actually managed to figure it out before the
answer. You first post was correct. The issue was with the set SR:$rD. I
simply need to remove it.

Thanks for the help.

On Fri, Feb 26, 2016 at 6:31 AM, Krzysztof Parzyszek <
kparzysz at codeaurora.org> wrote:

> On 2/22/2016 1:50 PM, Rail Shafigulin wrote:
>
>> Would you mind showing how to make Esenciasetflag to actually set a
>> flag? I can't figure out the syntax.
>>
>
> Is the "setflag" instruction setting something in a special register (such
> as EFLAGS on x86)?  If so, then you can add "let Defs [xyz] in ..." to your
> .td definition of that instruction and leave the "set" out of the pattern.
>
> The type that you defined
>   def SDT_EsenciaSetFlag      : SDTypeProfile<0, 3, [SDTCisSameAs<0, 1>]>;
> indicates 0 return values, so it would match this approach.
>
> If the instructions is intended to actually produce a value that could be
> stored in an allocatable register, then you'd need to change the type to
> have 1 return value.  The selection pattern would likely work as is.
>
>
> -Krzysztof
>
>
> --
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted
> by The Linux Foundation
>



-- 
Rail Shafigulin
Software Engineer
Esencia Technologies
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160304/ed6ada2c/attachment.html>


More information about the llvm-dev mailing list