diff options
author | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2015-01-07 17:33:03 +0000 |
---|---|---|
committer | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2015-01-07 17:33:03 +0000 |
commit | aa2d2909978df1a7d2f6ff79fea8b17da060110a (patch) | |
tree | 77406ddb61c0512826e01d00640f607fb0a51579 /llvm/lib/Target/X86/X86FrameLowering.cpp | |
parent | 94c60cd05efa96eafe9e0a06634e53382b72bc70 (diff) | |
download | bcm5719-llvm-aa2d2909978df1a7d2f6ff79fea8b17da060110a.tar.gz bcm5719-llvm-aa2d2909978df1a7d2f6ff79fea8b17da060110a.zip |
[X86] Teach FCOPYSIGN lowering to recognize constant magnitudes.
For code like:
float foo(float x) { return copysign(1.0, x); }
We used to generate:
andps <-0.000000e+00,0,0,0>, %xmm0
movss <1.000000e+00>, %xmm1
andps <nan>, %xmm1
orps %xmm0, %xmm1
Basically doing an abs(1.0f) in the two middle instructions.
We now generate:
andps <-0.000000e+00,0,0,0>, %xmm0
orps <1.000000e+00,0,0,0>, %xmm0
Builds on cleanups r223415, r223542.
rdar://19049548
Differential Revision: http://reviews.llvm.org/D6555
llvm-svn: 225357
Diffstat (limited to 'llvm/lib/Target/X86/X86FrameLowering.cpp')
0 files changed, 0 insertions, 0 deletions