optimize away bitcasts to variables that will only be used in an assign to the parallel heap type
remove unneeded outside |0 when a sequence ends in a safe bitop