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

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Fri Jan 21 04:25:34 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8ee135dcf8ff060656ad481c3e980fe8763576f5
      https://github.com/llvm/llvm-project/commit/8ee135dcf8ff060656ad481c3e980fe8763576f5
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2022-01-21 (Fri, 21 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