[llvm] [IA]: Construct (de)interleave4 out of (de)interleave2 (PR #89276)

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 21 06:47:17 PDT 2024


================
@@ -16585,17 +16585,87 @@ bool AArch64TargetLowering::lowerInterleavedStore(StoreInst *SI,
   return true;
 }
 
+bool getDeinterleavedValues(Value *DI,
+                            SmallVectorImpl<Instruction *> &DeinterleavedValues) {
+  if (!DI->hasNUsesOrMore(2))
----------------
paulwalker-arm wrote:

Is the "OrMore" part important or can this just be `hasNUses(2)`?  I'm thinking if there are other users then we'll not be able to delete the instructions and thus might not gain anything from performing the transformation.

To further this point, the code that follows assumes the first uses will be the extracts you're looking for, which is perfectly fine and expected, but does suggest you only need to care about an exact use count.

https://github.com/llvm/llvm-project/pull/89276


More information about the llvm-commits mailing list