cover src and dest are same or not; create inline functio to instrument save temp IRs