Skip to content

[CIR] Implement CIR handling for X86 vector compare builtins #163895

@andykaylor

Description

@andykaylor

Overview

Implement handling in ClangIR codegen for the various X86 builtin functions that perform vector comparisons (__builtin_ia32_cmpnltps, etc.). Some of these have already been implemented in the ClangIR incubator project. Others have not. This task should begin by upstreaming the existing implementation from the incubator and then proceed to add handling for those which are not yet implemented in the incubator. The missing implementation should also be added to the incubator project.

Suggested minimal test case

__m128 test_cmpnltps(__m128 A, __m128 B) {
  return __builtin_ia32_cmpnltps(A, B);
}

Existing incubator tests

clang/test/CIR/CodeGen/builtin-fcmp-sse.c

Metadata

Metadata

Assignees

Labels

ClangIRAnything related to the ClangIR projectgood 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