[clang] [llvm] [X86][APX] Remove CF feature from APXF and Diamond Rapids (PR #153751)

Phoebe Wang via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 11 20:12:40 PST 2026


phoebewang wrote:

> Inaccurate modeling of hardware features has downstream consequences for us

We plan to enable CF feature under `apxf` with tunings. It will not a problem then.

> I'm up to my neck in CPU model and feature details right now, and off the top of my head, I can't think of a single other case where LLVM essentially lies about a CPU model's hardware features for tuning reasons.

Features and tunings have a distinct difference in the Clang frontend. Each feature has a -mFEATURE option that exposed to end user, while non tuning does that.

> I mean, it sure sounds to me like what you actually want is an `apxf` feature and a bunch of tuning features built on top of it. I'm altogether very confused by how APX is currently being modeled in LLVM.

The reason is `apxf` doesn't have a base or core sub-feature. Each one of them can be turned on/off independently. If we change to use tunings, we can only do the subtraction way like `-mapxf -mapx-tunings=no-xxx`. With sub-feautres, we can provide the forward way like `-maxp-features=xxx`.

https://github.com/llvm/llvm-project/pull/153751


More information about the cfe-commits mailing list