Page MenuHomePhabricator

SVML support for log2
ClosedPublic

Authored by ayermolo on Aug 27 2020, 11:22 AM.

Details

Summary

Although LLVM supports vectorization of loops containing log2, it did not support using SVML implementation of it. Added support so that when clang is invoked with -fveclib=SVML now an appropriate SVML library log2 implementation will be invoked.

Follow up on: https://reviews.llvm.org/D77114

Tests:
Added unit tests to svml-calls.ll, svml-calls-finite.ll. Can be run with llvm-lint.
Created a simple c++ file that tests log2, and used clang+ to build it, and output final assembly.

Diff Detail

Event Timeline

ayermolo requested review of this revision.Aug 27 2020, 11:22 AM
ayermolo created this revision.
ayermolo updated this revision to Diff 288428.Aug 27 2020, 12:33 PM
ayermolo updated this revision to Diff 289039.Aug 31 2020, 4:03 PM

Hi, can someone take a look at this please?

Thanks

wenlei accepted this revision.Sep 2 2020, 11:56 AM

LGTM. I'd recommend wait a few days for other reviewers.

This revision is now accepted and ready to land.Sep 2 2020, 11:56 AM
This revision was automatically updated to reflect the committed changes.

Landed on behalf of @ayermolo ..