This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Extend promote alloca vectorization
ClosedPublic

Authored by rampitec on Nov 7 2018, 12:20 PM.

Details

Summary

Promote alloca can vectorize a small array by bitcasting it to a
vector type. Extend vectorization for the case when alloca is
already a vector type. We still want to replace GEPs with an
insert/extract element instructions in this case.

Diff Detail

Repository
rL LLVM

Event Timeline

rampitec created this revision.Nov 7 2018, 12:20 PM
arsenm added inline comments.Nov 7 2018, 12:33 PM
test/CodeGen/AMDGPU/promote-alloca-vector-to-vector.ll
1–2 ↗(On Diff #172999)

Should have opt run lines

34 ↗(On Diff #172999)

Could use some tests with half/i16

rampitec updated this revision to Diff 173018.Nov 7 2018, 1:38 PM
rampitec marked 2 inline comments as done.

Added requested checks and tests.

arsenm accepted this revision.Nov 7 2018, 1:44 PM

LGTM

This revision is now accepted and ready to land.Nov 7 2018, 1:44 PM
This revision was automatically updated to reflect the committed changes.