[llvm] [SandboxVec] Add a simple pack reuse pass (PR #141848)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 3 09:29:26 PDT 2025


================
@@ -179,13 +197,61 @@ class VecUtils {
   /// \Returns the first integer power of 2 that is <= Num.
   static unsigned getFloorPowerOf2(unsigned Num);
 
+  /// If \p I is the last instruction of a pack pattern, then this function
+  /// returns the instructions in the pack and the operands in the pack, else
+  /// returns nullopt.
+  static std::optional<
+      std::pair<SmallVector<Instruction *>, SmallVector<Value *>>>
----------------
vporpo wrote:

Makes sense, done.

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


More information about the llvm-commits mailing list