[clang] [HLSL] Implement support for HLSL intrinsic - select (PR #107129)
Chris B via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 3 19:01:30 PDT 2024
================
@@ -0,0 +1,76 @@
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
+// RUN: -o - | FileCheck %s --check-prefixes=CHECK
+
+// CHECK: %hlsl.select = select i1
+// CHECK: ret i32 %hlsl.select
+int test_select_bool_int(bool cond0, int tVal, int fVal) { return select<int>(cond0, tVal, fVal); }
----------------
llvm-beanz wrote:
I agree with @damyanp, that these are easier to read if formatted.
That said, clang doesn't require formatting test cases since formatting sometimes formatting matters to tests. That obviously isn't the case here, but formatting for readability is good.
https://github.com/llvm/llvm-project/pull/107129
More information about the cfe-commits
mailing list