[PATCH] D102978: [WebAssembly] Add TargetInstrInfo::getCalleeOperand

Djordje Todorovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 24 01:53:11 PDT 2021


djtodoro added a comment.

Thanks!



================
Comment at: llvm/test/CodeGen/WebAssembly/stackified-debug.ll:2
 ; RUN: llc -verify-machineinstrs < %s | FileCheck %s
+; RUN: llc --debug < %s
 ; RUN: llc -filetype=obj %s -o - | llvm-dwarfdump - | FileCheck %s --check-prefix DWARF
----------------
aheejin wrote:
> Without this patch this fails, because 
> ```
> %5:i32 = CALL @input, ...
> ```
> In this wasm MIR instruction, the callee is the 1th operand, but the current code will incorrectly [[ https://github.com/llvm/llvm-project/blob/887dda5dcdcf4a273f9c2885d147066343efd5b0/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp#L941 | assume ]] the 0th operand, which is the dest register (`%5` here), as a callee, and will try to [[ https://github.com/llvm/llvm-project/blob/887dda5dcdcf4a273f9c2885d147066343efd5b0/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp#L997-L1001 | print its register name ]], when `--debug` is given. This crashes because wasm does not use physical registers.
I'd prefer a dedicated (standalone) test for this.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102978



More information about the llvm-commits mailing list