This is an archive of the discontinued LLVM Phabricator instance.

[mlir][LLVMIR] Support switch without cases
ClosedPublic

Authored by aengelke on Jul 27 2023, 6:53 AM.

Details

Summary

LLVM supports switch ops without case values, for which the optional
caseValues has no value (i.e., std::nullopt, no the empty array).
Handle this case properly when translating MLIR-LLVM to LLVM-IR.

Diff Detail

Event Timeline

aengelke created this revision.Jul 27 2023, 6:53 AM
Herald added a project: Restricted Project. · View Herald Transcript
aengelke requested review of this revision.Jul 27 2023, 6:53 AM
aengelke updated this revision to Diff 544778.Jul 27 2023, 7:53 AM

Rebase to latest main.

Mogball accepted this revision.Jul 27 2023, 9:13 AM
This revision is now accepted and ready to land.Jul 27 2023, 9:13 AM
Dinistro accepted this revision.Jul 27 2023, 10:37 AM

Thanks for the fix, LGTM!

This revision was automatically updated to reflect the committed changes.