File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -5325,8 +5325,11 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
53255325 break ;
53265326 }
53275327 } else if (I->getType ()->isArrayParameterType ()) {
5328- // use the tmp created by the HLSLOutArgExpr
5329- // instead of creating a new one below and copying the tmp into it.
5328+ // Don't produce a temporary for ArrayParameterType arguments.
5329+ // ArrayParameterType arguments are only created from
5330+ // HLSL_ArrayRValue casts and HLSLOutArgExpr expressions, both
5331+ // of which create temporaries already. This allows us to just use the
5332+ // scalar for the decayed array pointer as the argument directly.
53305333 IRCallArgs[FirstIRArg] = I->getKnownRValue ().getScalarVal ();
53315334 break ;
53325335 }
You can’t perform that action at this time.
0 commit comments