llvm-6502/test/CodeGen
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
..
Alpha If dbg_declare() or dbg_value() is not lowered by isel then emit DEBUG message instead of creating DBG_VALUE for undefined value in reg0. 2010-12-06 22:39:26 +00:00
ARM Fix buggy fcopysign lowering. 2011-02-11 02:28:55 +00:00
Blackfin Remove TargetInstrInfo::copyRegToReg entirely. 2010-07-11 17:01:17 +00:00
CBackend
CellSPU Allow sign-extending of i8 and i16 to i128 on SPU. 2011-01-20 15:49:06 +00:00
CPP
Generic fix rdar://8878965, a regression I introduced with the recent 2011-01-18 20:53:04 +00:00
MBlaze Lower the MBlaze target specific calling conventions for "interrupt_handler" 2010-12-15 20:27:28 +00:00
Mips Add mips o32 tests again with the hope that the buildbot won't complaint again 2011-02-10 23:37:20 +00:00
MSP430 If dbg_declare() or dbg_value() is not lowered by isel then emit DEBUG message instead of creating DBG_VALUE for undefined value in reg0. 2010-12-06 22:39:26 +00:00
PowerPC Restore the behavior of frame lowering before my refactoring. 2010-12-18 19:53:14 +00:00
PTX ptx: add passing parameter to kernel functions 2011-02-10 12:01:24 +00:00
SPARC Pass sret arguments through the stack instead of through registers in Sparc backend. It makes the code generated more compliant with the sparc32 ABI. 2011-01-22 13:05:16 +00:00
SystemZ If dbg_declare() or dbg_value() is not lowered by isel then emit DEBUG message instead of creating DBG_VALUE for undefined value in reg0. 2010-12-06 22:39:26 +00:00
Thumb Sorry, several patches in one. 2011-01-20 08:34:58 +00:00
Thumb2 Move a test that ended up in the wrong place. 2011-02-05 04:15:50 +00:00
X86 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
XCore Add intrinsic for setc instruction on the XCore. 2011-02-09 13:22:12 +00:00