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

Kan Shengchen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 16 20:33:52 PDT 2020


skan added a comment.

In D77851#1988060 <https://reviews.llvm.org/D77851#1988060>, @skan wrote:

> In D77851#1986486 <https://reviews.llvm.org/D77851#1986486>, @Razer6 wrote:
>
> > 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.
>
>
> Could you provide a new fail case that can be reproduced?


yeah, I got your point. We may need to add a lit test to gurantee this assumption will not be broken.


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