Page MenuHomePhabricator

[X86][SSE] Replace (V)CVTTPS2DQ and VCVTTPD2DQ truncating (round to zero) f32/f64 to i32 with generic IR (clang)
ClosedPublic

Authored by RKSimon on Jun 1 2016, 5:38 AM.

Details

Summary

The 'cvtt' truncation (round to zero) conversions can be safely represented as generic __builtin_convertvector (fptosi) calls instead of x86 intrinsics.

We already do this (implicitly) for the scalar equivalents.

Note: I looked at updating _mm_cvttpd_epi32 as well but this still requires a lot more backend work to correctly lower (both for debug and optimized builds).

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon updated this revision to Diff 59204.Jun 1 2016, 5:38 AM
RKSimon retitled this revision from to [X86][SSE] Replace (V)CVTTPS2DQ and VCVTTPD2DQ truncating (round to zero) f32/f64 to i32 with generic IR (clang).
RKSimon updated this object.
RKSimon set the repository for this revision to rL LLVM.
RKSimon added a subscriber: cfe-commits.
ab accepted this revision.Jun 1 2016, 7:58 AM
ab edited edge metadata.

LGTM

This revision is now accepted and ready to land.Jun 1 2016, 7:58 AM
This revision was automatically updated to reflect the committed changes.