[PATCH] D17154: Bug fix: use dyn_cast_or_null instead of dyn_cast

Lawrence Hu via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 15 11:39:51 PST 2016


hulx2000 marked an inline comment as done.

================
Comment at: lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp:829
@@ -829,2 +828,3 @@
+  GetElementPtrInst *SecondGEP = dyn_cast_or_null<GetElementPtrInst>(ResultPtr);
   if (isSwapCandidate && isLegalToSwapOperand(FirstGEP, SecondGEP, L))
     swapGEPOperand(FirstGEP, SecondGEP);
----------------
Thanks, Chad:

That's not needed because I checked in isLegalToSwapOperand().


Repository:
  rL LLVM

http://reviews.llvm.org/D17154





More information about the llvm-commits mailing list