Use the function template getSubtarget to remove an explicit cast.