mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-14 07:31:39 +00:00
add the 'lucas' optimization
llvm-svn: 25830
This commit is contained in:
parent
213a7b78fb
commit
830b1ad8cf
@ -402,3 +402,28 @@ Implement TargetConstantVec, and set up PPC to custom lower ConstantVec into
|
||||
TargetConstantVec's if it's one of the many forms that are algorithmically
|
||||
computable using the spiffy altivec instructions.
|
||||
|
||||
===-------------------------------------------------------------------------===
|
||||
|
||||
Compile this:
|
||||
|
||||
double %test(double %X) {
|
||||
%Y = cast double %X to long
|
||||
%Z = cast long %Y to double
|
||||
ret double %Z
|
||||
}
|
||||
|
||||
to this:
|
||||
|
||||
_test:
|
||||
fctidz f0, f1
|
||||
stfd f0, -8(r1)
|
||||
lwz r2, -4(r1)
|
||||
lwz r3, -8(r1)
|
||||
stw r2, -12(r1)
|
||||
stw r3, -16(r1)
|
||||
lfd f0, -16(r1)
|
||||
fcfid f1, f0
|
||||
blr
|
||||
|
||||
without the lwz/stw's.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user