[llvm] [LV] Widen truncated induction updates, not just truncated phis (PR #220730)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 8 04:26:10 PDT 2026
================
@@ -761,6 +761,21 @@ enum EpilogueLowering {
enum class AliasMaskingStatus { NotDecided, Disabled, Enabled };
+/// Information about a truncation of an induction phi or its update that can
+/// be represented as an induction in the truncated type.
+struct OptimizableIVTruncateInfo {
+ /// The original induction phi.
+ PHINode *Phi = nullptr;
+ /// The induction update being truncated, or nullptr if the phi is truncated
+ /// directly.
+ Instruction *Update = nullptr;
+
+ OptimizableIVTruncateInfo() = default;
+
+ OptimizableIVTruncateInfo(PHINode *Phi, Instruction *Update)
+ : Phi(Phi), Update(Update) {}
+};
+
----------------
lukel97 wrote:
Do we really need a struct that just holds two pointers?
https://github.com/llvm/llvm-project/pull/220730
More information about the llvm-commits
mailing list