[llvm-branch-commits] [llvm] [SCEVDivision] Add assertion to check operand types match (NFCI) (PR #204146)
Ryotaro Kasuga via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Jun 19 00:14:43 PDT 2026
https://github.com/kasuga-fj updated https://github.com/llvm/llvm-project/pull/204146
>From 819a7af565cfbd002ac734cf289bc94b84e8bf2c Mon Sep 17 00:00:00 2001
From: Ryotaro Kasuga <kasuga.ryotaro at fujitsu.com>
Date: Tue, 16 Jun 2026 13:18:33 +0000
Subject: [PATCH] [SCEVDivision] Add assertion to check operand types match
---
llvm/lib/Analysis/ScalarEvolutionDivision.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/llvm/lib/Analysis/ScalarEvolutionDivision.cpp b/llvm/lib/Analysis/ScalarEvolutionDivision.cpp
index 710473191f8c6..8bd5cb9d339b2 100644
--- a/llvm/lib/Analysis/ScalarEvolutionDivision.cpp
+++ b/llvm/lib/Analysis/ScalarEvolutionDivision.cpp
@@ -56,6 +56,8 @@ void SCEVDivision::divide(ScalarEvolution &SE, const SCEV *Numerator,
const SCEV *Denominator, const SCEV **Quotient,
const SCEV **Remainder) {
assert(Numerator && Denominator && "Uninitialized SCEV");
+ assert(Numerator->getType() == Denominator->getType() &&
+ "Numerator and Denominator must have the same type");
SCEVDivision D(SE, Numerator, Denominator);
More information about the llvm-branch-commits
mailing list