replace &-1 with |0 at the end of the optimization pipeline