<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On May 24, 2015, at 9:04 PM, Zhang, Kewu <<a href="mailto:Kewu.Zhang@amd.com" class="">Kewu.Zhang@amd.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; direction: ltr; font-family: Tahoma; font-size: 10pt;" class="">Dear experts.<div class=""><br class=""></div><div class="">I am curious how the "<span style="font-family: Consolas, 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; font-size: 0.95em; line-height: 15.960000038146973px; background-color: rgb(248, 248, 248);" class=""><targettype> = fptrunc <sourcetype> <value> to <targettype>" is supported by the backends?  I searched all llvm directory with "fptrunc" key words, no lucky.</span></div><div class=""><span style="font-family: Consolas, 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; font-size: 0.95em; line-height: 15.960000038146973px; background-color: rgb(248, 248, 248);" class=""><br class=""></span></div><div class=""><span style="font-family: Consolas, 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; font-size: 0.95em; line-height: 15.960000038146973px; background-color: rgb(248, 248, 248);" class="">Is it supported by the front end itself?</span></div><div class=""><span style="font-family: Consolas, 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; font-size: 0.95em; line-height: 15.960000038146973px; background-color: rgb(248, 248, 248);" class=""><br class=""></span></div><div class=""><span style="font-family: Consolas, 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; font-size: 0.95em; line-height: 15.960000038146973px; background-color: rgb(248, 248, 248);" class="">if I have to support/overide it, </span><span style="font-size: 10pt;" class="">which ISD node I should map to?</span></div><div class=""><span style="background-color: rgb(248, 248, 248);" class="">why there is no such a node like "fptrunc" is defined  so I can write patterns for it?</span></div></div></div></blockquote><div><br class=""></div><div>I think that the SelectionDAG node that corresponds to fptrunc is called FP_ROUND. </div><div><br class=""></div><div><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_docs_doxygen_html_namespacellvm-5F1-5F1ISD.html&d=AwMF-g&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4_bhmuhMHA&m=ZGAMjJt-BTvGlcXoPgbWuloPQY3I1x-m2jigHYcC1aE&s=A01Vz2_-DelgbnXyexbOW7qT4MabVc3tgFE9Oq_5fP0&e=" class="">http://llvm.org/docs/doxygen/html/namespacellvm_1_1ISD.html</a></div><div><br class=""></div><div><br class="">FP_ROUND <span class="Apple-tab-span" style="white-space:pre">     </span> X = FP_ROUND(Y, TRUNC) - Rounding 'Y' from a larger floating point type down to the precision of the destination VT. <br class="">TRUNC is a flag, which is always an integer that is zero or one. If TRUNC is 0, this is a normal rounding, if it is 1, this FP_ROUND is known to not change the value of Y.<br class=""><br class=""><br class=""></div><div>— </div><div>Mehdi</div><div><br class=""></div></div></body></html>