Skip to content

ilc --help for --instruction-set contains many duplicates and lists removed/outdated predefined CPU groups #125730

@ymalich

Description

@ymalich

Description

Hello,

Description

When running ilc --help (from package runtime.win-x64.Microsoft.DotNet.ILCompiler 10.0.5, the latest stable at the moment), the output for the --instruction-set option is malformed.

1. Massive duplicates in the per-architecture lists

Current output (x64 section excerpt):
x64: base, base, base, sse4.2, sse4.2, sse4.2, sse4.2, sse4.2, avx, avx2, avx2, avx2, avx2, avx2, avx2, avx2, avx512, avx512, ...
(and many more repeated values for avx2, avx512*, aes, gfni, avxvnniint, etc.)

The same problem exists in the x86 section.

This looks like the help text is generated by concatenating several internal arrays/lists without proper deduplication or formatting.

2. Predefined CPU groups that are no longer supported are still listed

The help still mentions:
The following CPU names are predefined groups of instruction sets and can be used in --instruction-set too:
x86-64, x86-64-v2, x86-64-v3, x86-64-v4, armv8-a, armv8.1-a, ...

According to recent changes in .NET 10 / NativeAOT, the old x86-64* / x86-64-v* aliases have been removed or renamed .

Users who copy-paste from --help will get compile "Unrecognized instruction set" errors

Image

Reproduction Steps

  1. Download runtime.win-x64.Microsoft.DotNet.ILCompiler 10.0.5
  2. Run: ilc --help
  3. Scroll to the --instruction-set section

Expected behavior

  • Clean, deduplicated list of supported instruction sets per architecture.
  • Only currently supported predefined CPU groups should be listed.
  • The help text should be readable and accurate.

Actual behavior

Noisy output with dozens of repeated values + outdated predefined groups.

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

Thank you for improving the developer experience of NativeAOT!

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions