commit | 40c1d50024f8f0306b8601559d69663ae3d2d9bb | [log] [tgz] |
---|---|---|
author | Kaitlin Peng <kaitlinpeng@microsoft.com> | Fri Mar 28 21:47:25 2025 -0700 |
committer | GitHub <noreply@github.com> | Sat Mar 29 00:47:25 2025 -0400 |
tree | c41ae33a4f2d49d8328ed6cd5db0d6f3e8aed924 | |
parent | 1e03408d4b17a792da5fd01b30f05ff055cfbd79 [diff] |
[HLSL] Implement the `smoothstep` intrinsic (#132288) Closes #99156. Tasks completed: - Implement `smoothstep` using HLSL source in `hlsl_intrinsics.h` - Implement the `smoothstep` SPIR-V target built-in in `clang/include/clang/Basic/BuiltinsSPIRV.td` - Add sema checks for `smoothstep` to `CheckSPIRVBuiltinFunctionCall` in `clang/lib/Sema/SemaSPIRV.cpp` - Add codegen for spv `smoothstep` to `EmitSPIRVBuiltinExpr` in `clang/lib/CodeGen/TargetBuiltins/SPIR.cpp` - Add codegen tests to `clang/test/CodeGenHLSL/builtins/smoothstep.hlsl` - Add spv codegen test to `clang/test/CodeGenSPIRV/Builtins/smoothstep.c` - Add sema tests to `clang/test/SemaHLSL/BuiltIns/smoothstep-errors.hlsl` - Add spv sema tests to `clang/test/SemaSPIRV/BuiltIns/smoothstep-errors.c` - Create the `int_spv_smoothstep` intrinsic in `IntrinsicsSPIRV.td` - In SPIRVInstructionSelector.cpp create the `smoothstep` lowering and map it to `int_spv_smoothstep` in `SPIRVInstructionSelector::selectIntrinsic` - Create SPIR-V backend test case in `llvm/test/CodeGen/SPIRV/hlsl-intrinsics/smoothstep.ll` - Create SPIR-V backend test case in `llvm/test/CodeGen/SPIRV/opencl/smoothstep.ll`
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called “LLVM”. This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.