[SPIRV] non-return function calls with no-store fixed
@@ -125,14 +125,17 @@ public class SPIRVNodeLIRBuilder extends NodeLIRBuilder {
throw new RuntimeException("[SPIRV] CAll with Vector types not supported yet");
}
final SPIRVDirectCall spirvDirectCall = new SPIRVDirectCall(callTarget, result, parameters, callState);
- if (isLegal(result)) {
+ SPIRVKind spirvKind = ((SPIRVKind) result.getPlatformKind());
+ if (isLegal(result) && spirvKind != SPIRVKind.OP_TYPE_VOID) {
AllocatableValue allocatableValue = gen.asAllocatable(result);
append(new SPIRVLIRStmt.AssignStmt(allocatableValue, spirvDirectCall));
setResult(callTarget, allocatableValue);
} else {
+ if (spirvKind == SPIRVKind.OP_TYPE_VOID) {
append(new SPIRVLIRStmt.ExprStmt(spirvDirectCall));
}
}
+ }
@Override
protected void emitIndirectCall(IndirectCallTargetNode callTarget, Value result, Value[] parameters, Value[] temps, LIRFrameState callState) {
