[all-commits] [llvm/llvm-project] 231bfa: [Lanai] fix MC / objdump

Serge Bazanski via All-commits all-commits at lists.llvm.org
Fri Sep 10 03:46:30 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 231bfaab31a91ee956312a7c730b41da376fa322
      https://github.com/llvm/llvm-project/commit/231bfaab31a91ee956312a7c730b41da376fa322
  Author: Serge Bazanski <q3k at q3k.org>
  Date:   2021-09-10 (Fri, 10 Sep 2021)

  Changed paths:
    M llvm/lib/Target/Lanai/MCTargetDesc/LanaiMCTargetDesc.cpp
    A llvm/test/tools/llvm-objdump/ELF/Lanai/lit.local.cfg
    A llvm/test/tools/llvm-objdump/ELF/Lanai/smoke.ll

  Log Message:
  -----------
  [Lanai] fix MC / objdump

D78776 removed is{Call,Branch,UnconditionalBranch} guards in objdump
before calling MCInstrAnalysis::evaluateBranch. This is fine for other
architectures as they gracefully handle evaluateBranch being called on
non-branches. However, the Lanai MCInstrAnalysis implementation didn't
and that change caused it to crash.

This inserts the same guards back into Lanai's evaluateBranch
implementation and adds a smoke test that exercises `llc | objdump` so
this kind of regression is hopefully caught next time.

Reviewed By: jpienaar, MaskRay

Differential Revision: https://reviews.llvm.org/D107593




More information about the All-commits mailing list