[clang] [RISCV] Enable target attribute when invoked through clang driver (PR #74889)
Craig Topper via cfe-commits
cfe-commits at lists.llvm.org
Sun Dec 10 20:07:24 PST 2023
topperc wrote:
> > LGTM
>
> >
>
> > Related question. If there is an -mcpu on the command line and target attribute changes the march, do we keep the original CPU in the -target-cpu attribute or drop it. The reason for all those negative features from the driver was to make the backend not infer any features from the CPU that weren't in the provided march. So I'm wondering if we have that issue with the target attribute now.
>
>
>
> Compiler will keep target-cpu from command line when target attribute doesn't assign new cpu option.
So that's a bug then. If the command line CPU has vector, but the target attribute doesn't. The backend will still use vector instructions.
https://github.com/llvm/llvm-project/pull/74889
More information about the cfe-commits
mailing list