[PATCH] D91279: [PowerPC] DForm instructions should be preferred when using zero register

ChenZheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 18 17:29:55 PST 2020


shchenz added a comment.

> After a discussion with the group I would like to correct what I said in the previous post.
> There already is a plan to do this in ISel in a different patch. The reason we also want to do this optimization here is to try to catch situations where this pattern is not known in ISel and only appears after other optimizations later on. Ideally we do not want to have any situations where the XForm exists in the final binary and having this final check in the PreEmitPeephole should ensure that. Basically, we also want to do this check here to find anything that ISel may have missed.

Good to know we have a plan to fix such kind of issue in ISEL. For the patterns generated after ISEL, I also think adding them in `convertToImmediateForm` is better. That function is called pre and post RA. It handles several patterns there, maybe we just need to add a new function like `transformZeroInputXformToImmForm` in that function?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91279



More information about the llvm-commits mailing list