[PATCH] D32245: Add an IR expansion pass for the experimental reductions

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 26 04:18:19 PDT 2017


RKSimon added a comment.

Please add full context to the diff - especially as its dependent on another (in progress) patch.



================
Comment at: lib/CodeGen/ExpandReductions.cpp:117
+    case Intrinsic::experimental_vector_reduce_fmin: {
+      Vec = II->getArgOperand(0);
+      auto MRK = getMRK(ID);
----------------
aemerson wrote:
> mkuper wrote:
> > I'd expect a target query somewhere, regarding whether the intrinsic needs to be expanded.
> My expectation was that targets wouldn't need, at least at first, that level of granularity. @RKSimon what do you think about this?
Are we guaranteeing that the reductions will match the ones supported by TargetTransformInfo::getReductionCost ?


================
Comment at: test/CodeGen/Generic/expand-experimental-reductions.ll:1
+; RUN: opt < %s -mtriple=aarch64 -expand-reductions -S | FileCheck %s
+declare i64 @llvm.experimental.vector.reduce.add.i64.v2i64(<2 x i64>)
----------------
I'd prefer to see the full reduction codegen here - regenerate with utils\update_test_checks.py ?


Repository:
  rL LLVM

https://reviews.llvm.org/D32245





More information about the llvm-commits mailing list