[PATCH] D77851: [X86][MC] Make -x86-pad-max-prefix-size compatible with --mc-relax-all

Robert Schilling via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 16 05:36:20 PDT 2020


Razer6 added subscribers: asb, Razer6.
Razer6 added a comment.

It seems that this change breaks the RISCV backend. RISCVAsmBackend::relaxInstruction <https://github.com/llvm/llvm-project/blob/69040d5b0bfa59edacc2ad10d517b4270bf76845/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp#L142> assumes that the `Relaxed` parameter is a fresh uninitialized `MCInst`.  With this change, invalid instructions with too many operands are generated. A similar problem probably happens for the Hexagon and for the AMDGPU backend.

/cc @asb also FYI that this breaks the RISCV backend.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77851





More information about the llvm-commits mailing list