llvmorg-github-actions[bot] wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-analysis

Author: Ryotaro Kasuga (kasuga-fj)

<details>
<summary>Changes</summary>

Adding an assertion to verify that the operand types match would be useful, 
e.g., when investigating issues like #<!-- -->204066.

---
Full diff: https://github.com/llvm/llvm-project/pull/204146.diff


1 Files Affected:

- (modified) llvm/lib/Analysis/ScalarEvolutionDivision.cpp (+2) 


``````````diff
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);
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/204146
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to