arsenm added a comment. I don't this is generally OK. It will probably work now since we only use SMRD currently for constant memory, but if it were a volatile load it can't be rematerialized. The generic version checks the AA if the load is invariant. http://reviews.llvm.org/D11621