[PATCH] D81378: GlobalISel: Handle more cases in getGCDType

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 7 16:11:47 PDT 2020


aemerson added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/Utils.cpp:551
+
+  if (OrigTy.isVector()) {
+    LLT OrigElt = OrigTy.getElementType();
----------------
Can we reorganize this to not have so much nesting?

Maybe duplicate `greatestCommonDivisor(OrigSize, TargetSize);` above this for the scalar case and early exit.


================
Comment at: llvm/lib/CodeGen/GlobalISel/Utils.cpp:560
+      }
+    } else {
+      // If the source is a vector of pointers, return a pointer element.
----------------
Invert this so the else early exits?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81378/new/

https://reviews.llvm.org/D81378





More information about the llvm-commits mailing list