[VPlan] Strip dead code in isUniformAcrossVFsAndUFs (NFC) (#189687)

Checking a VPInstruction for scalar-cast is equivalent to checking
opcode against Instruction::isCast via preservesUniformity.
This commit is contained in:
Ramkumar Ramachandra 2026-04-01 17:38:41 +01:00 committed by GitHub
parent 5c36ef8843
commit 44979bedf0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -432,10 +432,8 @@ bool vputils::isUniformAcrossVFsAndUFs(VPValue *V) {
all_of(R->operands(), isUniformAcrossVFsAndUFs);
})
.Case([](const VPInstruction *VPI) {
return (VPI->isScalarCast() &&
isUniformAcrossVFsAndUFs(VPI->getOperand(0))) ||
(preservesUniformity(VPI->getOpcode()) &&
all_of(VPI->operands(), isUniformAcrossVFsAndUFs));
return preservesUniformity(VPI->getOpcode()) &&
all_of(VPI->operands(), isUniformAcrossVFsAndUFs);
})
.Case([](const VPWidenCastRecipe *R) {
// A cast is uniform according to its operand.