This is an archive of the discontinued LLVM Phabricator instance.

[mlir][LLVMIR] Use insertelement if needed when translating ConstantAggregate
ClosedPublic

Authored by myhsu on Jun 10 2022, 2:06 PM.

Details

Summary

When translating from a llvm::ConstantAggregate with vector type, we should lower to insertelement operations (if needed) rather than using insertvalue.

Diff Detail

Event Timeline

myhsu created this revision.Jun 10 2022, 2:06 PM
myhsu requested review of this revision.Jun 10 2022, 2:06 PM
Mogball accepted this revision.Jun 10 2022, 6:10 PM
This revision is now accepted and ready to land.Jun 10 2022, 6:10 PM
ftynse added inline comments.Jun 13 2022, 2:07 AM
mlir/test/Target/LLVMIR/Import/constant-aggregate.ll
33–34

Why is DAG necessary here? The lines are identical so they will always match in the order of appearance.

myhsu updated this revision to Diff 436960.Jun 14 2022, 3:11 PM
myhsu marked an inline comment as done.

Use CHECK rather than CHECK-DAG in some test directives.

This revision was landed with ongoing or failed builds.Jun 15 2022, 2:34 PM
This revision was automatically updated to reflect the committed changes.