[PATCH] D114800: [PowerPC] Replace MFVSRLD with MFVSRD when the vector is symmetrical

Stefan Pintilie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 16 07:32:53 PST 2021


stefanp added a comment.

In D114800#3163072 <https://reviews.llvm.org/D114800#3163072>, @shchenz wrote:

> Can we fix this at the place where `MFVSRLD` is generated? (in DAG-ISEL?)

I see what you mean. This can be done in DAG-ISEL. 
However, there are a couple of reasons why I chose to do this here.

1. I think it is easier to do here and the code is simpler to understand. We are looking to replace `MFVSRLD` so we just look for that instruction and then replace it. In DAG ISEL we would have to first figure out which extract element node eventually gets turned into this instruction and then see if it can be replaced.
2. There are situations where the choice of preceding instructions matters to whether or not we can use the other doubleword. Again, it would be a situation where we would have to figure out what a node is turned into before deciding if the doubleword is symmetrical.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114800



More information about the llvm-commits mailing list