Debian Codegraph @

clang/test/CodeGenHLSL/builtins/and_mat.hlsl

raw
1 // RUN: %clang_cc1 -finclude-default-header -triple \
2 // RUN: dxil-pc-shadermodel6.3-library %s \
3 // RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s
4
5 // CHECK-LABEL: define hidden noundef <2 x i1> @_Z16test_and_bool1x2u11matrix_typeILm1ELm2EbES_(
6 // CHECK-SAME: <2 x i1> noundef [[X:%.*]], <2 x i1> noundef [[Y:%.*]]) #[[ATTR0:[0-9]+]] {
7 // CHECK-NEXT: entry:
8 // CHECK: [[HLSL_AND:%.*]] = and <2 x i32> [[A:%.*]], [[B:%.*]]
9 // CHECK: ret <2 x i1> [[HLSL_AND_CAST:%.*]]
10 bool1x2 test_and_bool1x2(bool1x2 x, bool1x2 y)
11 {
12 return and(x, y);
13 }
14
15 // CHECK-LABEL: define hidden noundef <3 x i1> @_Z16test_and_bool1x3u11matrix_typeILm1ELm3EbES_(
16 // CHECK-SAME: <3 x i1> noundef [[X:%.*]], <3 x i1> noundef [[Y:%.*]]) #[[ATTR0]] {
17 // CHECK-NEXT: entry:
18 // CHECK: [[HLSL_AND:%.*]] = and <3 x i32> [[A:%.*]], [[B:%.*]]
19 // CHECK: ret <3 x i1> [[HLSL_AND_CAST:%.*]]
20 bool1x3 test_and_bool1x3(bool1x3 x, bool1x3 y)
21 {
22 return and(x, y);
23 }
24
25 // CHECK-LABEL: define hidden noundef <4 x i1> @_Z16test_and_bool1x4u11matrix_typeILm1ELm4EbES_(
26 // CHECK-SAME: <4 x i1> noundef [[X:%.*]], <4 x i1> noundef [[Y:%.*]]) #[[ATTR0]] {
27 // CHECK-NEXT: entry:
28 // CHECK: [[HLSL_AND:%.*]] = and <4 x i32> [[A:%.*]], [[B:%.*]]
29 // CHECK: ret <4 x i1> [[HLSL_AND_CAST:%.*]]
30 bool1x4 test_and_bool1x4(bool1x4 x, bool1x4 y)
31 {
32 return and(x, y);
33 }
34
35 // CHECK-LABEL: define hidden noundef <2 x i1> @_Z16test_and_bool2x1u11matrix_typeILm2ELm1EbES_(
36 // CHECK-SAME: <2 x i1> noundef [[X:%.*]], <2 x i1> noundef [[Y:%.*]]) #[[ATTR0]] {
37 // CHECK-NEXT: entry:
38 // CHECK: [[HLSL_AND:%.*]] = and <2 x i32> [[A:%.*]], [[B:%.*]]
39 // CHECK: ret <2 x i1> [[HLSL_AND_CAST:%.*]]
40 bool2x1 test_and_bool2x1(bool2x1 x, bool2x1 y)
41 {
42 return and(x, y);
43 }
44
45
46 // CHECK-LABEL: define hidden noundef <4 x i1> @_Z16test_and_bool2x2u11matrix_typeILm2ELm2EbES_(
47 // CHECK-SAME: <4 x i1> noundef [[X:%.*]], <4 x i1> noundef [[Y:%.*]]) #[[ATTR0]] {
48 // CHECK-NEXT: entry:
49 // CHECK: [[HLSL_AND:%.*]] = and <4 x i32> [[A:%.*]], [[B:%.*]]
50 // CHECK: ret <4 x i1> [[HLSL_AND_CAST:%.*]]
51 bool2x2 test_and_bool2x2(bool2x2 x, bool2x2 y)
52 {
53 return and(x, y);
54 }
55
56 // CHECK-LABEL: define hidden noundef <6 x i1> @_Z16test_and_bool2x3u11matrix_typeILm2ELm3EbES_(
57 // CHECK-SAME: <6 x i1> noundef [[X:%.*]], <6 x i1> noundef [[Y:%.*]]) #[[ATTR0]] {
58 // CHECK-NEXT: entry:
59 // CHECK: [[HLSL_AND:%.*]] = and <6 x i32> [[A:%.*]], [[B:%.*]]
60 // CHECK: ret <6 x i1> [[HLSL_AND_CAST:%.*]]
61 bool2x3 test_and_bool2x3(bool2x3 x, bool2x3 y)
62 {
63 return and(x, y);
64 }
65
66 // CHECK-LABEL: define hidden noundef <8 x i1> @_Z16test_and_bool2x4u11matrix_typeILm2ELm4EbES_(
67 // CHECK-SAME: <8 x i1> noundef [[X:%.*]], <8 x i1> noundef [[Y:%.*]]) #[[ATTR0]] {
68 // CHECK-NEXT: entry:
69 // CHECK: [[HLSL_AND:%.*]] = and <8 x i32> [[A:%.*]], [[B:%.*]]
70 // CHECK: ret <8 x i1> [[HLSL_AND_CAST:%.*]]
71 bool2x4 test_and_bool2x4(bool2x4 x, bool2x4 y)
72 {
73 return and(x, y);
74 }
75
76 // CHECK-LABEL: define hidden noundef <3 x i1> @_Z16test_and_bool3x1u11matrix_typeILm3ELm1EbES_(
77 // CHECK-SAME: <3 x i1> noundef [[X:%.*]], <3 x i1> noundef [[Y:%.*]]) #[[ATTR0]] {
78 // CHECK-NEXT: entry:
79 // CHECK: [[HLSL_AND:%.*]] = and <3 x i32> [[A:%.*]], [[B:%.*]]
80 // CHECK: ret <3 x i1> [[HLSL_AND_CAST:%.*]]
81 bool3x1 test_and_bool3x1(bool3x1 x, bool3x1 y)
82 {
83 return and(x, y);
84 }
85
86 // CHECK-LABEL: define hidden noundef <6 x i1> @_Z16test_and_bool3x2u11matrix_typeILm3ELm2EbES_(
87 // CHECK-SAME: <6 x i1> noundef [[X:%.*]], <6 x i1> noundef [[Y:%.*]]) #[[ATTR0]] {
88 // CHECK-NEXT: entry:
89 // CHECK: [[HLSL_AND:%.*]] = and <6 x i32> [[A:%.*]], [[B:%.*]]
90 // CHECK: ret <6 x i1> [[HLSL_AND_CAST:%.*]]
91 bool3x2 test_and_bool3x2(bool3x2 x, bool3x2 y)
92 {
93 return and(x, y);
94 }
95
96
97 // CHECK-LABEL: define hidden noundef <9 x i1> @_Z16test_and_bool3x3u11matrix_typeILm3ELm3EbES_(
98 // CHECK-SAME: <9 x i1> noundef [[X:%.*]], <9 x i1> noundef [[Y:%.*]]) #[[ATTR0]] {
99 // CHECK-NEXT: entry:
100 // CHECK: [[HLSL_AND:%.*]] = and <9 x i32> [[A:%.*]], [[B:%.*]]
101 // CHECK: ret <9 x i1> [[HLSL_AND_CAST:%.*]]
102 bool3x3 test_and_bool3x3(bool3x3 x, bool3x3 y)
103 {
104 return and(x, y);
105 }
106
107 // CHECK-LABEL: define hidden noundef <12 x i1> @_Z16test_and_bool3x4u11matrix_typeILm3ELm4EbES_(
108 // CHECK-SAME: <12 x i1> noundef [[X:%.*]], <12 x i1> noundef [[Y:%.*]]) #[[ATTR0]] {
109 // CHECK-NEXT: entry:
110 // CHECK: [[HLSL_AND:%.*]] = and <12 x i32> [[A:%.*]], [[B:%.*]]
111 // CHECK: ret <12 x i1> [[HLSL_AND_CAST:%.*]]
112 bool3x4 test_and_bool3x4(bool3x4 x, bool3x4 y)
113 {
114 return and(x, y);
115 }
116
117 // CHECK-LABEL: define hidden noundef <4 x i1> @_Z16test_and_bool4x1u11matrix_typeILm4ELm1EbES_(
118 // CHECK-SAME: <4 x i1> noundef [[X:%.*]], <4 x i1> noundef [[Y:%.*]]) #[[ATTR0]] {
119 // CHECK-NEXT: entry:
120 // CHECK: [[HLSL_AND:%.*]] = and <4 x i32> [[A:%.*]], [[B:%.*]]
121 // CHECK: ret <4 x i1> [[HLSL_AND_CAST:%.*]]
122 bool4x1 test_and_bool4x1(bool4x1 x, bool4x1 y)
123 {
124 return and(x, y);
125 }
126
127 // CHECK-LABEL: define hidden noundef <8 x i1> @_Z16test_and_bool4x2u11matrix_typeILm4ELm2EbES_(
128 // CHECK-SAME: <8 x i1> noundef [[X:%.*]], <8 x i1> noundef [[Y:%.*]]) #[[ATTR0]] {
129 // CHECK-NEXT: entry:
130 // CHECK: [[HLSL_AND:%.*]] = and <8 x i32> [[A:%.*]], [[B:%.*]]
131 // CHECK: ret <8 x i1> [[HLSL_AND_CAST:%.*]]
132 bool4x2 test_and_bool4x2(bool4x2 x, bool4x2 y)
133 {
134 return and(x, y);
135 }
136
137 // CHECK-LABEL: define hidden noundef <12 x i1> @_Z16test_and_bool4x3u11matrix_typeILm4ELm3EbES_(
138 // CHECK-SAME: <12 x i1> noundef [[X:%.*]], <12 x i1> noundef [[Y:%.*]]) #[[ATTR0]] {
139 // CHECK-NEXT: entry:
140 // CHECK: [[HLSL_AND:%.*]] = and <12 x i32> [[A:%.*]], [[B:%.*]]
141 // CHECK: ret <12 x i1> [[HLSL_AND_CAST:%.*]]
142 bool4x3 test_and_bool4x3(bool4x3 x, bool4x3 y)
143 {
144 return and(x, y);
145 }
146
147 // CHECK-LABEL: define hidden noundef <16 x i1> @_Z16test_and_bool4x4u11matrix_typeILm4ELm4EbES_(
148 // CHECK-SAME: <16 x i1> noundef [[X:%.*]], <16 x i1> noundef [[Y:%.*]]) #[[ATTR0]] {
149 // CHECK-NEXT: entry:
150 // CHECK: [[HLSL_AND:%.*]] = and <16 x i32> [[A:%.*]], [[B:%.*]]
151 // CHECK: ret <16 x i1> [[HLSL_AND_CAST:%.*]]
152 bool4x4 test_and_bool4x4(bool4x4 x, bool4x4 y)
153 {
154 return and(x, y);
155 }