* How to reinterpret data in GIMPLE.
@ 2007-12-03 17:48 Sjodin, Jan
2007-12-03 17:54 ` Andrew Pinski
0 siblings, 1 reply; 2+ messages in thread
From: Sjodin, Jan @ 2007-12-03 17:48 UTC (permalink / raw)
To: gcc
I would like to reinterpret (not convert/cast) a 32-bit integer to a
32-bit float in GIMPLE. Is using a NOP_EXPR with the wanted type the
correct way of doing this?
The reinterpretation of a value is needed to optimize reads and writes
to unions. I modified the value numbering pass which worked fine, but
changing PRE to use a NOP_EXPR to change the type still resulted in a
conversion. It may be because of a bug somewhere else, but before doing
more work I would like to make sure that NOP_EXPR is the correct
operator.
Thanks,
Jan
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: How to reinterpret data in GIMPLE.
2007-12-03 17:48 How to reinterpret data in GIMPLE Sjodin, Jan
@ 2007-12-03 17:54 ` Andrew Pinski
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Pinski @ 2007-12-03 17:54 UTC (permalink / raw)
To: Sjodin, Jan; +Cc: gcc
On 12/3/07, Sjodin, Jan <Jan.Sjodin@amd.com> wrote:
> I would like to reinterpret (not convert/cast) a 32-bit integer to a
> 32-bit float in GIMPLE. Is using a NOP_EXPR with the wanted type the
> correct way of doing this?
You want to use the tree code called VIEW_CONVERT_EXPR.
Thanks,
Andrew Pinski
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-12-03 17:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-03 17:48 How to reinterpret data in GIMPLE Sjodin, Jan
2007-12-03 17:54 ` Andrew Pinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).