<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="City"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="Street"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="place"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="address"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:"MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=blue style='word-wrap: break-word;-webkit-nbsp-mode: space;
-webkit-line-break: after-white-space'>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Evan,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> The one problem with this approach is
that the LegalizeDAG is expecting whatever I lower to have the same resulting
value as setcc, so I am still stuck using i32’s for my results no matter what
my initial type is. I’ve found a way around, by inserting the correct
conversion instruction manually, but my backend doesn’t require integer only
comparison results. Just seems like a waste to have all these conversion
instructions(which are fairly expensive) for each non-i32 based comparison.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
llvmdev-bounces@cs.uiuc.edu [mailto:llvmdev-bounces@cs.uiuc.edu] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Evan Cheng<br>
<b><span style='font-weight:bold'>Sent:</span></b> Saturday, October 25, 2008
4:17 PM<br>
<b><span style='font-weight:bold'>To:</span></b> <st1:PersonName w:st="on">LLVM
 Developers Mailing List</st1:PersonName><br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [LLVMdev] SetCC
tablegen pattern</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>That's how ISD::SETCC is specified. If you want to change that for your
target, you should custom lower these nodes to target nodes. Then you can
specify your own SDNode with your own SDTypeProfile.<o:p></o:p></span></font></p>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Evan<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>

<div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>On Oct 24, 2008, at 4:31 PM, <st1:PersonName w:st="on">Villmow, Micah</st1:PersonName>
wrote:<o:p></o:p></span></font></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><br>
<br>
<o:p></o:p></span></font></p>

<span style='orphans: 2;text-align:auto;widows: 2;-webkit-border-horizontal-spacing: 0px;
-webkit-border-vertical-spacing: 0px;-webkit-text-decorations-in-effect: none;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0;word-spacing:0px'><u1:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="City"><u1:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="place"><u1:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="Street"><u1:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="address">

<div link=blue vlink=purple>

<div>

<div>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:black'>I am attempting to match setcc
 using tablegen w/ the following patterns:<u1:p></u1:p></span></font><font
color=black><span style='color:black'><o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:black'>def
FEQ         : Instruction<(outs
GPRF32:$dst), (ins GPRF32:$src0, GPRF32:$src1), “eq $dst, $src0, $src1”, [(set
GPRF32:$dst, (seteq GPRF32:$src0, GPRF32:$src1))]>;<u1:p></u1:p></span></font><font
color=black><span style='color:black'><o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:black'><u1:p> </u1:p></span></font><font
color=black><span style='color:black'><o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:black'>And it is failing stating that the result
must be an integer. Is there a way around this other than modifying TargetSelectionDAG.td?
Also, why is it assumed that all comparison results are always integers?<u1:p></u1:p></span></font><font
color=black><span style='color:black'><o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:black'>If I put GPRI32 as my destination
register, it complains about register classes not matching……<u1:p></u1:p></span></font><font
color=black><span style='color:black'><o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:black'> <u1:p></u1:p></span></font><font
color=black><span style='color:black'><o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:black'><u1:p> </u1:p></span></font><font
color=black><span style='color:black'><o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:black'><u1:p> </u1:p></span></font><font
color=black><span style='color:black'><o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:black'>Micah Villmow<u1:p></u1:p></span></font><font
color=black><span style='color:black'><o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:black'>Systems Engineer<u1:p></u1:p></span></font><font
color=black><span style='color:black'><o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:black'>Advanced Technology & Performance<u1:p></u1:p></span></font><font
color=black><span style='color:black'><o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:black'>Advanced Micro Devices Inc.<u1:p></u1:p></span></font><font
color=black><span style='color:black'><o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><ns7:street u2:insauthor="Micah Villmow" u2:insdate="2008-10-24T16:24:00Z" u2:endinsauthor="Micah Villmow" u2:endinsdate="2008-10-24T16:24:00Z"><ns7:address u2:insauthor="Micah Villmow" u2:insdate="2008-10-24T16:24:00Z" u2:endinsauthor="Micah Villmow" u2:endinsdate="2008-10-24T16:24:00Z"><st1:street u2:st="on"><st1:address u2:st="on"><st1:Street
w:st="on"><st1:address w:st="on"><font size=2 color=black face=Arial><span
  style='font-size:10.0pt;font-family:Arial;color:black'>4555 Great America Pkwy</st1:address></st1:street></ns7:address></ns7:street></span></font></st1:address></st1:Street><font
size=2 color=black face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:black'>,<u1:p></u1:p></span></font><font color=black><span
style='color:black'><o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><ns7:place u2:insauthor="Micah Villmow" u2:insdate="2008-10-24T16:24:00Z" u2:endinsauthor="Micah Villmow" u2:endinsdate="2008-10-24T16:24:00Z"><ns7:city u2:insauthor="Micah Villmow" u2:insdate="2008-10-24T16:24:00Z" u2:endinsauthor="Micah Villmow" u2:endinsdate="2008-10-24T16:24:00Z"><st1:city u2:st="on"><st1:place u2:st="on"><st1:City
w:st="on"><st1:place w:st="on"><font size=2 color=black face=Arial><span
  style='font-size:10.0pt;font-family:Arial;color:black'>Santa Clara</st1:place></st1:city></ns7:city></ns7:place></span></font></st1:place></st1:City><font
size=2 color=black face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:black'>, CA. 95054<u1:p></u1:p></span></font><font color=black><span
style='color:black'><o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:black'>P: 408-572-6219<u1:p></u1:p></span></font><font
color=black><span style='color:black'><o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:black'>F: 408-572-6596</span></font><font
color=black><span style='color:black'><u1:p></u1:p><o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt;color:black'><u1:p> </u1:p><o:p></o:p></span></font></p>

</div>

</div>

<p class=MsoNormal><font size=1 color=black face=Helvetica><span
style='font-size:9.0pt;font-family:Helvetica;color:black'>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>
        <a
href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br>
<o:p></o:p></span></font></p>

</div>

</div>

</u1:smarttagtype></u1:smarttagtype></u1:smarttagtype></u1:smarttagtype>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'></span><o:p> </o:p></span></font></p>

</div>

</div>

</body>

</html>