<div dir="ltr">Probably because there's also constant folding and canonicalization transforms usually at the beginning of the generic DAG combine. In general you probably want target combines to run after that. Is it possible to do your combine from the generic combined form? The other option is to add a TLI hook to disable the transform. We've got a quite a lot of those.<div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">~Craig</div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 9, 2020 at 7:05 PM Thomas Lively via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</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"><div dir="ltr">Hi llvm-dev,<div><br></div><div>I just tried to implement a target-specific dag combine to preempt a generic dag combine, and I was surprised to see that it didn't work because the generic dag combines are run first. Does anyone know the rationale for running the generic dag combines first? I would have expected the target dag combines to run first because they have more specific information about what combines will be useful.</div><div><br></div><div>Thanks,</div><div><br></div><div>Thomas</div></div>
_______________________________________________<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="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>