<div dir="ltr">Re: Do they really need to be chained with each other or anything else<div>Yes. For 2 reasons. Our architecture lowers udivmem into something with 1 producer and 2 consumers. Reason 1) neither the producers nor the consumers must get reordered. Reason 2) one of the consumers might be missing (either the div or mod consumer might not be present. Yet we need to keep the consuming instruction with side effects. The only way to achieve is to add it into the chain. Problem here: divmod does not have a chain.</div><div><br></div><div>I scanned other architectures, haven't found an example where somebody creates a chain out of thin air. Do you know any?</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 16, 2020 at 10:54 AM Tim Northover <<a href="mailto:t.p.northover@gmail.com">t.p.northover@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, 16 Jul 2020 at 16:44, Hendrik Greving via llvm-dev<br>
<<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
> But then the new nodes are not chained with respect to other nodes, or not chained with respect to each other, in case there are several UDIVREM.<br>
<br>
Do they really need to be chained with each other or anything else?<br>
The case I know of is when they get lowered to a libcall. That libcall<br>
has effects that mean it needs a chain of some kind, but it doesn't<br>
really matter in any other way where in the basic block it happens.<br>
<br>
As long as it's after its inputs have been created and before its<br>
outputs are consumed, everything is fine. And that's handled by the<br>
normal value operands.<br>
<br>
Cheers.<br>
<br>
Tim.<br>
</blockquote></div>