[PATCH] D100218: Fix for "Bug 49146 - Crash with MIPS16 multiply"

Jesse DeGuire via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 26 15:34:45 PDT 2021


jdeguire updated this revision to Diff 340670.
jdeguire added a comment.

As requested, this patch removes the formatting changes that "git clang-format" had made to the previous patch. This also updates the test in `clang/test/CodeGen` to verify that assembly for a `MULT, MFLO` sequence is emitted. An equivalent test was generated from `clang -S -emit-llvm` and cleaned up to be added to `llvm/test/CodeGen/Mips`.

While I was able to update the test to verify that assembly was generated, I may need guidance as to verifying direct code generation (ie. calling Clang without the "-S" or "-emit-llvm" options). My original plan was to generate an object file, give that to `llvm-objdump`, and pipe that output to FileCheck, but I cannot get `llvm-objdump` to emit decoded MIPS16 assembly. It emits raw bytes and instructions are listed as "<unknown>" when using `--triple=mipsel-linux-gnu --mattr=mips16`. I was able to manually decode the output to verify that the raw bytes corresponded to the correct `MULT, MFLO` sequence, but I am not sure how I can reliably do that with FileCheck. Should I try to have FileCheck search for the raw sequence of bytes (which in this case is `78 ea 52 ea`)?


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

https://reviews.llvm.org/D100218

Files:
  clang/test/CodeGen/mips16-mult.c
  llvm/lib/Target/Mips/Mips16ISelDAGToDAG.cpp
  llvm/lib/Target/Mips/Mips16InstrInfo.td
  llvm/lib/Target/Mips/MipsISelLowering.cpp
  llvm/lib/Target/Mips/MipsISelLowering.h
  llvm/lib/Target/Mips/MipsInstrInfo.td
  llvm/lib/Target/Mips/MipsScheduleGeneric.td
  llvm/test/CodeGen/Mips/mips16-mult.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100218.340670.patch
Type: text/x-patch
Size: 8763 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210426/d0dfc8e0/attachment.bin>


More information about the llvm-commits mailing list