<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<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>
<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" size="3" color="#2F5496"><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></body>
</html>