[PATCH] D41761: Introduce llvm.nospeculateload intrinsic
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 18 12:26:06 PST 2018
efriedma added a comment.
I don't think it's likely the compiler would intentionally introduce a load using the same pointer as the operand to a speculationsafeload; given most transforms don't understand what speculationsafeload does, the compiler has no reason to introduce code like that (even if it isn't technically prohibited by LangRef).
More practically, I'm worried about the possibility that code which doesn't appear to be vulnerable at the source-code level will get lowered to assembly which is vulnerable. For example, the compiler could produce code where the CPU speculates a load from an uninitialized pointer value. Without an IR/MIR model for speculation, we have no way to prevent this from happening.
https://reviews.llvm.org/D41761
More information about the llvm-commits
mailing list