lib_no_alias.hlsl 464 B

12345678910111213141516
  1. // RUN: %dxc -T lib_6_3 -auto-binding-space 11 -default-linkage external %s | FileCheck %s
  2. // Make sure out param has no-alias.
  3. // CHECK: float @"\01?test@@YAMMUT@@AIAV?$matrix@M$01$01@@M@Z"(float %a, %struct.T* noalias nocapture %t, %class.matrix.float.2.2* noalias nocapture dereferenceable(16) %m, float %b)
  4. struct T {
  5. float a;
  6. int b;
  7. };
  8. float test(float a, out T t, out float2x2 m, float b) {
  9. t.a = 1;
  10. t.b = 6;
  11. m = 3;
  12. return a + t.a - t.b - b;
  13. }