This reverts commit fdb87640, and thus re-enables terminator folding for RISCV. The reported miscompile has been fixed in f5dd70c5.