[HLSL][SPIRV] Add any intrinsic lowering (#88325)
commit105dcc882cf0152baeaa02ac0e50e2527b6940db
authorFarzon Lotfi <1802579+farzonl@users.noreply.github.com>
Mon, 15 Apr 2024 13:52:47 +0000 (15 06:52 -0700)
committerGitHub <noreply@github.com>
Mon, 15 Apr 2024 13:52:47 +0000 (15 09:52 -0400)
tree1ac3109ed0c74c2b6fa7f606a40827de099318c8
parent67e733d36ef0c5ec9fab899ecf9f191d83c7d418
[HLSL][SPIRV] Add any intrinsic lowering (#88325)

- `CGBuiltin.cpp` - Switch to using
`CGM.getHLSLRuntime().get##NAME##Intrinsic()`
- `CGHLSLRuntime.h` - Add any to backend intrinsic abstraction
-  `IntrinsicsSPIRV.td` - Add any intrinsic to SPIR-V.
- `SPIRVInstructionSelector.cpp` - Add means of selecting any intrinsic.
Any and All share the same behavior up to the opCode. They are only
different in vector cases.

Completes #88045
clang/lib/CodeGen/CGBuiltin.cpp
clang/lib/CodeGen/CGHLSLRuntime.h
clang/test/CodeGenHLSL/builtins/any.hlsl
llvm/include/llvm/IR/IntrinsicsSPIRV.td
llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
llvm/test/CodeGen/SPIRV/hlsl-intrinsics/any.ll [new file with mode: 0644]