From 4e93b16f3fce467b2bbda4e5fd8b15fcad2bea93 Mon Sep 17 00:00:00 2001 From: Sergei Barannikov Date: Fri, 2 Aug 2024 16:45:50 +0300 Subject: [llvm] Make InstSimplifyFolder constructor explicit (NFC) (#101654) --- llvm/lib/Transforms/Utils/LoopUtils.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'llvm/lib/Transforms/Utils/LoopUtils.cpp') diff --git a/llvm/lib/Transforms/Utils/LoopUtils.cpp b/llvm/lib/Transforms/Utils/LoopUtils.cpp index 0abf6d7..f1f2d52 100644 --- a/llvm/lib/Transforms/Utils/LoopUtils.cpp +++ b/llvm/lib/Transforms/Utils/LoopUtils.cpp @@ -1901,8 +1901,7 @@ Value *llvm::addRuntimeChecks( expandBounds(PointerChecks, TheLoop, Loc, Exp, HoistRuntimeChecks); LLVMContext &Ctx = Loc->getContext(); - IRBuilder ChkBuilder(Ctx, - Loc->getDataLayout()); + IRBuilder ChkBuilder(Ctx, InstSimplifyFolder(Loc->getDataLayout())); ChkBuilder.SetInsertPoint(Loc); // Our instructions might fold to a constant. Value *MemoryRuntimeCheck = nullptr; @@ -1955,8 +1954,7 @@ Value *llvm::addDiffRuntimeChecks( function_ref GetVF, unsigned IC) { LLVMContext &Ctx = Loc->getContext(); - IRBuilder ChkBuilder(Ctx, - Loc->getDataLayout()); + IRBuilder ChkBuilder(Ctx, InstSimplifyFolder(Loc->getDataLayout())); ChkBuilder.SetInsertPoint(Loc); // Our instructions might fold to a constant. Value *MemoryRuntimeCheck = nullptr; -- cgit v1.1