22// RUN: dxil-pc-shadermodel6.3-library %s \
33// RUN: -emit-llvm -O1 -o - | FileCheck %s
44
5- //CHECK-LABEL: define noundef i1 @_Z12test_or_boolbb (
5+ //CHECK-LABEL: define noundef i1 @_Z15test_and_scalarbb (
66//CHECK-SAME: i1 noundef [[X:%.*]], i1 noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {
77//CHECK-NEXT: [[ENTRY:.*:]]
8- //CHECK-NEXT: [[HLSL_OR:%.*]] = or i1 [[x ]], [[y ]]
8+ //CHECK-NEXT: [[HLSL_OR:%.*]] = or i1 [[X ]], [[Y ]]
99//CHECK-NEXT: ret i1 [[HLSL_OR]]
10- //CHECK_NEXT : }
10+ //CHECK-NEXT : }
1111bool test_and_scalar (bool x, bool y)
1212{
1313 return or (x, y);
@@ -16,9 +16,9 @@ bool test_and_scalar(bool x, bool y)
1616//CHECK-LABEL: define noundef <2 x i1> @_Z13test_or_bool2Dv2_bS_(
1717//CHECK-SAME: <2 x i1> noundef [[X:%.*]], <2 x i1> noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR0]] {
1818//CHECK-NEXT: [[ENTRY:.*:]]
19- //CHECK-NEXT: [[HLSL_OR:%.*]] = or <2 xi1 > [[x ]], [[y ]]
19+ //CHECK-NEXT: [[HLSL_OR:%.*]] = or <2 x i1 > [[X ]], [[Y ]]
2020//CHECK-NEXT: ret <2 x i1> [[HLSL_OR]]
21- //CHECK_NEXT : }
21+ //CHECK-NEXT : }
2222bool2 test_or_bool2 (bool2 x, bool2 y)
2323{
2424 return or (x, y);
@@ -27,9 +27,9 @@ bool2 test_or_bool2(bool2 x, bool2 y)
2727//CHECK-LABEL: define noundef <3 x i1> @_Z13test_or_bool3Dv3_bS_(
2828//CHECK-SAME: <3 x i1> noundef [[X:%.*]], <3 x i1> noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR0]] {
2929//CHECK-NEXT: [[ENTRY:.*:]]
30- //CHECK-NEXT: [[HLSL_OR:%.*]] = or <3 xi1 > [[x ]], [[y ]]
30+ //CHECK-NEXT: [[HLSL_OR:%.*]] = or <3 x i1 > [[X ]], [[Y ]]
3131//CHECK-NEXT: ret <3 x i1> [[HLSL_OR]]
32- //CHECK_NEXT : }
32+ //CHECK-NEXT : }
3333bool3 test_or_bool3 (bool3 x, bool3 y)
3434{
3535 return or (x, y);
@@ -38,9 +38,9 @@ bool3 test_or_bool3(bool3 x, bool3 y)
3838//CHECK-LABEL: define noundef <4 x i1> @_Z13test_or_bool4Dv4_bS_(
3939//CHECK-SAME: <4 x i1> noundef [[X:%.*]], <4 x i1> noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR0]] {
4040//CHECK-NEXT: [[ENTRY:.*:]]
41- //CHECK-NEXT: [[HLSL_OR:%.*]] = or <4 xi1 > [[x ]], [[y ]]
41+ //CHECK-NEXT: [[HLSL_OR:%.*]] = or <4 x i1 > [[X ]], [[Y ]]
4242//CHECK-NEXT: ret <4 x i1> [[HLSL_OR]]
43- //CHECK_NEXT : }
43+ //CHECK-NEXT : }
4444bool4 test_or_bool4 (bool4 x, bool4 y)
4545{
4646 return or (x, y);
@@ -49,10 +49,10 @@ bool4 test_or_bool4(bool4 x, bool4 y)
4949//CHECK-LABEL: define noundef i1 @_Z11test_or_intii(
5050//CHECK-SAME: i32 noundef [[X:%.*]], i32 noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR0]] {
5151//CHECK-NEXT: [[ENTRY:.*:]]
52- //CHECK_NEXT : [[0 :%.*]] = or i32 [[y ]], [[x ]]
53- //CHECK-NEXT: [[HLSL_OR:%.*]] = icmp ne i32 [[0 ]], 0
52+ //CHECK-NEXT : [[A :%.*]] = or i32 [[Y ]], [[X ]]
53+ //CHECK-NEXT: [[HLSL_OR:%.*]] = icmp ne i32 [[A ]], 0
5454//CHECK-NEXT: ret i1 [[HLSL_OR]]
55- //CHECK_NEXT : }
55+ //CHECK-NEXT : }
5656bool test_or_int (int x, int y)
5757{
5858 return or (x, y);
@@ -61,10 +61,10 @@ bool test_or_int(int x, int y)
6161//CHECK-LABEL: define noundef <4 x i1> @_Z12test_or_int4Dv4_iS_(
6262//CHECK-SAME: <4 x i32> noundef [[X:%.*]], <4 x i32> noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR0]] {
6363//CHECK-NEXT: [[ENTRY:.*:]]
64- //CHECK_NEXT : [[0 :%.*]] = or <4 x i32> [[y ]], [[x ]]
65- //CHECK-NEXT: [[HLSL_OR:%.*]] = icmp ne <4 x i32> [[0 ]], zeroinitializer
64+ //CHECK-NEXT : [[A :%.*]] = or <4 x i32> [[Y ]], [[X ]]
65+ //CHECK-NEXT: [[HLSL_OR:%.*]] = icmp ne <4 x i32> [[A ]], zeroinitializer
6666//CHECK-NEXT: ret <4 x i1> [[HLSL_OR]]
67- //CHECK_NEXT : }
67+ //CHECK-NEXT : }
6868bool4 test_or_int4 (int4 x, int4 y)
6969{
7070 return or (x, y);
@@ -77,8 +77,9 @@ bool4 test_or_int4(int4 x, int4 y)
7777//CHECK-NEXT: [[TOBOOL1:%.*]] = fcmp reassoc nnan ninf nsz arcp afn une <4 x float> [[Y]], zeroinitializer
7878//CHECK-NEXT: [[HLSL_OR:%.*]] = or <4 x i1> [[TOBOOL]], [[TOBOOL1]]
7979//CHECK-NEXT: ret <4 x i1> [[HLSL_OR]]
80- //CHECK_NEXT : }
80+ //CHECK-NEXT : }
8181bool4 test_or_float4 (float4 x, float4 y)
8282{
8383 return or (x, y);
8484}
85+
0 commit comments