llvm-project
9e8a0fec - [VectorCombine] Check call targets when folding deinterleave/interleave pairs (#219116)

Commit
58 days ago
[VectorCombine] Check call targets when folding deinterleave/interleave pairs (#219116) Instruction::isSameOperationAs() intentionally compares operation shape and special state without requiring operand identity. For CallBase instructions, this means calls to different targets with otherwise compatible signatures can compare as equivalent. This caused VectorCombine::foldDeinterleaveInterleavePair() to treat same-signature intrinsics such as llvm.smax and llvm.smin as the same operation and incorrectly fold them into a single widened call. Add an opt-in Instruction::CompareCallTargets operation-equivalence flag. When requested, isSameOperationAs() additionally requires CallBase::getCalledOperand() to match. Existing callers retain the current behavior unless they explicitly request call-target comparison. Update VectorCombine to use the new flag when comparing operations on deinterleaved chains. Add direct unit coverage for the new flag and preserve the existing VectorCombine regression coverage. Fixes #218162.
Author
Parents
Loading