> On May 24, 2015, at 9:04 PM, Zhang, Kewu <Kewu.Zhang at amd.com>
wrote:
>
> Dear experts.
>
> I am curious how the "<targettype> = fptrunc <sourcetype>
<value> to <targettype>" is supported by the backends? I
searched all llvm directory with "fptrunc" key words, no lucky.
>
> Is it supported by the front end itself?
>
> if I have to support/overide it, which ISD node I should map to?
> why there is no such a node like "fptrunc" is defined so I can
write patterns for it?
I think that the SelectionDAG node that corresponds to fptrunc is called
FP_ROUND.
http://llvm.org/docs/doxygen/html/namespacellvm_1_1ISD.html
<http://llvm.org/docs/doxygen/html/namespacellvm_1_1ISD.html>
FP_ROUND X = FP_ROUND(Y, TRUNC) - Rounding 'Y' from a larger floating
point type down to the precision of the destination VT.
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.
—
Mehdi
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20150524/87924e6b/attachment.html>