This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
How to reinterpret data in GIMPLE.
- From: "Sjodin, Jan" <Jan dot Sjodin at amd dot com>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 3 Dec 2007 11:47:40 -0600
- Subject: How to reinterpret data in GIMPLE.
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