Issue |
152449
|
Summary |
[RISCV]Asm Parser report error when parsing option arch directives.
|
Labels |
new issue
|
Assignees |
|
Reporter |
zzzhhhl
|
Using llc to processing the file `llvm/test/CodeGen/RISCV/riscv-func-target-feature.ll` and it will generate a asm file.
and we using following llvm-mc to generate object file, it report error.
`llvm-mc --arch=riscv64 -mcpu=sifive-u74 riscv-func-target-feature.s -filetype=obj -o tmp.o`
`error: can't disable d extension; zcd extension requires d extension`
the root cause maybe in https://github.com/llvm/llvm-project/blob/13daf3b70c6e8991c846e8384de47c5e84a94480/llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp#L465
the feature in NeedEmitStdOptionArgs should order in 'need relationship', if a need b, it should put a before b.
So i sort the NeedEmitStdOptionArgs by 'need relationship' like above, it works well.
Does somebody noticed this ?
Or is there a better solution ?
Thks.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs