This comment:
> What needs to die is the belief that you can rely on just software (i.e. memory safety) for isolation between trusted and untrusted code
is an argument that doubting if statements should be acceptable, and that the assumption that only B has architecturally visible side effects when A is true is not sound. I disagree strongly with that.
You should be able to rely on software checks for some things. Going forward, the solution is not to rewrite software to not depend on software mechanisms (e.g. bounds checks) for protection (unclear what would be used instead...) but to fix the hardware so these software mechanisms work.
What needs to "die" is not "belief that you can rely on just software," but hardware that violates fundamental guarantees.
It sounds like we agree on this, I just wanted to make my point clear since I see now that my original comment was not clear.
FWIW, this is essentially the argument Torvalds made when Intel tried to add feature flags for non-broken speculation.
Even otherwise strictly in order designs, when aiming for high performance incorporate some form of memory speculation (scout threading, run ahead execution).
Edit: to be precise they can, for example, see the transition from exclusive to shared.
Not notifying other CPUs seems pointless because before committing you would have to do a round-trip to the other core to verify whether the data is still valid making the prefetching pointless.
A more practical solution is probably to have protection boundaries within the cache, like http://people.csail.mit.edu/vlk/dawg-micro18.pdf.
Given if f(A) B else C, one cannot safely assume that B only gets executed when A resolves to true. It is not reasonable to expect programmers to produce safe code in an environment where they have to doubt if statements.
This could be solved without any major overhauls in hardware, by just updating it to make speculative execution actually speculative and not commit any side effects until it knows it went down the correct branch.