[all-commits] [llvm/llvm-project] 40c1d5: [HLSL] Implement the `smoothstep` intrinsic (#132288)

Kaitlin Peng via All-commits all-commits at lists.llvm.org
Fri Mar 28 21:47:47 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 40c1d50024f8f0306b8601559d69663ae3d2d9bb
      https://github.com/llvm/llvm-project/commit/40c1d50024f8f0306b8601559d69663ae3d2d9bb
  Author: Kaitlin Peng <kaitlinpeng at microsoft.com>
  Date:   2025-03-29 (Sat, 29 Mar 2025)

  Changed paths:
    M clang/include/clang/Basic/BuiltinsSPIRV.td
    M clang/lib/CodeGen/TargetBuiltins/SPIR.cpp
    M clang/lib/Headers/hlsl/hlsl_intrinsic_helpers.h
    M clang/lib/Headers/hlsl/hlsl_intrinsics.h
    M clang/lib/Sema/SemaSPIRV.cpp
    A clang/test/CodeGenHLSL/builtins/smoothstep.hlsl
    A clang/test/CodeGenSPIRV/Builtins/smoothstep.c
    A clang/test/SemaHLSL/BuiltIns/smoothstep-errors.hlsl
    A clang/test/SemaSPIRV/BuiltIns/smoothstep-errors.c
    M llvm/include/llvm/IR/IntrinsicsSPIRV.td
    M llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
    A llvm/test/CodeGen/SPIRV/hlsl-intrinsics/smoothstep.ll
    A llvm/test/CodeGen/SPIRV/opencl/smoothstep.ll

  Log Message:
  -----------
  [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`



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list