IR: Factor out replaceUsesOfWithOnConstantImpl(), NFC
[oota-llvm.git] / lib / Analysis / ScalarEvolution.cpp
index bc9f45b2043092219d31a2864172b36e5620d440..06dbde58c1084488ae087b9efbc0633394c0c11e 100644 (file)
@@ -7365,7 +7365,7 @@ const SCEV *ScalarEvolution::getElementSize(Instruction *Inst) {
   if (StoreInst *Store = dyn_cast<StoreInst>(Inst))
     Ty = Store->getValueOperand()->getType();
   else if (LoadInst *Load = dyn_cast<LoadInst>(Inst))
-    Ty = Load->getPointerOperand()->getType();
+    Ty = Load->getType();
   else
     return nullptr;