[all-commits] [llvm/llvm-project] 3e5059: [X86] Remove `__builtin_ia32_pmax/min` intrinsics ...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Mon Jan 24 03:40:54 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3e50593b18840ab4508a25d0f761afb65535a38d
      https://github.com/llvm/llvm-project/commit/3e50593b18840ab4508a25d0f761afb65535a38d
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2022-01-24 (Mon, 24 Jan 2022)

  Changed paths:
    M clang/include/clang/Basic/BuiltinsX86.def
    M clang/lib/CodeGen/CGBuiltin.cpp
    M clang/lib/Headers/avx2intrin.h
    M clang/lib/Headers/avx512bwintrin.h
    M clang/lib/Headers/avx512fintrin.h
    M clang/lib/Headers/avx512vlintrin.h
    M clang/lib/Headers/emmintrin.h
    M clang/lib/Headers/smmintrin.h
    M clang/test/CodeGen/builtins-x86.c

  Log Message:
  -----------
  [X86] Remove `__builtin_ia32_pmax/min` intrinsics and use generic `__builtin_elementwise_max/min`

D111985 added the generic `__builtin_elementwise_max` and `__builtin_elementwise_min` intrinsics with the same integer behaviour as the SSE/AVX instructions

This patch removes the `__builtin_ia32_pmax/min` intrinsics and just uses `__builtin_elementwise_max/min` - the existing tests see no changes:
```
__m256i test_mm256_max_epu32(__m256i a, __m256i b) {
  // CHECK-LABEL: test_mm256_max_epu32
  // CHECK: call <8 x i32> @llvm.umax.v8i32(<8 x i32> %{{.*}}, <8 x i32> %{{.*}})
  return _mm256_max_epu32(a, b);
}
```
This requires us to add a `__v64qs` explicitly signed char vector type (we already have `__v16qs` and `__v32qs`).

Sibling patch to D117791

Differential Revision: https://reviews.llvm.org/D117798




More information about the All-commits mailing list