@@ -287,10 +287,12 @@ IDELinearConstantAnalysis::~IDELinearConstantAnalysis() {
287287IDELinearConstantAnalysis::FlowFunctionPtrType
288288IDELinearConstantAnalysis::getNormalFlowFunction (n_t Curr, n_t /* Succ*/ ) {
289289 if (const auto *Alloca = llvm::dyn_cast<llvm::AllocaInst>(Curr)) {
290- if (Alloca->getAllocatedType ()->isIntegerTy ()) {
290+ auto *AT = Alloca->getAllocatedType ();
291+ if (AT->isIntegerTy () || isIntegerLikeType (AT)) {
291292 return generateFromZero (Alloca);
292293 }
293294 }
295+
294296 // Check store instructions. Store instructions override previous value
295297 // of their pointer operand, i.e., kills previous fact (= pointer operand).
296298 if (const auto *Store = llvm::dyn_cast<llvm::StoreInst>(Curr)) {
@@ -487,7 +489,8 @@ IDELinearConstantAnalysis::getNormalEdgeFunction(n_t Curr, d_t CurrNode,
487489 if (const auto *Store = llvm::dyn_cast<llvm::StoreInst>(Curr)) {
488490 d_t PointerOperand = Store->getPointerOperand ();
489491 d_t ValueOperand = Store->getValueOperand ();
490- if (PointerOperand == SuccNode) {
492+ if (PointerOperand == SuccNode ||
493+ PointerOperand->stripPointerCasts () == SuccNode) {
491494 // Case I: Storing a constant integer.
492495 if (isZeroValue (CurrNode) && llvm::isa<llvm::ConstantInt>(ValueOperand)) {
493496 PHASAR_LOG_LEVEL (DEBUG, " Case: Storing constant integer." );
0 commit comments