If llvm.assume expression contains side effect, Clang doesn't codegen such llvm.assume. Otherwise, if the expr is "pure/const", it may survive the whole middlend pipeline.
The problem: AFAIK llvm.assume calls are not propagated to backend. This means the backend just drops it, but fails to eliminate dead instructions related to llvm.assumes.
Should fix PR43010.
The others look fine to me (although, honestly, I don't understand how var_annotation is really used), but dropping llvm::sideeffect in CGP makes me really nervous. This is necessary for correctness in the places where it's used, and could lead to invalid analysis/transformation results in post-CGP IR passes/analysis. I recommend not doing this here.