This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Immediates propagated wrongly in stores
- From: Jean Christophe Beyler <jean dot christophe dot beyler at gmail dot com>
- To: gcc at gcc dot gnu dot org
- Date: Wed, 1 Jul 2009 11:36:27 -0400
- Subject: Immediates propagated wrongly in stores
Dear all,
I have this weird issue that I can't really understand:
In my architecture I do not have a store immediate into memory, I have
to go through a register.
However, the compiler is currently propagating constants into the
stores. So for example:
(insn 44 43 45 4 st3.c:21 (set (reg:DI 119)
(const_int 1 [0x1])) -1 (nil))
(insn 45 44 46 4 st3.c:21 (set (mem/s:DI (reg:DI 109 [ ivtmp.43 ]) [2
data S8 A64])
(reg:DI 119)) -1 (nil))
is transformed into :
(insn 46 44 48 3 st3.c:22 (set (mem/s:DI (reg:DI 109 [ ivtmp.43 ]) [2
data S8 A64])
(const_int 1 [0x1])) 72 {movdi_internal1} (expr_list:REG_EQUAL
(const_int 1 [0x1])
(nil)))
I tracked it down to the gcse pass. However, I thought I had turned
this off in the definition of a movdi in my machine description. But
apparently this is not sufficient, any ideas?
As always, thanks for your time,
Jean Christophe Beyler