https://llvm.org/bugs/show_bug.cgi?id=30634
Bug ID: 30634
Summary: add _allow_cpu_features intrinsic (like the intel
compiler)
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: X86
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
https://software.intel.com/en-us/articles/new-intrinsic-allow-cpu-features-support
This intrinsic, among other things, makes it possible to build composable
components that are optimal for all microarchitectures in a single binary
(something like function multi versioning but better).
Bonus points if all instructions dominated by a call to the intrinsic are also
scheduled as per the best matching CPU:
if (skylake) {
__allow_cpu_features(_FEATURE_BMI2);
// do stuff
// use bmi2 intrinsics here even if -march=X doesn't support them
}
Code in "// do stuff, etc" should be tuned as if the cpu was haswell even if
the rest of the code is tuned for westmere. The rationale is that haswell is
the earliest processor supporting FEATURE_BMI2 and it is not introduced earlier
than the per file processor.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs