[llvm] ValueTracking: introduce llvm::isNotCrossLaneOperation (PR #112011)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 13 12:11:14 PDT 2024
================
@@ -4343,13 +4343,10 @@ static Value *simplifyWithOpReplaced(Value *V, Value *Op, Value *RepOp,
if (isa<PHINode>(I))
return nullptr;
- if (Op->getType()->isVectorTy()) {
+ if (Op->getType()->isVectorTy() && !isNotCrossLaneOperation(I))
// For vector types, the simplification must hold per-lane, so forbid
// potentially cross-lane operations like shufflevector.
----------------
nikic wrote:
nit: Move this comment above the if.
https://github.com/llvm/llvm-project/pull/112011
More information about the llvm-commits
mailing list