[llvm] [Spirv][HLSL] Add OpAll lowering and float vec support (PR #87952)
Vyacheslav Levytskyy via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 8 07:10:09 PDT 2024
================
@@ -1391,9 +1452,35 @@ bool SPIRVInstructionSelector::selectFCmp(Register ResVReg,
Register SPIRVInstructionSelector::buildZerosVal(const SPIRVType *ResType,
MachineInstr &I) const {
+ // OpenCL uses nulls for Zero. In HLSL we don't use null constants.
+ bool ZeroAsNull = STI.isOpenCLEnv();
+ if (ResType->getOpcode() == SPIRV::OpTypeVector)
+ return GR.getOrCreateConstVector(0UL, I, ResType, TII, ZeroAsNull);
+ return GR.getOrCreateConstInt(0, I, ResType, TII, ZeroAsNull);
+}
+
+APFloat getZeroFP(const Type *LLVMFloatTy) {
----------------
VyacheslavLevytskyy wrote:
I mean just a free standing static fun, like isGenericCastablePtr or isUSMStorageClass
https://github.com/llvm/llvm-project/pull/87952
More information about the llvm-commits
mailing list