mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-22 02:05:01 +00:00
constant materialization could be improved.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92921 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3d594fd299
commit
ddac706747
@ -5,6 +5,39 @@ TODO:
|
||||
* implement do-loop -> bdnz transform
|
||||
* lmw/stmw pass a la arm load store optimizer for prolog/epilog
|
||||
|
||||
===-------------------------------------------------------------------------===
|
||||
|
||||
On PPC64, this:
|
||||
|
||||
long f2 (long x) { return 0xfffffff000000000UL; }
|
||||
long f3 (long x) { return 0x1ffffffffUL; }
|
||||
|
||||
could compile into:
|
||||
|
||||
_f2:
|
||||
li r3,-1
|
||||
rldicr r3,r3,0,27
|
||||
blr
|
||||
_f3:
|
||||
li r3,-1
|
||||
rldicl r3,r3,0,31
|
||||
blr
|
||||
|
||||
we produce:
|
||||
|
||||
_f2:
|
||||
lis r2, 4095
|
||||
ori r2, r2, 65535
|
||||
sldi r3, r2, 36
|
||||
blr
|
||||
_f3:
|
||||
li r2, 1
|
||||
sldi r2, r2, 32
|
||||
oris r2, r2, 65535
|
||||
ori r3, r2, 65535
|
||||
blr
|
||||
|
||||
|
||||
===-------------------------------------------------------------------------===
|
||||
|
||||
Support 'update' load/store instructions. These are cracked on the G5, but are
|
||||
|
Loading…
x
Reference in New Issue
Block a user