================
@@ -0,0 +1,345 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --version 6
+
+// RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
+// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s
+
+// CHECK-LABEL: define hidden noundef i32
@_Z18StoreScalarAtMat11Ru11matrix_typeILm4ELm4EiEi(
+// CHECK-SAME: ptr noalias noundef nonnull align 4 dereferenceable(64)
[[A:%.*]], i32 noundef [[I:%.*]]) #[[ATTR0:[0-9]+]] {
+// CHECK-NEXT: [[ENTRY:.*:]]
+// CHECK-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 4
+// CHECK-NEXT: [[I_ADDR:%.*]] = alloca i32, align 4
+// CHECK-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 4
+// CHECK-NEXT: store i32 [[I]], ptr [[I_ADDR]], align 4
+// CHECK-NEXT: [[TMP0:%.*]] = load i32, ptr [[I_ADDR]], align 4
+// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement <1 x i32> poison,
i32 [[TMP0]], i64 0
+// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector <1 x i32>
[[SPLAT_SPLATINSERT]], <1 x i32> poison, <1 x i32> zeroinitializer
+// CHECK-NEXT: [[TMP1:%.*]] = load ptr, ptr [[A_ADDR]], align 4, !nonnull
[[META4:![0-9]+]], !align [[META5:![0-9]+]]
+// CHECK-NEXT: [[TMP2:%.*]] = extractelement <1 x i32> [[SPLAT_SPLAT]], i32 0
+// CHECK-NEXT: store i32 [[TMP2]], ptr [[TMP1]], align 4
+// CHECK-NEXT: [[CAST_VTRUNC:%.*]] = extractelement <1 x i32>
[[SPLAT_SPLAT]], i32 0
+// CHECK-NEXT: ret i32 [[CAST_VTRUNC]]
+//
+int StoreScalarAtMat11(out int4x4 A, int I) {
+ return A._11 = I;
+}
----------------
hekota wrote:
I think it would be better to focus just on the store operation.
```suggestion
void StoreScalarAtMat11(out int4x4 A, int I) {
A._11 = I;
}
```
https://github.com/llvm/llvm-project/pull/171225
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits