[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 03:54:01 PDT 2024
================
@@ -1155,6 +1160,62 @@ static unsigned getBoolCmpOpcode(unsigned PredNum) {
}
}
+bool SPIRVInstructionSelector::selectAll(Register ResVReg,
+ const SPIRVType *ResType,
+ MachineInstr &I) const {
+ assert(I.getNumOperands() == 3);
+ assert(I.getOperand(2).isReg());
+ MachineBasicBlock &BB = *I.getParent();
+ Register InputRegister = I.getOperand(2).getReg();
+ SPIRVType *InputType = GR.getSPIRVTypeForVReg(InputRegister);
----------------
VyacheslavLevytskyy wrote:
Would it make sense to report_fatal_error() or similar diagnostics if InputType is `nullptr`? It's not expected of course, but `I` and its arguments arrive from previous passes, so it could be invalid if anything goes wrong earlier.
https://github.com/llvm/llvm-project/pull/87952
More information about the llvm-commits
mailing list