[PATCH] D35449: [X86] Implement __builtin_cpu_is

Craig Topper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 17 22:29:57 PDT 2017


craig.topper added a comment.

I'm considering making validateCpuIs return a std::pair with the appropriate value and a tag that indicates invalid/vendor/type/subtype. This way we can remove the target based string decoding from CodeGen by reusing the validate function(with a better name). Sema can look for the invalid tag for its error.

We could also make validateCpuSupports return the feature bit number for __builtin_cpu_supports and reuse it in CodeGen.


https://reviews.llvm.org/D35449





More information about the cfe-commits mailing list