[all-commits] [llvm/llvm-project] a89e76: [IndVarSimplify] Add safety check for getTruncateE...
Anshil Gandhi via All-commits
all-commits at lists.llvm.org
Thu Feb 12 21:52:56 PST 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a89e766ca63d61874138dd84b0e2eaf1f9d73d51
https://github.com/llvm/llvm-project/commit/a89e766ca63d61874138dd84b0e2eaf1f9d73d51
Author: Anshil Gandhi <95053726+gandhi56 at users.noreply.github.com>
Date: 2026-02-13 (Fri, 13 Feb 2026)
Changed paths:
M llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
A llvm/test/Transforms/IndVarSimplify/scev-update-loop-opt.ll
Log Message:
-----------
[IndVarSimplify] Add safety check for getTruncateExpr in genLoopLimit (#181296)
getTruncateExpr may not always return a SCEVAddRecExpr when truncating
loop bounds. Add a check to verify the result type before casting, and
bail out of the transformation if the cast would be invalid.
This prevents potential crashes from invalid casts when dealing with
complex loop bounds.
Co-authored by Michael Rowan
Resolves
[https://github.com/llvm/llvm-project/issues/153090](https://github.com/llvm/llvm-project/issues/153090)
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list