On May 8, 2013, at 1:59 PM, Eric Christopher <echristo at gmail.com> wrote:> I can almost see that, but how is the intrinsic any different from a > conservative width for stores/loads where they're not handled by an > optimization pass? I'm assuming I'm missing something here. > > -ericI don't understand what you mean by "conservative width". -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130508/3ab8b040/attachment.html>
On Wed, May 8, 2013 at 3:31 PM, Nadav Rotem <nrotem at apple.com> wrote:> > On May 8, 2013, at 1:59 PM, Eric Christopher <echristo at gmail.com> wrote: > > I can almost see that, but how is the intrinsic any different from a > conservative width for stores/loads where they're not handled by an > optimization pass? I'm assuming I'm missing something here. > > -eric > > > I don't understand what you mean by "conservative width".Thinking that a masked store is conservatively a store of the full width of the store right? But Jim pointed out that anything merging loads would then need to merge the masks otherwise even if selection would work otherwise, any pass that merges loads would need to learn how to deal with masks. Not likely a deal killer since I don't think there are a lot of them, but it does explain why it's more work than having them pass through. -eric
On May 8, 2013, at 4:00 PM, Eric Christopher <echristo at gmail.com> wrote:> > Thinking that a masked store is conservatively a store of the full > width of the store right?It depends on the optimization. Consider this example: masked_store(Val, Ptr , M) X = masked_load(Ptr, M2) If you assume that your store actually overwrites everything in that memory location then you don't need to load that memory location again. You can simply use the stored value. However, in our example X != Val.> But Jim pointed out that anything merging loads would then need to > merge the masks otherwise even if selection would work otherwise, any > pass that merges loads would need to learn how to deal with masks. Not > likely a deal killer since I don't think there are a lot of them, but > it does explain why it's more work than having them pass through.I actually think that masks disrupt *everything* from alias analysis to SROA. If you ignore the mask bad thing will happen. You can't be conservative because you never know which way is 'conservative'. Should you assume that the mask is all zero or all one ? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130508/53f7105c/attachment.html>