[IVDescriptors] Fix bug in checkOrderedReduction
The Exit instruction passed in for checking if it's an ordered reduction need not be an FPAdd operation. We need to bail out at that point instead of assuming it is an FPAdd (and hence has two operands). See added testcase. It crashes without the patch because the Exit instruction is a phi with exactly one operand. This latent bug was exposed by 95346ba8 which added support for multi-exit loops for vectorization. Reviewed-By: kmclaughlin Differential Revision: https://reviews.llvm.org/D106843
Loading
Please sign in to comment