[PATCH] D149083: [PowerPC] Optimize VPERM and fix code order for swapping vector operands on LE

Maryam Moghadas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 8 12:24:32 PDT 2023


maryammo added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:10238
       NeedSwap = !NeedSwap;
     }
   }
----------------
stefanp wrote:
> Now that the swap has been moved down should this also be moved down? Or at least part of it?
> I ask because I've noticed that there are a number of tests where a new `vmr` has been introduced and I'm wondering if that's why.
In the following code section (line 10286), it uses the `NeedSwap` to adjust the mask, so this single-use operand swap needs to happen before that. 
You are right, there are new `vmr`s, they seem to be needed based on the new vector operand order in the `xxperm` instruction. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149083



More information about the llvm-commits mailing list