loopBody = generateComputeSampleWeightAndCheckGreaterThanZero(context, loopBody, sampleWeightVariable, masksBlock, sampleWeightsBlock, positionVariable);
}
// Otherwise just check the mask
else {
IfStatementBuilder builder = ifStatementBuilder(context);
builder.comment("if(testMask(%s, position))", masksBlock.getName())
.condition(new Block(context)
.getVariable(masksBlock)
.getVariable(positionVariable)
.invokeStatic(CompilerOperations.class, "testMask", boolean.class, com.facebook.presto.spi.block.Block.class, int.class))
.ifTrue(loopBody)