This ensures it gets reprocessed in the same iteration. In
particular the alignment will be increased (which is quite
pointless, of course).
// that this code is not reachable. We do this instead of inserting
// an unreachable instruction directly because we cannot modify the
// CFG.
- StoreInst *SI = new StoreInst(PoisonValue::get(LI.getType()),
- Constant::getNullValue(Op->getType()), &LI);
- SI->setDebugLoc(LI.getDebugLoc());
+ Builder.CreateStore(PoisonValue::get(LI.getType()),
+ Constant::getNullValue(Op->getType()));
return replaceInstUsesWith(LI, PoisonValue::get(LI.getType()));
}
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -passes=instcombine -S | FileCheck %s
+; RUN: opt < %s -passes=instcombine -instcombine-infinite-loop-threshold=2 -S | FileCheck %s
target datalayout = "e-p:64:64-p1:16:16-p2:32:32:32-p3:64:64:64"