================ @@ -1690,6 +1690,23 @@ static void WriteConstantInternal(raw_ostream &Out, const Constant *CV, if (isa<ConstantVector>(CV) || isa<ConstantDataVector>(CV)) { auto *CVVTy = cast<FixedVectorType>(CV->getType()); Type *ETy = CVVTy->getElementType(); + + // Use the same shorthand for splat vector (i.e. "splat(Ty val)") as is + // permitted on IR input to reduce the output changes when enabling + // UseConstant{Int,FP}ForFixedLengthSplat. + // TODO: Remove this block when the UseConstant{Int,FP}ForFixedLengthSplat + // options are removed. + if (auto *SplatVal = CV->getSplatValue()) { + if (isa<ConstantInt>(SplatVal) || isa<ConstantFP>(SplatVal)) { + Out << "splat ("; ---------------- paulwalker-arm wrote:
The splat printing follows the same style as used for ConstantExprs. https://github.com/llvm/llvm-project/pull/112548 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits