[llvm] [VPlan] Verify scalar types in VPlanVerifier. NFCI (PR #122679)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 15 12:02:42 PST 2025


================
@@ -79,6 +85,8 @@ Type *VPTypeAnalysis::inferScalarTypeForRecipe(const VPInstruction *R) {
     return BaseTy;
   }
   case VPInstruction::LogicalAnd:
+    assert(inferScalarType(R->getOperand(0))->isIntegerTy(1) &&
+           "LogicalAnd operand should be bool");
----------------
fhahn wrote:

Should this check both operands?

https://github.com/llvm/llvm-project/pull/122679


More information about the llvm-commits mailing list