This is an archive of the discontinued LLVM Phabricator instance.

[X86][AVX512] Autoupgrade lossless i32/u32 to f64 conversion intrinsics with generic IR
ClosedPublic

Authored by RKSimon on Nov 16 2016, 2:09 AM.

Details

Summary

Both the (V)CVTDQ2PD (i32 to f64) and (V)CVTUDQ2PD (u32 to f64) conversion instructions are lossless and can be safely represented as generic SINT_TO_FP/UINT_TO_FP calls instead of x86 intrinsics without affecting final codegen.

LLVM counterpart to D26686

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon updated this revision to Diff 78153.Nov 16 2016, 2:09 AM
RKSimon retitled this revision from to [X86][AVX512] Autoupgrade lossless i32/u32 to f64 conversion intrinsics with generic IR.
RKSimon updated this object.
RKSimon added reviewers: igorb, delena, craig.topper.
RKSimon set the repository for this revision to rL LLVM.
RKSimon added a subscriber: llvm-commits.
delena added inline comments.Nov 16 2016, 2:27 AM
test/CodeGen/X86/avx512vl-intrinsics-upgrade.ll
4594

Why is it scalar?

RKSimon updated this revision to Diff 78178.Nov 16 2016, 5:50 AM

Added vectorization fix for uitofp <2 x i32> to <2 x double>

test/CodeGen/X86/avx512vl-intrinsics-upgrade.ll
4594

Thanks for catching that!

delena accepted this revision.Nov 16 2016, 6:04 AM
delena edited edge metadata.
This revision is now accepted and ready to land.Nov 16 2016, 6:04 AM
This revision was automatically updated to reflect the committed changes.