[PATCH] D153909: [AMDGPU] Always pass `-mcpu` to the `lld` linker

Joseph Huber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 27 16:41:43 PDT 2023


jhuber6 added a comment.

In D153909#4454383 <https://reviews.llvm.org/D153909#4454383>, @JonChesterfield wrote:

> I thought lld did the right thing if you pass it raw IR, without specifying an arch, but on reflection it might just be silently miscompiling things. The test doesn't seem to involve a specific type of input file, does clang foo.ll -o a.out pass a mcpu flag along?
>
> It's a bit weird that the architecture doesn't seem to be embedded in the IR file (e.g. you have to pass it to llc) but that's out of scope here

it markedly does not work without it. I don't think there's currently facilities to define a module-wide architecture, there's only function-level metadata.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153909/new/

https://reviews.llvm.org/D153909



More information about the cfe-commits mailing list