================ @@ -1533,9 +1533,17 @@ void CodeGenFunction::EmitReturnStmt(const ReturnStmt &S) { Builder.CreateStore(Result.getScalarVal(), ReturnValue); } else { switch (getEvaluationKind(RV->getType())) { - case TEK_Scalar: - Builder.CreateStore(EmitScalarExpr(RV), ReturnValue); - break; + case TEK_Scalar: { + llvm::Value *Ret = EmitScalarExpr(RV); + // EmitStoreOfScalar could be used here, but it extends bool which for + // some targets is returned as i1 zeroext. ---------------- efriedma-quic wrote:
For the sake of consistency, I'd prefer to use EmitStoreOfScalar here, even if that means we have to change more code elsewhere (presumably to use EmitLoadOfScalar). https://github.com/llvm/llvm-project/pull/91364 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits