Skip to content

Commit 74e8e34

Browse files
committed
ValueTracking, InstSimplify: fix nits
1 parent 831c877 commit 74e8e34

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

llvm/include/llvm/Analysis/ValueTracking.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -791,8 +791,7 @@ bool onlyUsedByLifetimeMarkers(const Value *V);
791791
/// droppable instructions.
792792
bool onlyUsedByLifetimeMarkersOrDroppableInsts(const Value *V);
793793

794-
/// Return true if the instruction doesn't potentially cross vector lanes. This
795-
/// is useful to make GVN-replacements for vector types.
794+
/// Return true if the instruction doesn't potentially cross vector lanes.
796795
bool isNotCrossLaneOperation(const Instruction *I);
797796

798797
/// Return true if the instruction does not have any effects besides

llvm/lib/Analysis/InstructionSimplify.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4343,9 +4343,9 @@ static Value *simplifyWithOpReplaced(Value *V, Value *Op, Value *RepOp,
43434343
if (isa<PHINode>(I))
43444344
return nullptr;
43454345

4346+
// For vector types, the simplification must hold per-lane, so forbid
4347+
// potentially cross-lane operations like shufflevector.
43464348
if (Op->getType()->isVectorTy() && !isNotCrossLaneOperation(I))
4347-
// For vector types, the simplification must hold per-lane, so forbid
4348-
// potentially cross-lane operations like shufflevector.
43494349
return nullptr;
43504350

43514351
// Don't fold away llvm.is.constant checks based on assumptions.

0 commit comments

Comments
 (0)