llvm-project
llvm-project copied to clipboard
[SPIRV][DirectX][HLSL] Move `step` implementation to `hlsl_intrinsics.h`
- Remove
Intrinsic::dx_stepandIntrinsic::spv_step - Remove
BI__builtin_hlsl_step - Remove
BI__builtin_hlsl_stepSema checks fromclang/lib/Sema/SemaHLSL.cpp - Remove
getStepIntrinsicfromclang/lib/CodeGen/CGHLSLRuntime.h - Remove emitting intrinsic from
clang/lib/CodeGen/CGBuiltin.cpp - Remove
expandStepIntrinsicinllvm/lib/Target/DirectX/DXILIntrinsicExpansion.cpp - Implement step algorithm in
hlsl_intrinsics.hvia tablegen - (Follow-up) add a pattern match for step as an InstCombine in
llvm/lib/Target/SPIRV/SPIRVPreLegalizerCombiner.cppto be able to still emit the step GL extension.
For any future implementer I would like the pattern matching to be a separate pr from the movement to the code from the backends to the HLSL header.
Pattern matching will be a separate follow-up issue: #214862