Issue |
152448
|
Summary |
Asm Parser report error when parsing option arch directives.
|
Labels |
new issue
|
Assignees |
|
Reporter |
zzzhhhl
|
when using `llc -mtriple=riscv64 -mcpu=thrive-trigon ` to processing following code, all things works well.
`
define void @test1() "target-features"="-zfbfmin,-zvfbfmin,-zvfbfwma" {
entry:
ret void
}
`
and generated a asm file contained following code line like this:
`.option arch, -zfbfmin, -zvfbfmin, -zvfbfwma`
However, when using llvm-mc to process the asm file generated above, i got a error
`error: can't disable zfbfmin extension; zvfbfwma extension requires zfbfmin extenion` at
[RISCVAsmParser.cpp:](https://github.com/llvm/llvm-project/blob/13daf3b70c6e8991c846e8384de47c5e84a94480/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp#L3130)
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