[llvm] [X86] Prevent legalization cycles in lane-permute shuffle lowering (PR #224265)

Evgenii Kudriashov via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 17 06:25:29 PDT 2026


================
@@ -15762,9 +15762,7 @@ static SDValue lowerShuffleAsLanePermuteAndPermute(
   /// Attempts to find a sublane permute with the given size
   /// that gets all elements into their target lanes.
   ///
-  /// If successful, fills CrossLaneMask and InLaneMask and returns true.
-  /// If unsuccessful, returns false and may overwrite InLaneMask.
-  auto getSublanePermute = [&](int NumSublanes) -> SDValue {
+  auto getSublanePermute = [&](int NumSublanes, bool &SameMask) -> SDValue {
----------------
e-kud wrote:

Maybe clarify the return value including `SameMask`?

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


More information about the llvm-commits mailing list