-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Open
Labels
LTOLink time optimization (regular/full LTO or ThinLTO)Link time optimization (regular/full LTO or ThinLTO)
Description
The scan of module-level inline assembly performed to extract the referenced symbols does not forward the CPU specified on the clang command line. Because of this, opcodes that are only legal in that CPU will cause the compile to fail in -flto where it would have succeeded without. For example:
asm(".globl func; func: cm.mvsa01 s1, s0; ret");
This succeeds when compiled for RISC-V -march=rv64izcmp (https://godbolt.org/z/8dxT3nxs9), but fails when -flto is added (https://godbolt.org/z/GK5ohKnK9).
See
| T->createMCSubtargetInfo(TT.str(), "", "")); |
Metadata
Metadata
Assignees
Labels
LTOLink time optimization (regular/full LTO or ThinLTO)Link time optimization (regular/full LTO or ThinLTO)