codegen: Reduce the number of temporary variables

If a temporary variable has been generated internally,
do not create another regardless of whether it's floating or not.