[PATCH] D28079: [GlobalISel] Add support for indirectbr

Kristof Beyls via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 23 02:53:49 PST 2016


kristof.beyls created this revision.
kristof.beyls added reviewers: qcolombet, t.p.northover, ab, dsanders, rovka.
kristof.beyls added a subscriber: llvm-commits.
Herald added subscribers: dberris, aemerson.

In this patch, support for handling indirectbr in GlobalISel is added.
Both generic and AArch64-specific support is added.

This makes SingleSource/Regression/C/2004-03-15-IndirectGoto in the test-suite compile without error with "-mllvm -global-isel=true -mllvm -global-isel-abort=1".
However, this patch alone doesn't make that test pass at execution time: apparently there is still something wrong with the relocations produced for addresses of basic blocks. But that seems to be an independently missing feature/bug in globalisel, so something for another patch.

I'm especially interested in any feedback on the best way to cover this in the regression tests. Maybe also a test should be added to check if a br instruction actually gets generated in the AArch64 assembly output? But there don't seem to be any such tests already under test/CodeGen/AArch64/GlobalISel?


https://reviews.llvm.org/D28079

Files:
  include/llvm/CodeGen/GlobalISel/IRTranslator.h
  include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h
  include/llvm/Target/GenericOpcodes.td
  include/llvm/Target/TargetOpcodes.def
  lib/CodeGen/GlobalISel/IRTranslator.cpp
  lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
  lib/Target/AArch64/AArch64InstructionSelector.cpp
  lib/Target/AArch64/AArch64LegalizerInfo.cpp
  test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28079.82404.patch
Type: text/x-patch
Size: 6829 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161223/0b00343d/attachment.bin>


More information about the llvm-commits mailing list