@@ -289,8 +289,10 @@ void BogusControlFlowPass::addBogusFlow(BasicBlock *basicBlock, Function &F) {
289289
290290 // The always true condition. End of the first block
291291 Twine *var4 = new Twine (" condition" );
292+ // FCmpInst *condition =
293+ // new FCmpInst(*basicBlock, FCmpInst::FCMP_TRUE, LHS, RHS, *var4);
292294 FCmpInst *condition =
293- new FCmpInst (* basicBlock, FCmpInst::FCMP_TRUE, LHS, RHS, *var4);
295+ new FCmpInst (basicBlock, FCmpInst::FCMP_TRUE, LHS, RHS, *var4); // Fix for llvm 19.0.0
294296 DEBUG_WITH_TYPE (" gen" , errs () << " bcf: Always true condition created\n " );
295297
296298 // Jump to the original basic block if the condition is true or
@@ -325,8 +327,10 @@ void BogusControlFlowPass::addBogusFlow(BasicBlock *basicBlock, Function &F) {
325327 originalBB->getTerminator ()->eraseFromParent ();
326328 // We add at the end a new always true condition
327329 Twine *var6 = new Twine (" condition2" );
330+ // FCmpInst *condition2 =
331+ // new FCmpInst(*originalBB, CmpInst::FCMP_TRUE, LHS, RHS, *var6);
328332 FCmpInst *condition2 =
329- new FCmpInst (* originalBB, CmpInst::FCMP_TRUE, LHS, RHS, *var6);
333+ new FCmpInst (originalBB, CmpInst::FCMP_TRUE, LHS, RHS, *var6); // Fix for llvm 19.0.0
330334 BranchInst::Create (originalBBpart2, alteredBB, (Value *)condition2,
331335 originalBB);
332336 DEBUG_WITH_TYPE (" gen" , errs ()
0 commit comments