[llvm] [IVDesc] Use SCEVPatternMatch to improve code (NFC) (PR #168397)

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 24 04:17:57 PST 2025


================
@@ -1396,8 +1399,8 @@ InductionDescriptor::InductionDescriptor(Value *Start, InductionKind K,
 }
 
 ConstantInt *InductionDescriptor::getConstIntStepValue() const {
-  if (isa<SCEVConstant>(Step))
-    return dyn_cast<ConstantInt>(cast<SCEVConstant>(Step)->getValue());
+  if (auto *C = dyn_cast<SCEVConstant>(Step))
----------------
david-arm wrote:

Seems unrelated to the PR, which is about using SCEVPatternMatch.

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


More information about the llvm-commits mailing list