[clang] [llvm] Add length HLSL function to DirectX Backend (PR #101256)
Joshua Batista via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 31 10:21:37 PDT 2024
================
@@ -0,0 +1,107 @@
+; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s --check-prefixes=CHECK,EXPCHECK
+; RUN: opt -S -dxil-op-lower < %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK
+
+; ModuleID = 'D:\llvm-project\clang\test\CodeGenHLSL\builtins\length.hlsl'
+source_filename = "D:\\llvm-project\\clang\\test\\CodeGenHLSL\\builtins\\length.hlsl"
+target datalayout = "e-m:e-p:32:32-i1:32-i8:8-i16:16-i32:32-i64:64-f16:16-f32:32-f64:64-n8:16:32:64"
+target triple = "dxilv1.3-pc-shadermodel6.3-library"
+
+; Function Attrs: convergent noinline nounwind optnone
+define noundef float @"?test_length_half@@YA$halff@$halff@@Z"(float noundef %p0) #0 {
----------------
bob80905 wrote:
I generated this file by compiling length.hlsl and taking the dxil output of the first 4 functions, which were testing half, but with NO_HALF enabled. So, I just need to change the function names, the test doesn't seem wrong to me.
https://github.com/llvm/llvm-project/pull/101256
More information about the llvm-commits
mailing list