isSafeToSpeculativelyExecute() function contains more sophisticated checks
than Constant::canTrap(), so it appears to me that both functions should be
called to prevent optimizations that can harm.
I wasn't able to make a test, but absence of this check does cause trouble
with my local changes that disable certain kinds of optimizations to provide
IEEE754 conformant raising of FP exceptions, which I'd like to contribute.