[clang] [HLSL] Add "or" intrinsic (PR #128979)

Ashley Coleman via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 27 14:28:14 PST 2025


================
@@ -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)
----------------
V-FEXrt wrote:

```suggestion
bool test_or_scalar(bool x, bool y)

```

https://github.com/llvm/llvm-project/pull/128979


More information about the cfe-commits mailing list