r276102 - [X86][SSE] Reimplement SSE fp2si conversion intrinsics instead of using generic IR

Hans Wennborg via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 22 06:18:57 PDT 2016


On Thu, Jul 21, 2016 at 6:34 PM, Robinson, Paul via cfe-commits
<cfe-commits at lists.llvm.org> wrote:
>
>
>> -----Original Message-----
>> From: cfe-commits [mailto:cfe-commits-bounces at lists.llvm.org] On Behalf Of
>> Simon Pilgrim via cfe-commits
>> Sent: Wednesday, July 20, 2016 3:18 AM
>> To: cfe-commits at lists.llvm.org
>> Subject: r276102 - [X86][SSE] Reimplement SSE fp2si conversion intrinsics
>> instead of using generic IR
>>
>> Author: rksimon
>> Date: Wed Jul 20 05:18:01 2016
>> New Revision: 276102
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=276102&view=rev
>> Log:
>> [X86][SSE] Reimplement SSE fp2si conversion intrinsics instead of using
>> generic IR
>>
>> D20859 and D20860 attempted to replace the SSE (V)CVTTPS2DQ and VCVTTPD2DQ
>> truncating conversions with generic IR instead.
>>
>> It turns out that the behaviour of these intrinsics is different enough
>> from generic IR that this will cause problems, INF/NAN/out of range values
>> are guaranteed to result in a 0x80000000 value - which plays havoc with
>> constant folding which converts them to either zero or UNDEF. This is also
>> an issue with the scalar implementations (which were already generic IR
>> and what I was trying to match).
>
> Are the problems enough that this should be merged to the 3.9 release branch?
> --paulr

IIUC, this is the Clang-side of r275981, and if we merge that this
should probably be merged too.

Thanks,
Hans


More information about the cfe-commits mailing list