All,
This patch adds patterns for VCVT{A,N, P,M}. Patterns for lowering libm calls to VCVT{A,N,P,M}, e.g. (int)floorf(float) => VCVTM.s32.f32, are also included. Please have a look.
Regards,
Chad
Differential D5033
[AArch32] Added patterns for VCVT{A,N, P,M}. mcrosier on Aug 22 2014, 3:35 PM. Authored by
Details
Diff Detail Event TimelineComment Actions First, thanks for adding these. The changes to the table data looks fine. I think that you should add a bit more test coverage though. The hard float shouldn't matter towards use of these instructions. So, I think you should also test gnueabi. Furthermore, I believe that these instructions are also available on non-v8 hardware if you have a NEON FPU. So, it may be nice to also add cases for armv7 with neon on hard float and soft float. The tests would be identical in those cases, simply a matter of adding the appropriate RUN lines. Comment Actions Shouldn't matter, but adding won't hurt either. Is VCVTN tested elsewhere?
AFAIK, VCVT with user rounding in ARMv7 can only be done via the FPSCR, which is not the same thing here (and will need more code if there isn't already). These tests are clearly for v8, so I'm fine with it the way it is. cheers, Comment Actions I went ahead and committed this in r216388, per Renato's feedback. This was only designed to target ARMv8 and I'll defer any additional improvements to a later patch. Chad Comment Actions Thanks! I think making this work in v7 will involve a lot more thinking, since this changes the FPSCR register, even if for a brief moment, while exception can still occur. It's a whole new problem. |