[PATCH] D87604: [X86] Convert integer _mm_reduce_* intrinsics to emit llvm.reduction intrinsics (PR47506)

Simon Pilgrim via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 14 04:41:29 PDT 2020


RKSimon created this revision.
RKSimon added a reviewer: craig.topper.
Herald added a project: clang.
RKSimon requested review of this revision.

Placeholder patch for when the reduction intrinsics drop their experimental status, emitting the equivalent reduction intrinsic in IR instead of expanding to shuffle+arithmetic sequences.

The fadd/fmul reductions might be trickier as they assume a similar bisection reduction while the generic intrinsics assume a sequential reduction (intel docs are ambiguous on the correct approach) - I'm not sure if we want to always tag them with reassoc? Anyway, that issue can wait until a separate fp patch along with the fmin/fmax reductions.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D87604

Files:
  clang/include/clang/Basic/BuiltinsX86.def
  clang/lib/CodeGen/CGBuiltin.cpp
  clang/lib/Headers/avx512fintrin.h
  clang/test/CodeGen/X86/avx512-reduceIntrin.c
  clang/test/CodeGen/X86/avx512-reduceMinMaxIntrin.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87604.291539.patch
Type: text/x-patch
Size: 52253 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200914/ee700536/attachment-0001.bin>


More information about the cfe-commits mailing list