Skip to content

Commit 948421f

Browse files
jacek-galazkasys_zuul
authored andcommitted
Add proper handling for placeholded bools in SPIRVReader
Change-Id: I8f673f5f125a8f4d7e2b3f909717a82075ef6b1a
1 parent 9b66796 commit 948421f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

IGC/AdaptorOCL/SPIRV/SPIRVReader.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1930,6 +1930,15 @@ SPIRVToLLVM::transCmpInst(SPIRVValue* BV, BasicBlock* BB, Function* F) {
19301930
transValue(BC->getOperand(0), F, BB),
19311931
transValue(BC->getOperand(1), F, BB));
19321932
IGC_ASSERT(Inst && "not implemented");
1933+
1934+
if (PlaceholderMap.count(BV) && Inst){
1935+
if (BV->getType()->isTypeBool())
1936+
Inst = cast<Instruction>(promoteBool(Inst, BB));
1937+
else
1938+
IGC_ASSERT(Inst->getType() == transType(BC->getType()));
1939+
1940+
IGC_ASSERT(Inst && "Out of memory");
1941+
}
19331942
return Inst;
19341943
}
19351944

0 commit comments

Comments
 (0)