[llvm-commits] [llvm] r107852 - in /llvm/trunk: lib/Target/ARM/ARMISelLowering.cpp lib/Target/ARM/ARMISelLowering.h test/CodeGen/ARM/fpcmp-opt.ll
Evan Cheng
evan.cheng at apple.com
Wed Jul 7 23:01:42 PDT 2010
On Jul 7, 2010, at 10:43 PM, Anton Korobeynikov wrote:
> Hello, Evan
>
>> Optimize some vfp comparisons to integer ones. This patch implements the simplest case when the following conditions are met:
> Any reasons of doing this? This looks like a pretty expensive change
> and ARM manuals explicitly tell not to do so.
Which manual? Why would it be expensive?
before:
vldr.32 s0, [r1]
vldr.32 s1, [r0]
vcmpe.f32 s1, s0
vmrs apsr_nzcv, fpscr
beq LBB0_2
after:
ldr r1, [r1]
ldr r0, [r0]
cmp r0, r1
beq LBB0_2
On Cortex-a8 vmrs is very expensive. But even on a9 the integer version should be faster.
Evan
>
> --
> With best regards, Anton Korobeynikov
> Faculty of Mathematics and Mechanics, Saint Petersburg State University
More information about the llvm-commits
mailing list