This is an archive of the discontinued LLVM Phabricator instance.

[MLIR][LLVM] Permit integer types in switch other than i32
ClosedPublic

Authored by wsmoses on Nov 15 2021, 5:14 PM.

Details

Summary

LLVM switchop currently only permits i32. Both LLVM IR and MLIR Standard switch permit other integer types leading to an illegal state when lowering an i8 switch from MLIR standard

Diff Detail

Event Timeline

wsmoses created this revision.Nov 15 2021, 5:14 PM
wsmoses requested review of this revision.Nov 15 2021, 5:14 PM
mehdi_amini accepted this revision.Nov 15 2021, 5:46 PM
This revision is now accepted and ready to land.Nov 15 2021, 5:46 PM
This revision was landed with ongoing or failed builds.Nov 15 2021, 9:46 PM
This revision was automatically updated to reflect the committed changes.

Bot is broken with:

tools/mlir/include/mlir/Dialect/LLVMIR/LLVMOps.cpp.inc:23996:3: error: no matching function for call to 'printSwitchOpCases'
  printSwitchOpCases(_odsPrinter, *this, getValue().getType(), getCaseValuesAttr(), getCaseDestinations(), getCaseOperands(), getCaseOperands().getTypes());
  ^~~~~~~~~~~~~~~~~~

Ah arcanist didn't appear to take my update upon a land, one moment.

wsmoses reopened this revision.Nov 15 2021, 10:13 PM
This revision is now accepted and ready to land.Nov 15 2021, 10:13 PM
wsmoses updated this revision to Diff 387493.Nov 15 2021, 10:13 PM

Fix rebase error

wsmoses updated this revision to Diff 387612.Nov 16 2021, 6:50 AM

Force rebuild / fix format

wsmoses updated this revision to Diff 387654.Nov 16 2021, 8:18 AM

Update flang test

Herald added a project: Restricted Project. · View Herald TranscriptNov 16 2021, 8:18 AM