llvm-6502/lib
Evan Cheng c143dd4f63 Fix buggy fcopysign lowering.
This
define float @foo(float %x, float %y) nounwind readnone {
entry:
  %0 = tail call float @copysignf(float %x, float %y) nounwind readnone
  ret float %0
}

Was compiled to:
    vmov     s0, r1
    bic      r0, r0, #-2147483648
    vmov     s1, r0
    vcmpe.f32    s0, #0
    vmrs         apsr_nzcv, fpscr
    it           lt
    vneglt.f32   s1, s1
    vmov         r0, s1
    bx           lr

This fails to copy the sign of -0.0f because it's lost during the float to int
conversion. Also, it's sub-optimal when the inputs are in GPR registers.

Now it uses integer and + or operations when it's profitable. And it's correct!
    lsrs    r1, r1, #31
    bfi     r0, r1, #31, #1
    bx      lr
rdar://8984306


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125357 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-11 02:28:55 +00:00
..
Analysis Tolerate degenerate phi nodes that can occur in the middle of optimization 2011-02-10 23:54:10 +00:00
Archive Archive: Fix temp path names. 2011-01-17 16:43:30 +00:00
AsmParser implement .ll and .bc support for nsw/nuw on shl and exact on lshr/ashr. 2011-02-07 16:40:21 +00:00
Bitcode implement .ll and .bc support for nsw/nuw on shl and exact on lshr/ashr. 2011-02-07 16:40:21 +00:00
CodeGen After 3-addressifying a two-address instruction, update the register maps; add a missing check when considering whether it's profitable to commute. rdar://8977508. 2011-02-10 02:20:55 +00:00
CompilerDriver Support/Path: Deprecate PathV1::exists and replace all uses with PathV2::fs::exists. 2011-01-10 02:34:23 +00:00
ExecutionEngine Fix libffi usage when it is on a custom path. 2011-01-28 16:49:05 +00:00
Linker Correctly merge available_externally and regular definitions when they have 2011-02-01 05:33:52 +00:00
MC Fix comparator used for looking up previously instantiated EDDisassemblers. 2011-02-09 21:03:19 +00:00
Object Object: Fix type punned pointer issues by making DataRefImpl a union and using intptr_t. 2011-01-21 02:27:02 +00:00
Support Rip out realpath() support. It's expensive, and often a bad idea, and 2011-02-09 23:33:15 +00:00
Target Fix buggy fcopysign lowering. 2011-02-11 02:28:55 +00:00
Transforms If we can't avoid running loop-simplify twice for now, at least avoid running 2011-02-10 23:53:14 +00:00
VMCore switch the constantexpr, target folder, and IRBuilder interfaces 2011-02-10 07:01:55 +00:00
Makefile