[InstCombine] Promote expression tree with @llvm.vscale when zero-extending result.
The LoopVectorizer emits the (scaled) element count as i32, which for scalable VFs results in calls to @llvm.vscale.i32(). This value is scaled and further zero-extended to i64. The zero-extend can be folded away by executing the whole expression in i64 type using @llvm.vscale.i64(). Any logical `and` that would needed to mask the result can be further folded away by KnownBits analysis when vscale_range is set. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D143016
Loading
Please sign in to comment