https://bugs.llvm.org/show_bug.cgi?id=49293

            Bug ID: 49293
           Summary: Clang ignores -march when targeting armv7-apple-darwin
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Driver
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]

This is a low priority bug since it affects only old hardware targets,
but since it exists in the codebase and I've stumbled upon it I'll
report it.

When running "clang --target=armv7-apple-darwin14 -march=armv8.2-a+dotprod"
MachO::TranslateArgs is called with BoundArch "armv7" and appends
"-march=armv7a" to the list of the command line args:
https://github.com/llvm/llvm-project/blob/llvmorg-13-init/clang/lib/Driver/ToolChains/Darwin.cpp#L2380
Then clang -cc1 uses it, silently ignoring the custom -march.

The same issue was encountered in
https://github.com/tensorflow/tensorflow/issues/40026
and worker around in https://github.com/google/XNNPACK/pull/692/files
by adding -mcpu to the command line. (In my case the workaround would
be "-mcpu=cyclone+dotprod".)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to