[PATCH] D45336: Apply accumulator to fadd/fmul experimental vector reductions (PR36734)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 6 06:40:40 PDT 2018


RKSimon added inline comments.


================
Comment at: lib/Transforms/Utils/LoopUtils.cpp:1577-1578
+  Value *Result = Builder.CreateExtractElement(TmpVec, Builder.getInt32(0));
+  if (Acc && !isa<UndefValue>(Acc))
+    Result = CreateReductionOp(Acc, Result);
+  return Result;
----------------
ABataev wrote:
> Why are you excluding `UndefValue` here? If `Acc` is `Undef`, the `Result` must be `Undef` too, no?
Undef appears to have been used to ignore the accumulator.... @aemerson can you confirm please?


Repository:
  rL LLVM

https://reviews.llvm.org/D45336





More information about the llvm-commits mailing list