Page MenuHomePhabricator

GlobalISel: Make buildConstant handle vectors
ClosedPublic

Authored by arsenm on Jan 17 2019, 2:17 AM.

Details

Summary

Produce a splat build_vector similar to how
SelectionDAG::getConstant does.

Diff Detail

Event Timeline

arsenm created this revision.Jan 17 2019, 2:17 AM

Could you please add a test case for the vector build constant case? I suspect unless there is already a target to use this, unit test might be the only way.

lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
260

Any reason for not using buildBuildVector here?

arsenm marked an inline comment as done.Jan 22 2019, 9:40 AM
arsenm added inline comments.
lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
260

It seemed less convenient to create the vector of arguments than to just add them directly

arsenm updated this revision to Diff 182952.Jan 22 2019, 11:42 AM

Add unit test

Thanks. Looks good.

This revision is now accepted and ready to land.Jan 22 2019, 1:08 PM
arsenm closed this revision.Jan 22 2019, 1:31 PM

r351880