Sorry, I don't remember the details, but do recall it being mentioned somewhere, can't remember, that this was just terrible to learn as morphine is the main pain killer in terminal cancer.
Most cancer patients do not suffer extreme pain through the course of their disease, by the time, they need the morphine, it probably does not materially affect their length of life.
Cancer treatment has come a long way in the last twenty years. There are many options for treating the various pains caused by the cancer without resorting to narcotics. At the end, when the whole system is breaking down, morphine, in addition to decreasing the pain,decreases the feeling of suffocation as the body becomes starved for oxygen. Morphine is an old drug but is still the friend of the dying man.