[clang] [HLSL] Implement output parameter (PR #101083)
Chris B via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 29 14:39:27 PDT 2024
================
@@ -4148,6 +4151,30 @@ static void emitWriteback(CodeGenFunction &CGF,
assert(!isProvablyNull(srcAddr.getBasePointer()) &&
"shouldn't have writeback for provably null argument");
+ if (CGF.getLangOpts().HLSL) {
+ if (writeback.CastExpr) {
+ RValue TmpVal = CGF.EmitAnyExprToTemp(writeback.CastExpr);
+ if (TmpVal.isScalar())
+ CGF.EmitStoreThroughLValue(TmpVal, srcLV);
+ else
+ CGF.EmitAggregateStore(srcLV.getPointer(CGF),
----------------
llvm-beanz wrote:
I think there's a codegen bug (and missing test coverage related to this. I'm debugging right now and will fix and post additional tests once I have it resolved.
https://github.com/llvm/llvm-project/pull/101083
More information about the cfe-commits
mailing list