Skip to content

[X86] Enable constexpr on LZCNT and BMI intrinsics #86128

@RKSimon

Description

@RKSimon

The x86 specific LZCNT and BMI intrinsics in lzcntintrin.h and bmiintrin.h are all capable of being converted to constexpr

We did something similar for the POPCNT intrinsics here: https://reviews.llvm.org/D86229 / cff0db0

  • Update __builtin_ia32_* intrinsics to allow handling in ExprConstant
  • Update headers - ensuring they work for c, pre-C++11 and later C++ builds
  • Test coverage - including the macro variants of some of the methods (e.g. _tzcnt_u32 for __tzcnt_u32)

Metadata

Metadata

Labels

backend:X86clang:headersHeaders provided by Clang, e.g. for intrinsicsgood first issuehttps://github.com/llvm/llvm-project/contribute

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions