This is an archive of the discontinued LLVM Phabricator instance.

Scalarizer for masked vector intrinsics
ClosedPublic

Authored by delena on Nov 27 2014, 4:18 AM.

Details

Summary

Masked vector intrinsics are a part of common LLVM IR, but they are really supported on AVX2 and AVX-512 targets. I added a code that translates masked intrinsic for all other targets. The masked vector intrinsic is converted to a chain of scalar operations inside conditional basic blocks.
See more comments and code examples inside.

Diff Detail

Event Timeline

delena updated this revision to Diff 16683.Nov 27 2014, 4:18 AM
delena retitled this revision from to Scalarizer for masked vector intrinsics.
delena updated this object.
delena edited the test plan for this revision. (Show Details)
delena set the repository for this revision to rL LLVM.
delena added a subscriber: Unknown Object (MLST).
hfinkel added inline comments.Nov 27 2014, 10:31 AM
lib/CodeGen/CodeGenPrepare.cpp
229–235

We already have a ModifiedDT variable, can we reuse that?

Regardless, you need to set ModifiedDT to true (or update the DT manually) because CGP preserves the dominator tree.

941

This can be an 'inbounds' GEP, right?

1035

Same here; inbounds GEP?

delena updated this revision to Diff 17029.Dec 7 2014, 11:27 PM
delena edited reviewers, added: nadav, aschwaighofer; removed: rob.khasanov.

I applied all Hal's comments regarding inbounds GEP and ModifiedDT variable.

hfinkel accepted this revision.Dec 8 2014, 5:55 AM
hfinkel edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Dec 8 2014, 5:55 AM

Since vectorizer is re-committed, I'd like to proceed with the scalarizer.
Do you have any comments on this patch?

Thank you.

  • Elena
delena closed this revision.Oct 25 2015, 12:00 AM