[PATCH] D27846: [SLP] Support for horizontal min/max reduction

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 7 06:24:04 PST 2018


ABataev added inline comments.


================
Comment at: llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp:5065
+            Instruction::FCmp, LHS, RHS, RK_Max,
+            cast<Instruction>(Select->getCondition())->hasNoNaNs());
+      }
----------------
sabuasal wrote:
> Hi,
> 
> Why are we filling the NonNan flags for the "OperationData" object the value from the condition of the select instruction instead of the select Instruction itself?  Wheb ew get to code gen we check that the value itself is not a Nan, am I missing something?
1. SelectInst itself does not have any fp flags, only fcmp does.
2. I don't fully understand your question, but seems to me you're asking where are the checks for the NaN in the generated code, right? Nowhere, we do not emit these checks.


Repository:
  rL LLVM

https://reviews.llvm.org/D27846





More information about the llvm-commits mailing list