Issue 80357
Summary Error from inline asm for missing target feature despite enabling target feature when using LTO
Labels bug, backend:RISC-V, LTO
Assignees
Reporter ilovepi
    When compiling a file for LTO/ThinLTO, we ran into an issue where an inline assembly directive for compressed instruction gave an error, despite us setting the `march` string correctly. Note, this occurs when generating the bitcode output in the compile step, and not during the link. We also don't see any such error in the non-LTO cases. This still occurs at ToT (1d1432356e6) and back at least as far as c58bc24fcf678c55b0b. I haven't checked farther back in the commit history than Fuchsia's previous toolchain, but I think this is probably not a new behavior/bug.

I confirmed that `-target-feature +c` appears in the `cc1` command line.

I was able to reduce this down to just an `asm(c.ebreak)` statement. I've included the original file along w/ the reduced case, and reproducer script w/ a `-cc1` invocation.

This code come from Fuchsia and can be found here: https://cs.opensource.google/fuchsia/fuchsia/+/main:zircon/system/utest/inspector/print_debug_info.cc;l=131?q=print_debug_info.cc&ss=fuchsia%2Ffuchsia

Failing bot: https://ci.chromium.org/ui/p/turquoise/builders/global.ci/minimal.riscv64-lto/b8757351392559542993/overview

[reproducer.zip](https://github.com/llvm/llvm-project/files/14131777/reproducer.zip)

This seems related to https://github.com/llvm/llvm-project/issues/67698, but I'm not totally sure. There were also some recent changes that tried to plumb these to the MC layer and I thought AsmParser, but I'm also unsure if these are related.


_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to