[InstCombine][LV] Fold (add (zext (add X, -1)), 1) -> (zext X) if X is non-zero.
This artifact can appear from the vectorizer. (add X, -1) is the backedge taken count. It gets zero extended and then 1 is added to it to get the trip count. There is usually a dominating branch that rules out X being zero. Alive: https://alive2.llvm.org/ce/z/NsRDwX
Loading
Please sign in to comment