[PATCH] D21271: Fix `InstCombine` to not widen metadata on store-to-load forwarding

Yichao Yu via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 12 19:57:33 PDT 2016


yuyichao marked an inline comment as done.
yuyichao added a comment.

> Not sure what the question is here. You don't need to touch the metadata in store->load forwarding: you're erasing the load, and the semantics of the store aren't affected by a subsequent load.


Erasing a load is not the question, the question is that why is the optimizer allowed to create load with wrong metadata and the load CSE doesn't feel like the right place to handle this. It seems that if the optimizer somehow can't prove that the metadata is valid, it should just strip the metadata first instead of letting other passes remove the invalid.


http://reviews.llvm.org/D21271





More information about the llvm-commits mailing list