[llvm-dev] invariant.load metadata semantics
Sanjoy Das via llvm-dev
llvm-dev at lists.llvm.org
Thu Aug 25 17:36:39 PDT 2016
Hi Michael,
Michael Kuperstein wrote:
>
>
> Yes, that is what I had in mind. Moreover, in
>
> func()
> {
> int k = load a, invariant.load !1
> print(k);
> store a, 5
> }
>
> k can be optimized to 5, in a form of "time traveling store
> forwarding" :). The store (at least if non-atomic and non-volatile)
> is also trivially dead.
>
>
> Only if we know that print() returns, right?
Yes.
-- Sanjoy
More information about the llvm-dev
mailing list