<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;">IIRC it’s not strictly possible to determine what array a load/store is based on. I don’t believe the decomposition is always possible, as information is lost when accesses are combined.</div>
<div name="messageSignatureSection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;"><br />
Neil</div>
<div name="messageReplySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;">On Apr 17, 2019, 12:31 PM -0700, Arsenault, Matthew <Matthew.Arsenault@amd.com>, wrote:<br />
<blockquote type="cite" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #1abc9c;">
<div class="WordSection1">
<p class="MsoNormal">This is really a codegen problem. You can decompose the load/store however you like in the backend. InstCombine should still combine the loads as a canonicalization.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">-Matt</p>
<p class="MsoNormal"> </p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From:</span></b> <span style="font-size:12.0pt;color:black">llvm-dev <llvm-dev-bounces@lists.llvm.org> on behalf of llvm-dev <llvm-dev@lists.llvm.org><br />
<b>Reply-To:</b> Neil Ryan <neilryan@cs.washington.edu><br />
<b>Date:</b> Wednesday, April 17, 2019 at 9:28 PM<br />
<b>To:</b> llvm-dev <llvm-dev@lists.llvm.org>, "tstellar@redhat.com" <tstellar@redhat.com><br />
<b>Subject:</b> Re: [llvm-dev] Disable combining of loads and stores in instcombine</span></p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div name="messageBodySection">
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Arial",sans-serif">I’m writing a pass for some custom hardware — we’d like to split arrays across hardware elements; this doesn’t work if consecutive writes to characters get combined to a word.</span></p>
</div>
<div name="messageReplySection">
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Arial",sans-serif">On Apr 16, 2019, 8:17 PM -0700, Tom Stellard <tstellar@redhat.com>, wrote:<br />
<br /></span></p>
<blockquote style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #e67e22;">
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Arial",sans-serif">On 04/16/2019 11:38 AM, Neil Ryan via llvm-dev wrote:<br />
<br /></span></p>
<blockquote style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #3498db;">
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:10.5pt;font-family:"Arial",sans-serif">LLVM's optimizer combines stores to consecutive characters into a write of a single word. For instance, if I have char A[4] and I write some static value to each element, these writes would be combined into a single 32-bit word write. I found this thread <http://llvm.1065342.n5.nabble.com/disabling-combining-load-stores-in-optimizer-td37560.html> from 2009 -- it seems like it wasn't possible then. Has anything changed since?</span></p>
</blockquote>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Arial",sans-serif"><br />
Why do you want to disable this optimization?<br />
<br />
-Tom<br />
<br />
<br />
<br /></span></p>
<blockquote style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #3498db;">
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:10.5pt;font-family:"Arial",sans-serif">Neil<br />
<br />
<br />
_______________________________________________<br />
LLVM Developers mailing list<br />
llvm-dev@lists.llvm.org<br />
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</span></p>
</blockquote>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Arial",sans-serif"> </span></p>
</blockquote>
</div>
</div>
</blockquote>
</div>
</body>
</html>