[PATCH] D80485: [DAGCombiner][PowerPC][AArch64] Remove isMulhCheaperThanMulShift TLI hook. Use isOperationLegal directly instead.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 26 00:30:20 PDT 2020


craig.topper added a comment.

In D80485#2053574 <https://reviews.llvm.org/D80485#2053574>, @amyk wrote:

> Hi! I should have made it more clear in the revision, but my intention for adding the `isMulhCheaperThanMulShift` TLI hook was also for it to be used with the DAG Combine in https://reviews.llvm.org/D78272.
>
> That patch has the DAG Combine in PPC only right now. After receiving some comments on it, I was thinking of putting this DAG combine into the target independent code instead. I was only going to enable it only on PPC first by calling the `isMulhCheaperThanMulShift` TLI hook in the combine since only PPC has an implementation of the function. I see that without the TLI hook, making the DAG combine target independent would allow it to run on all targets, which would result in some LIT failures on other targets.
>
> Do you have any thoughts regarding this? I hope I have my made intentions more clear.


Thanks for the clarification. I'll go ahead and extract the AArch64 change here since it should be correct regardless. I'll hold on to this until after D78272 <https://reviews.llvm.org/D78272> is moved to DAG combine and we can revisit.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80485/new/

https://reviews.llvm.org/D80485





More information about the llvm-commits mailing list