[InstSimplify] Fix a scalable-vector crash
D143505 fixed/simplified folding of operations with SNaN operands. In doing so it introduced a crash when handling scalable vector types, wherein the scalable-vector ConstantVector was cast to a ConstantFP. Since we know by that point in the code that if we've found a NaN, we're dealing with a scalable-vector splat (as there are no other kinds of scalable-vector constant for which that holds), we can grab the splatted value and re-use the existing code, which will automatically splat the new NaN back to a scalable vector for us. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D153566
parent
eeba037e
Please register or sign in to comment