[clang] [llvm] Add length HLSL function to DirectX Backend (PR #101256)
Joshua Batista via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 31 11:09:34 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"
----------------
bob80905 wrote:
Turns out the dxil-op-lower pass depends on `target triple` existing. Here's a part of the stack dump that resulted in an assertion failure if `target triple` is removed.
```
# | #0 0x00007ff629463ebc HandleAbort D:\llvm-project\llvm\lib\Support\Windows\Signals.inc:425:0
# | #1 0x00007ffd65c790ed (C:\WINDOWS\SYSTEM32\ucrtbased.dll+0xa90ed)
# | #2 0x00007ffd65c7ae49 (C:\WINDOWS\SYSTEM32\ucrtbased.dll+0xaae49)
# | #3 0x00007ff6292a582d llvm::llvm_unreachable_internal(char const *, char const *, unsigned int) D:\llvm-project\llvm\lib\Support\ErrorHandling.cpp:213:0
# | #4 0x00007ff6294934e9 llvm::Triple::getDXILVersion(void) const D:\llvm-project\llvm\lib\TargetParser\Triple.cpp:1514:0
# | #5 0x00007ff6262cb0a1 llvm::dxil::DXILOpBuilder::DXILOpBuilder(class llvm::Module &, class llvm::IRBuilderBase &) D:\llvm-project\llvm\lib\Target\DirectX\DXILOpBuilder.cpp:339:0
```
https://github.com/llvm/llvm-project/pull/101256
More information about the cfe-commits
mailing list