[PATCH] D90703: [GVN] Make handling of zeros more consistent

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 10 09:10:49 PST 2021


reames requested changes to this revision.
reames added a comment.
This revision now requires changes to proceed.

This patch appears to be doing at least two things:

1. Consistent handling on zero constants for bitcastable types.
2. Changing scalable vector handling.

I strongly recommend you split this into two patches.  My reasoning is that while I can probably review 1 for you, I do not have the context to usefully review 2.  I suspect other reviewers will have the same problem, possibly in the other direction.



================
Comment at: llvm/lib/Transforms/Utils/VNCoercion.cpp:12
 
-static bool isFirstClassAggregateOrScalableType(Type *Ty) {
-  return Ty->isStructTy() || Ty->isArrayTy() || isa<ScalableVectorType>(Ty);
+static bool isBitCastable(Type *Ty) {
+  return !(Ty->isStructTy() || Ty->isArrayTy() || isa<ScalableVectorType>(Ty));
----------------
Please add this rename/invert separately.  No review needed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90703



More information about the llvm-commits mailing list