[clang] Adding `asuint` implementation to hlsl (PR #107292)

Farzon Lotfi via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 9 12:12:15 PDT 2024


================
@@ -0,0 +1,41 @@
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple dxil-pc-shadermodel6.3-library %s -fnative-half-type -emit-llvm -O1 -o - | FileCheck %s
+
+// CHECK: define {{.*}}test_uint{{.*}}(i32 {{.*}} [[VAL:%.*]]){{.*}} 
+// CHECK-NOT: bitcast
+// CHECK: ret i32 [[VAL]]
+export uint test_uint(uint p0) {
----------------
farzonl wrote:

We haven't been putting export on the other intrinsic test cases. The issue had it because it wouldn't run without it in DXC.

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


More information about the cfe-commits mailing list