================
@@ -0,0 +1,125 @@
+// RUN: %clang_cc1 -finclude-default-header -triple \
+// RUN:   dxil-pc-shadermodel6.3-library %s \
+// RUN:   -emit-llvm -disable-llvm-passes -o - | FileCheck %s
+
+//CHECK-LABEL: define hidden noundef <2 x i1> 
@_Z16test_and_bool2x1u11matrix_typeILm2ELm1EbES_(
+//CHECK-SAME: <2 x i1> noundef [[X:%.*]], <2 x i1> noundef [[Y:%.*]])  
#[[ATTR0:[0-9]+]] {
+//CHECK-NEXT:  entry:
+//CHECK:         [[HLSL_AND:%.*]] = and <2 x i32> [[A:%.*]], [[B:%.*]]
+//CHECK:         ret <2 x i1> [[HLSL_AND_CAST:%.*]]
+bool2x1 test_and_bool2x1(bool2x1 x, bool2x1 y)
+{
+    return and(x, y);
+}
+
+
+//CHECK-LABEL: define hidden noundef <4 x i1> 
@_Z16test_and_bool2x2u11matrix_typeILm2ELm2EbES_(
+//CHECK-SAME: <4 x i1> noundef [[X:%.*]], <4 x i1> noundef [[Y:%.*]]) 
#[[ATTR0]] {
+//CHECK-NEXT:  entry:
+//CHECK:         [[HLSL_AND:%.*]] = and <4 x i32> [[A:%.*]], [[B:%.*]]
+//CHECK:         ret <4 x i1> [[HLSL_AND_CAST:%.*]]
+bool2x2 test_and_bool2x2(bool2x2 x, bool2x2 y)
----------------
bob80905 wrote:

Perhaps add tests for 1xn matrices too.

https://github.com/llvm/llvm-project/pull/172384
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to