static bool hoistMinMax(Instruction &I, Loop &L, ICFLoopSafetyInfo &SafetyInfo,
MemorySSAUpdater &MSSAU) {
- auto *Preheader = L.getLoopPreheader();
- assert(Preheader && "Loop is not in simplify form?");
bool Inverse = false;
bool IsLogical = false;
using namespace PatternMatch;
Intrinsic::ID id = ICmpInst::isSigned(P1)
? (UseMin ? Intrinsic::smin : Intrinsic::smax)
: (UseMin ? Intrinsic::umin : Intrinsic::umax);
+ auto *Preheader = L.getLoopPreheader();
+ assert(Preheader && "Loop is not in simplify form?");
IRBuilder<> Builder(Preheader->getTerminator());
// We are about to create a new guaranteed use for RHS2 which might not exist
// before (if it was a non-taken input of logical and/or instruction). If it