[PATCH] D22341: MinMax Index Pattern Identification

Mohammed Agabaria via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 18 07:23:39 PDT 2016


magabari marked 8 inline comments as done.

================
Comment at: include/llvm/Transforms/Utils/LoopUtils.h:206
@@ +205,3 @@
+  void setCmpInstr(Instruction *Instr) { 
+    assert(((Kind == RK_IntegerMinMax) || (Kind == RK_FloatMinMax)) &&
+           "Should be MinMax Recurrence");
----------------
delena wrote:
> You don't need to check the Kind here - it is just get/set.
this field not relevant if the Kind != MinMax  / MinMaxIdx, i just wrote that assert for sanity check

================
Comment at: lib/Transforms/Utils/LoopUtils.cpp:600
@@ +599,3 @@
+    DEBUG(dbgs() << "Suspect a MINMAX INDEX reduction PHI." << *Phi << "\n");
+    return true; //TODO: FIX
+  }
----------------
delena wrote:
> What FIX should be done here?
its suspected to be a reduction not 100% sure of that.

================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:4896
@@ +4895,3 @@
+          // the Phi's
+          if (RedDes.getRecurrenceKind() == RecurrenceDescriptor::RK_IntegerMinMaxIdx) {
+            ExtraVerificationRequired[Phi] = RedDes;
----------------
delena wrote:
> Why FP min/max does not require extra verification?
notice that the Index pattern needs the verification not the min\max itself,there is no floatMinMaxIdx type, it's only Integer.


Repository:
  rL LLVM

https://reviews.llvm.org/D22341





More information about the llvm-commits mailing list