craig.topper added a comment. I think gcc supports __builtin_cpu_supports and __builtin_cpu_is for non-x86. We already have an x86 only implementation of __builtin_cpu_supports so I did the same here. https://reviews.llvm.org/D35449