<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<div class="moz-cite-prefix">On 01/15/2018 12:21 PM, Demikhovsky,
Elena wrote:<br>
</div>
<blockquote type="cite"
cite="mid:A0DC88CEB3010344830D52D66533DA8E7E62E4D2@LCSMSX154.ger.corp.intel.com">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
<font face="Calibri" size="2"><span style="font-size:11pt;">
<div style="text-indent:-17.85pt;padding-left:46.2pt;">Hi all,</div>
<div style="text-indent:-17.85pt;padding-left:46.2pt;"> </div>
<div style="text-indent:-17.85pt;padding-left:46.2pt;">I’m
working on an out-of-tree target and encountered the
following problem:</div>
<div style="text-indent:-17.85pt;padding-left:46.2pt;"> </div>
<div style="text-indent:-17.85pt;padding-left:46.2pt;">InstCombiner
“normalizes” GEPs and extends Index operand to the Pointer
width.</div>
<div style="text-indent:-17.85pt;padding-left:46.2pt;">It
works fine if you can convert pointer to integer for address
calculation and I assume that all registered targets do
this.</div>
<div style="text-indent:-17.85pt;padding-left:46.2pt;"> </div>
<div style="text-indent:-17.85pt;padding-left:46.2pt;">The
target I’m working on has very restricted ISA for the
pointer calculation:</div>
<div style="text-indent:-17.85pt;padding-left:46.2pt;">ptr +
int, ptr - int, ptr - ptr and ptr-compare</div>
<div style="text-indent:-17.85pt;padding-left:46.2pt;"> </div>
<div style="text-indent:-17.85pt;padding-left:46.2pt;">I have
full arithmetic set for 32-bit integers, but the Ptr is
wider. Extending index to the Ptr width requires full
arithmetic support for pointers.</div>
<div style="text-indent:-17.85pt;padding-left:46.2pt;">But,
actually, it does not come from C-sources (casting Ptr to
int means truncation).</div>
<div style="text-indent:-17.85pt;padding-left:46.2pt;"> </div>
<div style="text-indent:-17.85pt;padding-left:46.2pt;">I’d
like to add TTI (TargetTransformInfo) to InstCombiner in
order to configure the width of GEP indices.</div>
<div style="text-indent:-17.85pt;padding-left:46.2pt;">The
current default behavior will be preserved.</div>
<div style="text-indent:-17.85pt;padding-left:46.2pt;">What do
you think?</div>
</span></font></blockquote>
<br>
Given that this affects the canonical form of the IR, based on our
current practice, it should go in DataLayout (not in TTI).
InstCombine should probably know how to do the right thing for the
IR even if the particular target is not compiled in.<br>
<br>
-Hal<br>
<br>
<blockquote type="cite"
cite="mid:A0DC88CEB3010344830D52D66533DA8E7E62E4D2@LCSMSX154.ger.corp.intel.com"><font
face="Calibri" size="2"><span style="font-size:11pt;">
<div style="text-indent:-17.85pt;padding-left:46.2pt;"> </div>
<div style="text-indent:-17.85pt;padding-left:46.2pt;">Thanks.</div>
<div style="text-indent:-17.85pt;padding-left:46.2pt;"> </div>
<ul style="margin:0;padding-left:36pt;">
<font face="Times New Roman" color="#2F5496" size="3"><span
style="font-size:12pt;">
<li><b><i> Elena</i></b></li>
</span></font>
</ul>
<div> </div>
<div style="text-indent:-17.85pt;padding-left:46.2pt;"> </div>
<div style="text-indent:-17.85pt;padding-left:46.2pt;"> </div>
</span></font>
<p>---------------------------------------------------------------------<br>
Intel Israel (74) Limited</p>
<p>This e-mail and any attachments may contain confidential
material for<br>
the sole use of the intended recipient(s). Any review or
distribution<br>
by others is strictly prohibited. If you are not the intended<br>
recipient, please contact the sender and delete all copies.</p>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory</pre>
</body>
</html>