[all-commits] [llvm/llvm-project] bcbd60: [Mips] Make MipsBranchExpansion aware of BBIT fami...

Djordje Todorovic via All-commits all-commits at lists.llvm.org
Tue Mar 31 00:21:11 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: bcbd60aeb5fe20136fe79270ac1b8f3936883d78
      https://github.com/llvm/llvm-project/commit/bcbd60aeb5fe20136fe79270ac1b8f3936883d78
  Author: Djordje Todorovic <djordje.todorovic at syrmia.com>
  Date:   2020-03-31 (Tue, 31 Mar 2020)

  Changed paths:
    M llvm/lib/Target/Mips/MipsBranchExpansion.cpp
    M llvm/lib/Target/Mips/MipsInstrInfo.h
    M llvm/lib/Target/Mips/MipsSEInstrInfo.cpp
    M llvm/lib/Target/Mips/MipsSEInstrInfo.h
    A llvm/test/CodeGen/Mips/longbranch/long-branch-octeon.ll

  Log Message:
  -----------
  [Mips] Make MipsBranchExpansion aware of BBIT family of branch

Octeon branches (bbit0/bbit032/bbit1/bbit132) have an immediate operand,
so it is legal to have such replacement within
MipsBranchExpansion::replaceBranch().

According to the specification, a branch (e.g. bbit0 ) looks like:

bbit0  rs p offset  // p is an immediate operand
  if !rs<p> then branch

Without this patch, an assertion triggers in the method,
and the problem has been found in the real example.

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




More information about the All-commits mailing list