[all-commits] [llvm/llvm-project] dd1f97: [VectorCombine] Fix infinite loop in foldShuffleTo...
Jinsong Ji via All-commits
all-commits at lists.llvm.org
Fri Jul 24 06:09:13 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: dd1f97501758ccf5952f862f46f0ba15cbd23dcf
https://github.com/llvm/llvm-project/commit/dd1f97501758ccf5952f862f46f0ba15cbd23dcf
Author: Jinsong Ji <jinsong.ji at intel.com>
Date: 2026-07-24 (Fri, 24 Jul 2026)
Changed paths:
M llvm/lib/Transforms/Vectorize/VectorCombine.cpp
A llvm/test/Transforms/VectorCombine/X86/shuffletoidentity-infinite-loop.ll
Log Message:
-----------
[VectorCombine] Fix infinite loop in foldShuffleToIdentity (#211717)
PR #211508 ("foldShuffleToIdentity - ensure we push any created
instructions to the WorkList") started re-queueing every instruction
created by generateNewInstTree onto the VectorCombine worklist. When the
regenerated tree contains a bitcast, re-queueing the bitcast's operand
lets foldBitcastShuffle sink the bitcast back into a shuffle(bitcast),
which foldShuffleToIdentity then re-matches as the same superfluous
identity. On a widen/concat shuffle chain feeding a bitcast the two
folds
ping-pong and the pass never reaches a fixed point (observed as an opt
-O3 hang/timeout).
Keep the WorkList threading from PR #211508 (it enables further folds,
e.g. the improved intrinsics_minmax and two_concats cases) but don't
re-queue the operand of a regenerated bitcast, which is the only push
that feeds the foldBitcastShuffle <-> foldShuffleToIdentity loop.
Add an X86 regression test that previously looped and now terminates.
Co-Authored-By: Claude Opus 4.8 <noreply at anthropic.com>
Co-authored-by: Claude Opus 4.8 <noreply at anthropic.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list