[Bug target/106708] New: [rs6000] 64bit constant generation with oris xoris
guojiufu at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Aug 22 09:37:54 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106708
Bug ID: 106708
Summary: [rs6000] 64bit constant generation with oris xoris
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: guojiufu at gcc dot gnu.org
Target Milestone: ---
For code: t.c
void foo (long *arg)
{
*arg++ = 0x98765432ULL;
*arg++ = 0xffffffff7cdeab55ULL;
*arg++ = 0xffffffff65430000ULL;
}
gcc -O2 -S t.c
lis 10,0xffff
lis 8,0x9876
ori 10,10,0x7cde
lis 9,0xffff
ori 8,8,0x5432
sldi 10,10,16
ori 9,9,0x6543
rldicl 8,8,0,32
ori 10,10,0xab55
sldi 9,9,16
Below sequences would be better:
li 8,21554
li 10,-21675
lis 9,0xe543
oris 8,8,0x9876
xoris 10,10,0x8321
xoris 9,9,0x8000
More information about the Gcc-bugs
mailing list