[SPIRV][CodeGen] Types for binary ops fixed
@@ -104,8 +104,8 @@ public class SPIRVBinary {
SPIRVKind spirvKind = (SPIRVKind) lirKind.getPlatformKind();
SPIRVId typeOperation = asm.primitives.getTypePrimitive(spirvKind);
- SPIRVId a = getId(x, asm, typeOperation, spirvKind);
- SPIRVId b = getId(y, asm, typeOperation, spirvKind);
+ SPIRVId a = getId(x, asm, typeOperation, (SPIRVKind) x.getPlatformKind());
+ SPIRVId b = getId(y, asm, typeOperation, (SPIRVKind) y.getPlatformKind());
SPIRVLogger.traceCodeGen("emit SPIRVOpIAdd: " + x + " + " + y);
@@ -133,8 +133,6 @@ public class SPIRVBinary {
@Override
public void emit(SPIRVCompilationResultBuilder crb, SPIRVAssembler asm) {
- LIRKind lirKind = getLIRKind();
- SPIRVKind spirvKind = (SPIRVKind) lirKind.getPlatformKind();
SPIRVId typeOperation = asm.primitives.getTypePrimitive(SPIRVKind.OP_TYPE_INT_32);
SPIRVId a = getId(x, asm, typeOperation, (SPIRVKind) x.getPlatformKind());
@@ -169,8 +167,8 @@ public class SPIRVBinary {
SPIRVKind spirvKind = (SPIRVKind) lirKind.getPlatformKind();
SPIRVId typeOperation = asm.primitives.getTypePrimitive(spirvKind);
- SPIRVId a = getId(x, asm, typeOperation, spirvKind);
- SPIRVId b = getId(y, asm, typeOperation, spirvKind);
+ SPIRVId a = getId(x, asm, typeOperation, (SPIRVKind) x.getPlatformKind());
+ SPIRVId b = getId(y, asm, typeOperation, (SPIRVKind) y.getPlatformKind());
SPIRVLogger.traceCodeGen("emit SPIRVOpShiftLeftLogical: " + x + " << " + y);
