[llvm] [SPIRV][HLSL] Add HLSL intrinsic tests (PR #86844)

Farzon Lotfi via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 27 11:12:30 PDT 2024


================
@@ -0,0 +1,20 @@
+; RUN: llc -O0 -mtriple=spirv-unknown-linux %s -o - | FileCheck %s
+
+; CHECK: OpExtInstImport "GLSL.std.450"
+
+define noundef float @round_float(float noundef %a) {
+entry:
+; CHECK: %[[#]] = OpExtInst %[[#]] %[[#]] Round %[[#]]
----------------
farzonl wrote:

While this test passes, I'm not sure if this is correct based on this issue: https://github.com/microsoft/DirectXShaderCompiler/issues/4368

And shade playground is also reporting RoundEven: https://shader-playground.timjones.io/3e6db4d9a4c4dfe4974c203f721a8c73



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


More information about the llvm-commits mailing list