This patch enables the import of rules containing 'imm' operands that do not
constrain the acceptable values using predicates. Support for ImmLeaf will
arrive in a later patch.
Depends on D35681
Paths
| Differential D35833
[globalisel][tablegen] Add support for importing 'imm' operands. ClosedPublic Authored by dsanders on Jul 25 2017, 5:41 AM.
Details Summary This patch enables the import of rules containing 'imm' operands that do not Depends on D35681
Diff Detail
Event TimelineHerald added subscribers: igorb, javed.absar, kristof.beyls. · View Herald TranscriptJul 25 2017, 5:41 AM Comment Actions Seems fine.
This revision is now accepted and ready to land.Jul 27 2017, 4:15 AM dsanders marked 3 inline comments as done. Comment ActionsAdded assertion.
dsanders added a child revision: D36084: [globalisel][tablegen] Support zero-instruction emission..Jul 31 2017, 5:25 AM Comment Actions
I've mostly deferred this problem to a later date but I have made slight tweaks
Comment Actions Well, considering that Mips prefers SExt and nothing (that we're aware of) prefers ZExt, it might be better to just use SExt from the start. But if you're feeling lazy ZExt is fine too :)
Revision Contents
Diff 108661 include/llvm/CodeGen/GlobalISel/InstructionSelector.h
include/llvm/CodeGen/GlobalISel/InstructionSelectorImpl.h
include/llvm/Target/GlobalISel/SelectionDAGCompat.td
lib/Target/AArch64/AArch64InstructionSelector.cpp
test/CodeGen/AArch64/GlobalISel/select-imm.mir
test/CodeGen/X86/GlobalISel/select-inc.mir
test/TableGen/GlobalISelEmitter.td
utils/TableGen/GlobalISelEmitter.cpp
|
You could also assert that the OldInsn is a G_CONSTANT.