[LoopVectorize] Fix zext/sext cost calculations when types are shrunk
In getInstructionCost if we know a zext/sext is going to be shrunk we should only be changing the destination type, and leave the source type unchanged. For example, we may change a zext from zext <16 x i8> %a to <16 x i32> to zext <16 x i8> %a to <16 x i16> However, we were previously calculating the cost for doing zext <16 x i16> %a to <16 x i16> which is incorrect. Differential Revision: https://reviews.llvm.org/D147152
Loading
Please sign in to comment