[PATCH] D101819: [DRAFT][M68k GloballSel]Adding initial GlobalISel infrastructure

Sushma Unnibhavi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 24 19:10:11 PDT 2021


sushmaunnibhavi added a comment.

In D101819#2778522 <https://reviews.llvm.org/D101819#2778522>, @qcolombet wrote:

> Hi,
>
>> Add GlobalISel infrastructure up to the point where we can select a ret void.
>
> Could you add a test case for that?
>
> E.g., something as simple as:
>
>   ; RUN: llc -global-isel %s -o - | FileCheck %s
>   
>   ; CHECK-LABEL: noArgRetVoid:
>   ; CHECK: <whatever is your return instruction here>
>   define void @noArgRetVoid() {
>     ret void
>   }

Yes, I added this

  ; RUN: llc -mtriple=m68k -global-isel  %s -o - | FileCheck %s
    
  ; CHECK: name: f
  ; CHECK: RET
  define void @f() {
    ret void
  }

And when I run this test case, I get an error saying:

          .text
          .file   "irtranslator-ret.ll"
  LLVM ERROR: unable to translate in big endian mode (in function: f)
  PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
  Stack dump:
  0.      Program arguments: ./build/bin/llc -mtriple=m68k -global-isel /home/sushma/Desktop/llvm-project/llvm/test/CodeGen/M68k/GlobalISel/irtranslator-ret.ll -o -
  1.      Running pass 'Function Pass Manager' on module '/home/sushma/Desktop/llvm-project/llvm/test/CodeGen/M68k/GlobalISel/irtranslator-ret.ll'.
  2.      Running pass 'IRTranslator' on function '@f'
   #0 0x000055615e5e371c llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (./build/bin/llc+0x2dcf71c)
   #1 0x000055615e5e1524 llvm::sys::RunSignalHandlers() (./build/bin/llc+0x2dcd524)
   #2 0x000055615e5e1693 SignalHandler(int) Signals.cpp:0:0
   #3 0x00007ffbb3cc2f40 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x13f40)
   #4 0x00007ffbb376bed7 raise /build/glibc-KRRWSm/glibc-2.29/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
   #5 0x00007ffbb374d535 abort /build/glibc-KRRWSm/glibc-2.29/stdlib/abort.c:81:7
   #6 0x000055615e549f46 llvm::report_fatal_error(llvm::Twine const&, bool) (./build/bin/llc+0x2d35f46)
   #7 0x000055615e54a09e (./build/bin/llc+0x2d3609e)
   #8 0x000055615ec7f9d9 reportTranslationError(llvm::MachineFunction&, llvm::TargetPassConfig const&, llvm::OptimizationRemarkEmitter&, llvm::OptimizationRemarkMissed&) IRTranslator.cpp:0:0
   #9 0x000055615ec9491f llvm::IRTranslator::runOnMachineFunction(llvm::MachineFunction&) (./build/bin/llc+0x348091f)
  #10 0x000055615da0c925 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (./build/bin/llc+0x21f8925)
  #11 0x000055615de51a14 llvm::FPPassManager::runOnFunction(llvm::Function&) (./build/bin/llc+0x263da14)
  #12 0x000055615de52559 llvm::FPPassManager::runOnModule(llvm::Module&) (./build/bin/llc+0x263e559)
  #13 0x000055615de51331 llvm::legacy::PassManagerImpl::run(llvm::Module&) (./build/bin/llc+0x263d331)
  #14 0x000055615c1d251d compileModule(char**, llvm::LLVMContext&) llc.cpp:0:0
  #15 0x000055615c117c72 main (./build/bin/llc+0x903c72)
  #16 0x00007ffbb374eb6b __libc_start_main /build/glibc-KRRWSm/glibc-2.29/csu/../csu/libc-start.c:342:3
  #17 0x000055615c1c949a _start (./build/bin/llc+0x9b549a)
  Aborted (core dumped)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101819/new/

https://reviews.llvm.org/D101819



More information about the llvm-commits mailing list