The patch mimics GCC's behaviour for the following:
- default -march is "armv4t"
- if an architecture is targeted, just a "generic" cpu is used with minimal sane set of features, instead of some specific real default cpu name.
- LLVM's specific exceptions:
- for specific vendors, OSes, environments, or arches - add the minimally required features, or even pick a real cpu.
- build attributes for generic cpus:
- asm: ".arch armv<ArchName>"
- ELF: "Tag_CPU_name = "<ArchName>""
- default "-mfloat-abi" is "soft".
- if case of "-mfloat-abi=hard", and no "-mfpu" provided -> default "vfp2" is used.
Some revealed LLVM bugs had to be fixed along the patch preparation, because of test fails.
- Crypto feature did not include Neon feature. This was not visible, because Neon was always on.
- Despite requirements for minimal cpus were provided in Triple::getARMCPUForArch(), they did not always work.
Because of the latter fix and default arch upgrade, tests for codegen were also adjusted.
This will have consequences in Clang. Have you ran "make check-all" with clang builtin?