This is an archive of the discontinued LLVM Phabricator instance.

[LLVM][X86][SSE] Update MOVNTDQA non-temporal loads to generic implementation
ClosedPublic

Authored by RKSimon on Apr 6 2017, 9:04 AM.

Details

Summary

MOVNTDQA non-temporal aligned vector loads can be correctly represented using generic builtin loads, allowing us to remove the existing x86 intrinsics.

The Clang companion patch can be found at D31766

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon created this revision.Apr 6 2017, 9:04 AM
craig.topper added inline comments.Apr 7 2017, 9:53 PM
lib/IR/AutoUpgrade.cpp
1878 ↗(On Diff #94380)

I know we already do this in several places in this file, but why do we need a SmallVector of 1? Won't a single Metadata * variable auto convert to ArrayRef for the MDNode::get call?

1884 ↗(On Diff #94380)

Do we need a VectorType for the two calls that use this or could it just be generic Type*?

RKSimon added inline comments.Apr 10 2017, 10:59 AM
lib/IR/AutoUpgrade.cpp
1878 ↗(On Diff #94380)

OK - I'll fix it in this one and fix the others as followups.

1884 ↗(On Diff #94380)

IIRC we need the VectorType for the getBitWidth() call.

craig.topper added inline comments.Apr 10 2017, 11:14 AM
lib/IR/AutoUpgrade.cpp
1884 ↗(On Diff #94380)

Right, forgot getBitWidth has to multiply the elements with the scalar width.

RKSimon updated this revision to Diff 94794.Apr 11 2017, 1:14 AM

Updated based on Craig's feedback

craig.topper accepted this revision.Apr 11 2017, 9:29 AM

LGTM.

Did we really not have tests for the avx512 and sse41 versions?

This revision is now accepted and ready to land.Apr 11 2017, 9:29 AM

LGTM.

Did we really not have tests for the avx512 and sse41 versions?

Nope and I'm not sure why not.