craig.topper added a comment. I'm not opposed to this patch, but here's some additional info
I think this is failing because we hit this code in CGExprScalar.cpp. Where SrcTy and DstTy are both i16 when using the conversion intrinsics. // Ignore conversions like int -> uint. if (SrcTy == DstTy) { llvm::dbgs() << "ctopper20\n"; if (Opts.EmitImplicitIntegerSignChangeChecks) EmitIntegerSignChangeCheck(Src, NoncanonicalSrcType, Src, NoncanonicalDstType, Loc); return Src; } Something like this seems to fix it. diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp index d3fe04d5a791..62662bf860c2 100644 --- a/clang/lib/CodeGen/CGExprScalar.cpp +++ b/clang/lib/CodeGen/CGExprScalar.cpp @@ -1339,7 +1339,7 @@ Value *ScalarExprEmitter::EmitScalarConversion(Value *Src, QualType SrcType, } // Ignore conversions like int -> uint. - if (SrcTy == DstTy) { + if (SrcTy == DstTy && !DstType->isHalfType()) { if (Opts.EmitImplicitIntegerSignChangeChecks) EmitIntegerSignChangeCheck(Src, NoncanonicalSrcType, Src, NoncanonicalDstType, Loc); Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124509/new/ https://reviews.llvm.org/D124509 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits