Skip to content

[X86][Clang] VectorExprEvaluator::VisitCallExpr / InterpretBuiltin - allow F16C CVTPS2PH intrinsics to be used in constexpr #160312

@RKSimon

Description

@RKSimon
__builtin_ia32_vcvtps2ph
__builtin_ia32_vcvtps2ph256

If the rounding mode argument is not using the runtime MXCSR.RC, or the conversion is exact it should be possible for the float to half truncation intrinsics to be performed in constant expressions

/// \param imm
///    An immediate value controlling rounding using bits [2:0]: \n
///    000: Nearest \n
///    001: Down \n
///    010: Up \n
///    011: Truncate \n
///    1XX: Use MXCSR.RC for rounding

Metadata

Metadata

Assignees

Labels

backend:X86clang:bytecodeIssues for the clang bytecode constexpr interpreterclang:frontendLanguage frontend issues, e.g. anything involving "Sema"constexprAnything related to constant evaluationgood first issuehttps://github.com/llvm/llvm-project/contribute

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions