This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: libgcc: strange optimization


Michael Walle writes:
 > 
 > Hi,
 > 
 > > To confirm that try -fno-tree-ter.
 > 
 > "lm32-gcc -O1 -fno-tree-ter -S -c test.c" generates the following working
 > assembly code:
 > 
 > f2:
 > 	addi     sp, sp, -4
 > 	sw       (sp+4), ra
 > 	addi     r2, r0, 10
 > 	calli    __ashrsi3
 > 	addi     r8, r0, 10
 > 	scall
 > 	lw       ra, (sp+4)
 > 	addi     sp, sp, 4
 > 	b        ra

-fno-tree-ter also unbreaks the ARM test case in PR48863 comment #4.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]