================
@@ -0,0 +1,85 @@
+// RUN: %clang_cc1 -finclude-default-header -triple \
+// RUN:   dxil-pc-shadermodel6.3-library %s \
+// RUN:   -emit-llvm -O1 -o - | FileCheck %s
+
+//CHECK-LABEL: define noundef i1 @_Z15test_and_scalarbb(
+//CHECK-SAME: i1 noundef [[X:%.*]], i1 noundef [[Y:%.*]]) local_unnamed_addr 
#[[ATTR0:[0-9]+]] {
+//CHECK-NEXT:  [[ENTRY:.*:]]
+//CHECK-NEXT:    [[HLSL_OR:%.*]] = or i1 [[X]], [[Y]]
+//CHECK-NEXT:    ret i1 [[HLSL_OR]]
+//CHECK-NEXT:  }
+bool test_and_scalar(bool x, bool y)
+{
+    return or(x, y);
+}
+
+//CHECK-LABEL: define noundef <2 x i1> @_Z13test_or_bool2Dv2_bS_(
+//CHECK-SAME: <2 x i1> noundef [[X:%.*]], <2 x i1> noundef [[Y:%.*]]) 
local_unnamed_addr #[[ATTR0]] {
+//CHECK-NEXT:  [[ENTRY:.*:]]
+//CHECK-NEXT:    [[HLSL_OR:%.*]] = or <2 x i1> [[X]], [[Y]]
+//CHECK-NEXT:    ret <2 x i1> [[HLSL_OR]]
+//CHECK-NEXT:  }
+bool2 test_or_bool2(bool2 x, bool2 y)
+{
+    return or(x, y);
+}
+
+//CHECK-LABEL: define noundef <3 x i1> @_Z13test_or_bool3Dv3_bS_(
+//CHECK-SAME: <3 x i1> noundef [[X:%.*]], <3 x i1> noundef [[Y:%.*]]) 
local_unnamed_addr #[[ATTR0]] {
+//CHECK-NEXT:  [[ENTRY:.*:]]
+//CHECK-NEXT:    [[HLSL_OR:%.*]] = or <3 x i1> [[X]], [[Y]]
+//CHECK-NEXT:    ret <3 x i1> [[HLSL_OR]]
+//CHECK-NEXT:  }
+bool3 test_or_bool3(bool3 x, bool3 y)
+{
+    return or(x, y);
+}
+
+//CHECK-LABEL: define noundef <4 x i1> @_Z13test_or_bool4Dv4_bS_(
+//CHECK-SAME: <4 x i1> noundef [[X:%.*]], <4 x i1> noundef [[Y:%.*]]) 
local_unnamed_addr #[[ATTR0]] {
+//CHECK-NEXT:  [[ENTRY:.*:]]
+//CHECK-NEXT:    [[HLSL_OR:%.*]] = or <4 x i1> [[X]], [[Y]]
+//CHECK-NEXT:    ret <4 x i1> [[HLSL_OR]]
+//CHECK-NEXT:  }
+bool4 test_or_bool4(bool4 x, bool4 y)
+{
+    return or(x, y);
+}
+
+//CHECK-LABEL: define noundef i1 @_Z11test_or_intii(
+//CHECK-SAME: i32 noundef [[X:%.*]], i32 noundef [[Y:%.*]]) local_unnamed_addr 
#[[ATTR0]] {
+//CHECK-NEXT:  [[ENTRY:.*:]]
+//CHECK-NEXT:    [[A:%.*]] = or i32 [[Y]], [[X]]
+//CHECK-NEXT:    [[HLSL_OR:%.*]] = icmp ne i32 [[A]], 0
+//CHECK-NEXT:    ret i1 [[HLSL_OR]]
+//CHECK-NEXT:  }
+bool test_or_int(int x, int y)
+{
+    return or(x, y);
+}
+
+//CHECK-LABEL: define noundef <4 x i1> @_Z12test_or_int4Dv4_iS_(
+//CHECK-SAME: <4 x i32> noundef [[X:%.*]], <4 x i32> noundef [[Y:%.*]]) 
local_unnamed_addr #[[ATTR0]] {
+//CHECK-NEXT:  [[ENTRY:.*:]]
----------------
V-FEXrt wrote:

Can this line have a stricter match? If not, does it make since to just delete 
it? `.*` is such a broad match that it doesn't provide much value imo

https://github.com/llvm/llvm-project/pull/128979
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to