On a Flex fare, you will always lose your upgrade and end up on the wait-list. Even if there happens to be R space available, you may have trouble getting an immediate confirmation at the airport.
On Latitude flight passes (within North America), you may SDC and keep the upgrade without any trouble. Any J seat will be available to you, ahead of all gate upgrades.
On other Latitude fares, policies should be the same as Flex above, but YMMV from time to time.