all the research I can find indicates there is not sufficient evidence to conclude that non-human animals understand personal mortality, so given the choice, the pig would even understand.
the pig was slaughtered in the past, before I walked into the store or decided what I’m eating this week. everyone involved was paid before all that, too.