From 4b696230fb8bf840e119ec93dd6961ab9169e37d Mon Sep 17 00:00:00 2001 From: dtcxzyw <15650457+dtcxzyw@users.noreply.github.com> Date: Sun, 6 Oct 2024 11:13:47 +0800 Subject: [PATCH 1/2] pre-commit: PR111144 --- scripts/setup_pre_commit_patch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/setup_pre_commit_patch.sh b/scripts/setup_pre_commit_patch.sh index 820278fb20a..bc605b4903a 100755 --- a/scripts/setup_pre_commit_patch.sh +++ b/scripts/setup_pre_commit_patch.sh @@ -2,7 +2,7 @@ set -euo pipefail shopt -s inherit_errexit -export GITHUB_PATCH_ID="/llvm-project/commit/" +export GITHUB_PATCH_ID=llvm/llvm-project/pull/111144 # Please rebase manually # git fetch origin From a78d4025e81dfecc6be6f03ddf3c98395a1a8285 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 6 Oct 2024 03:49:13 +0000 Subject: [PATCH 2/2] pre-commit: Update --- bench/abc/optimized/parseEqn.c.ll | 2 +- bench/anki-rs/optimized/242w8kogp1366avu.ll | 4 +- .../optimized/DropFaceNormalsProcess.cpp.ll | 10 +- bench/bdwgc/optimized/cordprnt.c.ll | 38 +-- bench/brotli/optimized/utf8_util.c.ll | 12 +- bench/c3c/optimized/benchmark.c.ll | 6 +- bench/ceres/optimized/wall_time.cc.ll | 24 +- bench/chibicc/optimized/unicode.ll | 42 ++-- bench/clamav/optimized/rs.cpp.ll | 153 ++++++------ .../archive_write_add_filter_b64encode.c.ll | 107 ++++---- .../archive_write_add_filter_uuencode.c.ll | 91 ++++--- bench/coremark/optimized/core_matrix.c.ll | 82 +++---- .../no_operator_caching_verifier.cpp.ll | 18 +- bench/entt/optimized/resource_loader.cpp.ll | 64 ++--- bench/faiss/optimized/utils.cpp.ll | 230 +++++++++--------- bench/flatbuffers/optimized/util.cpp.ll | 22 +- bench/glog/optimized/flags.cc.ll | 16 +- .../glog/optimized/stacktrace_unittest.cc.ll | 52 ++-- bench/glog/optimized/vlog_is_on.cc.ll | 36 +-- bench/harfbuzz/optimized/hb-number.cc.ll | 8 +- bench/hyper-rs/optimized/4lwa0ukf5hd0n1ju.ll | 50 ++-- bench/hyper-rs/optimized/5drhzjx8c241ue20.ll | 44 ++-- bench/libdeflate/optimized/crc32.c.ll | 72 +++--- bench/libjpeg-turbo/optimized/md5.c.ll | 79 +++--- bench/libquic/optimized/base64_bio.c.ll | 169 +++++++------ bench/libquic/optimized/md5.cc.ll | 154 ++++++------ bench/linux/optimized/pata_amd.ll | 170 +++++++------ bench/linux/optimized/pcm_misc.ll | 166 +++++++------ bench/linux/optimized/pps.ll | 198 ++++++++------- bench/llvm/optimized/MD5.cpp.ll | 91 +++---- bench/log-rs/optimized/315q9zx0681m0yr5.ll | 48 ++-- .../optimized/1bqqlm3jtb9rf3cv.ll | 120 ++++----- bench/mio-rs/optimized/2tcmneiv71cgky1q.ll | 40 +-- bench/mold/optimized/demangle.cc.ll | 30 +-- bench/nix/optimized/signer.ll | 56 ++--- bench/nix/optimized/terminal.ll | 90 +++---- bench/nuttx/optimized/lib_ungetwc.c.ll | 46 ++-- bench/openjdk/optimized/cmsmd5.ll | 116 ++++----- bench/openspiel/optimized/CalcTables.cpp.ll | 102 ++++---- .../optimized/libcrypto-lib-bio_b64.ll | 143 ++++++----- .../optimized/libcrypto-lib-mdc2dgst.ll | 67 +++-- bench/openvdb/optimized/Proximity.cc.ll | 92 +++---- bench/qoi/optimized/qoi.ll | 84 +++---- bench/quest/optimized/mt19937ar.c.ll | 26 +- bench/quickjs/optimized/qjsc.ll | 74 +++--- bench/re2/optimized/rune.cc.ll | 28 +-- .../optimized/simplethread.cpp.ll | 20 +- .../optimized/Filelist.cpp.ll | 32 +-- bench/redis/optimized/intset.ll | 125 +++++----- bench/redis/optimized/sha1.ll | 104 ++++---- bench/ring-rs/optimized/33fkftca8afosh1u.ll | 66 ++--- bench/ruby/optimized/sha1.ll | 126 +++++----- bench/smol-rs/optimized/21eidrukyvr99qqv.ll | 54 ++-- bench/stb/optimized/stb_hexwave.c.ll | 179 +++++++------- bench/stockfish/optimized/timeman.ll | 60 ++--- bench/sundials/optimized/sundials_errors.c.ll | 14 +- bench/syn/optimized/56htwb1zk20ney2o.ll | 76 +++--- bench/tev/optimized/ImageSaver.cpp.ll | 46 ++-- bench/tinympc/optimized/codegen_random.cpp.ll | 86 +++---- .../optimized/kwscsepwptyv51i.ll | 34 +-- bench/wolfssl/optimized/md5.c.ll | 121 +++++---- bench/wolfssl/optimized/sha.c.ll | 161 ++++++------ .../optimized/duration.struct_pb.cc.ll | 68 +++--- bench/zlib/optimized/crc32.c.ll | 58 ++--- 64 files changed, 2390 insertions(+), 2412 deletions(-) diff --git a/bench/abc/optimized/parseEqn.c.ll b/bench/abc/optimized/parseEqn.c.ll index 046814e83e0..88219086962 100644 --- a/bench/abc/optimized/parseEqn.c.ll +++ b/bench/abc/optimized/parseEqn.c.ll @@ -244,7 +244,7 @@ Parse_ParserPerformTopOp.exit.thread: ; preds = %56, %Parse_ParserPe 75: ; preds = %.lr.ph, %83 %indvars.iv308 = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next309, %83 ] - %76 = getelementptr inbounds ptr, ptr %.val202, i64 %indvars.iv308 + %76 = getelementptr inbounds nuw ptr, ptr %.val202, i64 %indvars.iv308 %77 = load ptr, ptr %76, align 8 %78 = tail call i32 @strncmp(ptr noundef nonnull %.1152, ptr noundef %77, i64 noundef %indvars.iv) #7 %79 = icmp eq i32 %78, 0 diff --git a/bench/anki-rs/optimized/242w8kogp1366avu.ll b/bench/anki-rs/optimized/242w8kogp1366avu.ll index fbb36b8e49c..3fc9ee996e8 100644 --- a/bench/anki-rs/optimized/242w8kogp1366avu.ll +++ b/bench/anki-rs/optimized/242w8kogp1366avu.ll @@ -7,7 +7,7 @@ target triple = "x86_64-unknown-linux-gnu" define void @_ZN4core4iter6traits8iterator8Iterator4fold17h8413a6a015ff070cE(i32 %0, i32 %1, ptr align 8 %2) unnamed_addr #0 personality ptr @rust_eh_personality { %4 = alloca { i32, i32 }, align 4 store i32 %0, ptr %4, align 4 - %5 = getelementptr inbounds i8, ptr %4, i64 4 + %5 = getelementptr inbounds nuw i8, ptr %4, i64 4 store i32 %1, ptr %5, align 4 br label %6 @@ -49,7 +49,7 @@ define void @_ZN4core4iter6traits8iterator8Iterator4fold17h8413a6a015ff070cE(i32 define void @_ZN4core4iter6traits8iterator8Iterator4fold17h8d00b7c9752bbe91E(i32 %0, i32 %1, ptr align 8 %2) unnamed_addr #0 personality ptr @rust_eh_personality { %4 = alloca { i32, i32 }, align 4 store i32 %0, ptr %4, align 4 - %5 = getelementptr inbounds i8, ptr %4, i64 4 + %5 = getelementptr inbounds nuw i8, ptr %4, i64 4 store i32 %1, ptr %5, align 4 %6 = call { i32, i32 } @"_ZN4core4iter5range101_$LT$impl$u20$core..iter..traits..iterator..Iterator$u20$for$u20$core..ops..range..Range$LT$A$GT$$GT$4next17ha41f11d50ec6c876E"(ptr nonnull align 4 %4) %.fca.0.extract4 = extractvalue { i32, i32 } %6, 0 diff --git a/bench/assimp/optimized/DropFaceNormalsProcess.cpp.ll b/bench/assimp/optimized/DropFaceNormalsProcess.cpp.ll index a691651d660..526e04b925d 100644 --- a/bench/assimp/optimized/DropFaceNormalsProcess.cpp.ll +++ b/bench/assimp/optimized/DropFaceNormalsProcess.cpp.ll @@ -73,13 +73,13 @@ entry: br i1 %tobool.not, label %for.cond.preheader, label %if.then for.cond.preheader: ; preds = %entry - %mNumMeshes = getelementptr inbounds i8, ptr %pScene, i64 16 + %mNumMeshes = getelementptr inbounds nuw i8, ptr %pScene, i64 16 %1 = load i32, ptr %mNumMeshes, align 8 %cmp7.not = icmp eq i32 %1, 0 br i1 %cmp7.not, label %if.else, label %for.body.lr.ph for.body.lr.ph: ; preds = %for.cond.preheader - %mMeshes = getelementptr inbounds i8, ptr %pScene, i64 24 + %mMeshes = getelementptr inbounds nuw i8, ptr %pScene, i64 24 br label %for.body if.then: ; preds = %entry @@ -102,9 +102,9 @@ for.body: ; preds = %for.body.lr.ph, %_Z %indvars.iv = phi i64 [ 0, %for.body.lr.ph ], [ %indvars.iv.next, %_ZN6Assimp22DropFaceNormalsProcess19DropMeshFaceNormalsEP6aiMesh.exit ] %bHas.08 = phi i1 [ false, %for.body.lr.ph ], [ %or6, %_ZN6Assimp22DropFaceNormalsProcess19DropMeshFaceNormalsEP6aiMesh.exit ] %4 = load ptr, ptr %mMeshes, align 8 - %arrayidx = getelementptr inbounds ptr, ptr %4, i64 %indvars.iv + %arrayidx = getelementptr inbounds nuw ptr, ptr %4, i64 %indvars.iv %5 = load ptr, ptr %arrayidx, align 8 - %mNormals.i = getelementptr inbounds i8, ptr %5, i64 24 + %mNormals.i = getelementptr inbounds nuw i8, ptr %5, i64 24 %6 = load ptr, ptr %mNormals.i, align 8 %cmp.i = icmp ne ptr %6, null br i1 %cmp.i, label %delete.notnull.i, label %_ZN6Assimp22DropFaceNormalsProcess19DropMeshFaceNormalsEP6aiMesh.exit @@ -185,7 +185,7 @@ declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr #4 ; Function Attrs: mustprogress nounwind uwtable define hidden noundef zeroext i1 @_ZN6Assimp22DropFaceNormalsProcess19DropMeshFaceNormalsEP6aiMesh(ptr nocapture noundef nonnull readnone align 8 dereferenceable(24) %this, ptr nocapture noundef %mesh) local_unnamed_addr #3 align 2 { entry: - %mNormals = getelementptr inbounds i8, ptr %mesh, i64 24 + %mNormals = getelementptr inbounds nuw i8, ptr %mesh, i64 24 %0 = load ptr, ptr %mNormals, align 8 %cmp = icmp ne ptr %0, null br i1 %cmp, label %delete.notnull, label %return diff --git a/bench/bdwgc/optimized/cordprnt.c.ll b/bench/bdwgc/optimized/cordprnt.c.ll index e9ec0147db6..25238a9e8ef 100644 --- a/bench/bdwgc/optimized/cordprnt.c.ll +++ b/bench/bdwgc/optimized/cordprnt.c.ll @@ -19,11 +19,11 @@ define i32 @CORD_vsprintf(ptr nocapture noundef writeonly %0, ptr noundef %1, pt %6 = alloca [51 x i8], align 16 %7 = alloca [1 x %struct.__va_list_tag], align 16 store ptr null, ptr %4, align 16 - %8 = getelementptr inbounds i8, ptr %4, i64 16 - %9 = getelementptr inbounds i8, ptr %4, i64 8 + %8 = getelementptr inbounds nuw i8, ptr %4, i64 16 + %9 = getelementptr inbounds nuw i8, ptr %4, i64 8 store ptr %8, ptr %9, align 8 call void @CORD_set_pos(ptr noundef nonnull %5, ptr noundef %1, i64 noundef 0) #10 - %10 = getelementptr inbounds i8, ptr %5, i64 8 + %10 = getelementptr inbounds nuw i8, ptr %5, i64 8 %11 = load i32, ptr %10, align 8 %.not186 = icmp eq i32 %11, 1431655765 br i1 %.not186, label %.._crit_edge_crit_edge, label %.lr.ph187 @@ -33,15 +33,15 @@ define i32 @CORD_vsprintf(ptr nocapture noundef writeonly %0, ptr noundef %1, pt br label %._crit_edge .lr.ph187: ; preds = %3 - %12 = getelementptr inbounds i8, ptr %5, i64 32 - %13 = getelementptr inbounds i8, ptr %5, i64 16 - %14 = getelementptr inbounds i8, ptr %5, i64 24 - %15 = getelementptr inbounds i8, ptr %4, i64 144 - %16 = getelementptr inbounds i8, ptr %2, i64 8 - %17 = getelementptr inbounds i8, ptr %2, i64 16 + %12 = getelementptr inbounds nuw i8, ptr %5, i64 32 + %13 = getelementptr inbounds nuw i8, ptr %5, i64 16 + %14 = getelementptr inbounds nuw i8, ptr %5, i64 24 + %15 = getelementptr inbounds nuw i8, ptr %4, i64 144 + %16 = getelementptr inbounds nuw i8, ptr %2, i64 8 + %17 = getelementptr inbounds nuw i8, ptr %2, i64 16 %18 = ptrtoint ptr %8 to i64 %.neg = add i64 %18, 128 - %19 = getelementptr inbounds i8, ptr %2, i64 4 + %19 = getelementptr inbounds nuw i8, ptr %2, i64 4 br label %20 20: ; preds = %.lr.ph187, %454 @@ -122,7 +122,7 @@ define i32 @CORD_vsprintf(ptr nocapture noundef writeonly %0, ptr noundef %1, pt 59: ; preds = %55, %58 %60 = phi ptr [ %56, %55 ], [ %.pre203, %58 ] - %61 = getelementptr inbounds i8, ptr %60, i64 1 + %61 = getelementptr inbounds nuw i8, ptr %60, i64 1 store ptr %61, ptr %9, align 8 store i8 37, ptr %60, align 1 br label %.loopexit @@ -161,7 +161,7 @@ define i32 @CORD_vsprintf(ptr nocapture noundef writeonly %0, ptr noundef %1, pt 74: ; preds = %72, %65 %.in.i = phi i8 [ %71, %65 ], [ %73, %72 ] %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 - %75 = getelementptr inbounds i8, ptr %6, i64 %indvars.iv.i + %75 = getelementptr inbounds nuw i8, ptr %6, i64 %indvars.iv.i store i8 %.in.i, ptr %75, align 1 switch i8 %.in.i, label %extract_conv_spec.exit.thread [ i8 42, label %89 @@ -274,7 +274,7 @@ define i32 @CORD_vsprintf(ptr nocapture noundef writeonly %0, ptr noundef %1, pt %100 = select i1 %.not49.i, i1 true, i1 %.not50.i %.4 = select i1 %100, i32 -1, i32 %.04558.i %101 = and i64 %indvars.iv.next.i, 4294967295 - %102 = getelementptr inbounds i8, ptr %6, i64 %101 + %102 = getelementptr inbounds nuw i8, ptr %6, i64 %101 store i8 0, ptr %102, align 1 %103 = load i64, ptr %12, align 16 %.not115 = icmp eq i64 %103, 0 @@ -562,7 +562,7 @@ define i32 @CORD_vsprintf(ptr nocapture noundef writeonly %0, ptr noundef %1, pt 262: ; preds = %254 call void @llvm.memset.p0.i64(ptr nonnull align 1 %257, i8 32, i64 %255, i1 false) - %263 = getelementptr inbounds i8, ptr %257, i64 %255 + %263 = getelementptr inbounds nuw i8, ptr %257, i64 %255 store i8 0, ptr %263, align 1 %.not120 = icmp eq i32 %.0144, 0 br i1 %.not120, label %266, label %264 @@ -620,7 +620,7 @@ define i32 @CORD_vsprintf(ptr nocapture noundef writeonly %0, ptr noundef %1, pt 290: ; preds = %283, %289 %291 = phi ptr [ %287, %283 ], [ %.pre199, %289 ] - %292 = getelementptr inbounds i8, ptr %291, i64 1 + %292 = getelementptr inbounds nuw i8, ptr %291, i64 1 store ptr %292, ptr %9, align 8 store i8 %286, ptr %291, align 1 br label %.loopexit @@ -660,7 +660,7 @@ define i32 @CORD_vsprintf(ptr nocapture noundef writeonly %0, ptr noundef %1, pt .lr.ph: ; preds = %307, %316 %311 = phi i8 [ %319, %316 ], [ %310, %307 ] %.pn = phi ptr [ %312, %316 ], [ %309, %307 ] - %312 = getelementptr inbounds i8, ptr %.pn, i64 1 + %312 = getelementptr inbounds nuw i8, ptr %.pn, i64 1 %313 = load ptr, ptr %9, align 8 %314 = icmp eq ptr %313, %15 br i1 %314, label %315, label %316 @@ -672,7 +672,7 @@ define i32 @CORD_vsprintf(ptr nocapture noundef writeonly %0, ptr noundef %1, pt 316: ; preds = %.lr.ph, %315 %317 = phi ptr [ %313, %.lr.ph ], [ %.pre198, %315 ] - %318 = getelementptr inbounds i8, ptr %317, i64 1 + %318 = getelementptr inbounds nuw i8, ptr %317, i64 1 store ptr %318, ptr %9, align 8 store i8 %311, ptr %317, align 1 %319 = load i8, ptr %312, align 1 @@ -930,7 +930,7 @@ define i32 @CORD_vsprintf(ptr nocapture noundef writeonly %0, ptr noundef %1, pt 435: ; preds = %.lr.ph185, %434 %436 = phi ptr [ %432, %.lr.ph185 ], [ %.pre202, %434 ] - %437 = getelementptr inbounds i8, ptr %436, i64 1 + %437 = getelementptr inbounds nuw i8, ptr %436, i64 1 store ptr %437, ptr %9, align 8 store i8 %430, ptr %436, align 1 %438 = load i8, ptr %431, align 1 @@ -954,7 +954,7 @@ define i32 @CORD_vsprintf(ptr nocapture noundef writeonly %0, ptr noundef %1, pt 445: ; preds = %441, %444 %446 = phi ptr [ %442, %441 ], [ %.pre, %444 ] - %447 = getelementptr inbounds i8, ptr %446, i64 1 + %447 = getelementptr inbounds nuw i8, ptr %446, i64 1 store ptr %447, ptr %9, align 8 store i8 %.in, ptr %446, align 1 br label %.loopexit diff --git a/bench/brotli/optimized/utf8_util.c.ll b/bench/brotli/optimized/utf8_util.c.ll index 69d08d4405b..c862a075414 100644 --- a/bench/brotli/optimized/utf8_util.c.ll +++ b/bench/brotli/optimized/utf8_util.c.ll @@ -31,7 +31,7 @@ land.lhs.true.i: ; preds = %if.end7.i br i1 %cmp13.i, label %land.lhs.true15.i, label %if.end32.i land.lhs.true15.i: ; preds = %land.lhs.true.i - %arrayidx16.i = getelementptr inbounds i8, ptr %arrayidx, i64 1 + %arrayidx16.i = getelementptr inbounds nuw i8, ptr %arrayidx, i64 1 %1 = load i8, ptr %arrayidx16.i, align 1 %conv17.i = zext i8 %1 to i32 %and18.i = and i32 %conv17.i, 192 @@ -56,7 +56,7 @@ land.lhs.true35.i: ; preds = %if.end32.i br i1 %cmp39.i, label %land.lhs.true41.i, label %if.end71.i land.lhs.true41.i: ; preds = %land.lhs.true35.i - %arrayidx42.i = getelementptr inbounds i8, ptr %arrayidx, i64 1 + %arrayidx42.i = getelementptr inbounds nuw i8, ptr %arrayidx, i64 1 %2 = load i8, ptr %arrayidx42.i, align 1 %conv43.i = zext i8 %2 to i32 %and44.i = and i32 %conv43.i, 192 @@ -64,7 +64,7 @@ land.lhs.true41.i: ; preds = %land.lhs.true35.i br i1 %cmp45.i, label %land.lhs.true47.i, label %if.end71.i land.lhs.true47.i: ; preds = %land.lhs.true41.i - %arrayidx48.i = getelementptr inbounds i8, ptr %arrayidx, i64 2 + %arrayidx48.i = getelementptr inbounds nuw i8, ptr %arrayidx, i64 2 %3 = load i8, ptr %arrayidx48.i, align 1 %conv49.i = zext i8 %3 to i32 %and50.i = and i32 %conv49.i, 192 @@ -90,7 +90,7 @@ if.end71.i: ; preds = %if.then53.i, %land. br i1 %or.cond8, label %land.lhs.true80.i, label %if.end124.i land.lhs.true80.i: ; preds = %if.end71.i - %arrayidx81.i = getelementptr inbounds i8, ptr %arrayidx, i64 1 + %arrayidx81.i = getelementptr inbounds nuw i8, ptr %arrayidx, i64 1 %4 = load i8, ptr %arrayidx81.i, align 1 %conv82.i = zext i8 %4 to i32 %and83.i = and i32 %conv82.i, 192 @@ -98,7 +98,7 @@ land.lhs.true80.i: ; preds = %if.end71.i br i1 %cmp84.i, label %land.lhs.true86.i, label %if.end124.i land.lhs.true86.i: ; preds = %land.lhs.true80.i - %arrayidx87.i = getelementptr inbounds i8, ptr %arrayidx, i64 2 + %arrayidx87.i = getelementptr inbounds nuw i8, ptr %arrayidx, i64 2 %5 = load i8, ptr %arrayidx87.i, align 1 %conv88.i = zext i8 %5 to i32 %and89.i = and i32 %conv88.i, 192 @@ -106,7 +106,7 @@ land.lhs.true86.i: ; preds = %land.lhs.true80.i br i1 %cmp90.i, label %land.lhs.true92.i, label %if.end124.i land.lhs.true92.i: ; preds = %land.lhs.true86.i - %arrayidx93.i = getelementptr inbounds i8, ptr %arrayidx, i64 3 + %arrayidx93.i = getelementptr inbounds nuw i8, ptr %arrayidx, i64 3 %6 = load i8, ptr %arrayidx93.i, align 1 %conv94.i = zext i8 %6 to i32 %and95.i = and i32 %conv94.i, 192 diff --git a/bench/c3c/optimized/benchmark.c.ll b/bench/c3c/optimized/benchmark.c.ll index c95791abe57..45a9a8b69b6 100644 --- a/bench/c3c/optimized/benchmark.c.ll +++ b/bench/c3c/optimized/benchmark.c.ll @@ -26,7 +26,7 @@ define dso_local double @bench_mark() local_unnamed_addr #0 { %5 = load i64, ptr %1, align 8 %6 = sub nsw i64 %5, %2 %7 = sitofp i64 %6 to double - %8 = getelementptr inbounds i8, ptr %1, i64 8 + %8 = getelementptr inbounds nuw i8, ptr %1, i64 8 %9 = load i64, ptr %8, align 8 %10 = sub nsw i64 %9, %3 %11 = sitofp i64 %10 to double @@ -43,7 +43,7 @@ define dso_local double @benchmark(i64 %0, i64 %1) local_unnamed_addr #0 { %5 = load i64, ptr %3, align 8 %6 = sub nsw i64 %5, %0 %7 = sitofp i64 %6 to double - %8 = getelementptr inbounds i8, ptr %3, i64 8 + %8 = getelementptr inbounds nuw i8, ptr %3, i64 8 %9 = load i64, ptr %8, align 8 %10 = sub nsw i64 %9, %1 %11 = sitofp i64 %10 to double @@ -58,7 +58,7 @@ define dso_local { i64, i64 } @benchstart() local_unnamed_addr #0 { %2 = call i32 @clock_gettime(i32 noundef 1, ptr noundef nonnull %1) #3 %.fca.0.load = load i64, ptr %1, align 8 %.fca.0.insert = insertvalue { i64, i64 } poison, i64 %.fca.0.load, 0 - %.fca.1.gep = getelementptr inbounds i8, ptr %1, i64 8 + %.fca.1.gep = getelementptr inbounds nuw i8, ptr %1, i64 8 %.fca.1.load = load i64, ptr %.fca.1.gep, align 8 %.fca.1.insert = insertvalue { i64, i64 } %.fca.0.insert, i64 %.fca.1.load, 1 ret { i64, i64 } %.fca.1.insert diff --git a/bench/ceres/optimized/wall_time.cc.ll b/bench/ceres/optimized/wall_time.cc.ll index 8e398aa5783..efb463015a8 100644 --- a/bench/ceres/optimized/wall_time.cc.ll +++ b/bench/ceres/optimized/wall_time.cc.ll @@ -40,7 +40,7 @@ define hidden noundef double @_ZN5ceres8internal17WallTimeInSecondsEv() local_un %2 = call i32 @gettimeofday(ptr noundef nonnull %1, ptr noundef null) #10 %3 = load i64, ptr %1, align 8 %4 = sitofp i64 %3 to double - %5 = getelementptr inbounds i8, ptr %1, i64 8 + %5 = getelementptr inbounds nuw i8, ptr %1, i64 8 %6 = load i64, ptr %5, align 8 %7 = sitofp i64 %6 to double %8 = tail call double @llvm.fmuladd.f64(double %7, double 0x3EB0C6F7A0B5ED8D, double %4) @@ -57,7 +57,7 @@ declare double @llvm.fmuladd.f64(double, double, double) #2 define hidden void @_ZN5ceres8internal11EventLoggerC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(32) %1) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 { %3 = alloca %struct.timeval, align 8 %4 = alloca %"class.std::__cxx11::basic_string", align 8 - %5 = getelementptr inbounds i8, ptr %0, i64 16 + %5 = getelementptr inbounds nuw i8, ptr %0, i64 16 tail call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #10 %6 = load ptr, ptr @_ZZN5ceres8internal11EventLoggerC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE8vlocal__, align 8 %7 = icmp eq ptr %6, null @@ -86,13 +86,13 @@ define hidden void @_ZN5ceres8internal11EventLoggerC2ERKNSt7__cxx1112basic_strin %17 = call i32 @gettimeofday(ptr noundef nonnull %3, ptr noundef null) #10 %18 = load i64, ptr %3, align 8 %19 = sitofp i64 %18 to double - %20 = getelementptr inbounds i8, ptr %3, i64 8 + %20 = getelementptr inbounds nuw i8, ptr %3, i64 8 %21 = load i64, ptr %20, align 8 %22 = sitofp i64 %21 to double %23 = tail call noundef double @llvm.fmuladd.f64(double %22, double 0x3EB0C6F7A0B5ED8D, double %19) call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) store double %23, ptr %0, align 8 - %24 = getelementptr inbounds i8, ptr %0, i64 8 + %24 = getelementptr inbounds nuw i8, ptr %0, i64 8 store double %23, ptr %24, align 8 %25 = tail call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #10 invoke void (ptr, ptr, ...) @_ZN5ceres8internal12StringPrintfB5cxx11EPKcz(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %4, ptr noundef nonnull @.str.1, ptr noundef %25) @@ -188,18 +188,18 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.exit: ; pr %26 = call i32 @gettimeofday(ptr noundef nonnull %2, ptr noundef null) #10 %27 = load i64, ptr %2, align 8 %28 = sitofp i64 %27 to double - %29 = getelementptr inbounds i8, ptr %2, i64 8 + %29 = getelementptr inbounds nuw i8, ptr %2, i64 8 %30 = load i64, ptr %29, align 8 %31 = sitofp i64 %30 to double %32 = call noundef double @llvm.fmuladd.f64(double %31, double 0x3EB0C6F7A0B5ED8D, double %28) call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) - %33 = getelementptr inbounds i8, ptr %0, i64 8 + %33 = getelementptr inbounds nuw i8, ptr %0, i64 8 %34 = load double, ptr %33, align 8 %35 = fsub double %32, %34 %36 = load double, ptr %0, align 8 %37 = fsub double %32, %36 store double %32, ptr %33, align 8 - %38 = getelementptr inbounds i8, ptr %0, i64 16 + %38 = getelementptr inbounds nuw i8, ptr %0, i64 16 %39 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %3) #10 invoke void (ptr, ptr, ...) @_ZN5ceres8internal13StringAppendFEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcz(ptr noundef nonnull %38, ptr noundef nonnull @.str.4, ptr noundef %39, double noundef %35, double noundef %37) to label %_ZN5ceres8internal11EventLogger8AddEventERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.exit unwind label %60 @@ -236,7 +236,7 @@ _ZN5ceres8internal11EventLogger8AddEventERKNSt7__cxx1112basic_stringIcSt11char_t to label %53 unwind label %60 53: ; preds = %51 - %54 = getelementptr inbounds i8, ptr %0, i64 16 + %54 = getelementptr inbounds nuw i8, ptr %0, i64 16 %55 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %52, ptr noundef nonnull align 8 dereferenceable(32) %54) to label %56 unwind label %60 @@ -249,7 +249,7 @@ _ZN5ceres8internal11EventLogger8AddEventERKNSt7__cxx1112basic_stringIcSt11char_t br label %.critedge .critedge: ; preds = %44, %10, %58, %47, %13 - %59 = getelementptr inbounds i8, ptr %0, i64 16 + %59 = getelementptr inbounds nuw i8, ptr %0, i64 16 call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %59) #10 ret void @@ -298,18 +298,18 @@ define hidden void @_ZN5ceres8internal11EventLogger8AddEventERKNSt7__cxx1112basi %12 = call i32 @gettimeofday(ptr noundef nonnull %3, ptr noundef null) #10 %13 = load i64, ptr %3, align 8 %14 = sitofp i64 %13 to double - %15 = getelementptr inbounds i8, ptr %3, i64 8 + %15 = getelementptr inbounds nuw i8, ptr %3, i64 8 %16 = load i64, ptr %15, align 8 %17 = sitofp i64 %16 to double %18 = tail call noundef double @llvm.fmuladd.f64(double %17, double 0x3EB0C6F7A0B5ED8D, double %14) call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) - %19 = getelementptr inbounds i8, ptr %0, i64 8 + %19 = getelementptr inbounds nuw i8, ptr %0, i64 8 %20 = load double, ptr %19, align 8 %21 = fsub double %18, %20 %22 = load double, ptr %0, align 8 %23 = fsub double %18, %22 store double %18, ptr %19, align 8 - %24 = getelementptr inbounds i8, ptr %0, i64 16 + %24 = getelementptr inbounds nuw i8, ptr %0, i64 16 %25 = tail call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #10 tail call void (ptr, ptr, ...) @_ZN5ceres8internal13StringAppendFEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcz(ptr noundef nonnull %24, ptr noundef nonnull @.str.4, ptr noundef %25, double noundef %21, double noundef %23) br label %26 diff --git a/bench/chibicc/optimized/unicode.ll b/bench/chibicc/optimized/unicode.ll index 2b95470a93e..d45e375e184 100644 --- a/bench/chibicc/optimized/unicode.ll +++ b/bench/chibicc/optimized/unicode.ll @@ -32,13 +32,13 @@ if.then3: ; preds = %if.end %1 = trunc i32 %c to i8 %2 = and i8 %1, 63 %conv7 = or disjoint i8 %2, -128 - %arrayidx8 = getelementptr inbounds i8, ptr %buf, i64 1 + %arrayidx8 = getelementptr inbounds nuw i8, ptr %buf, i64 1 store i8 %conv7, ptr %arrayidx8, align 1 br label %return if.end9: ; preds = %if.end %cmp10 = icmp ult i32 %c, 65536 - %arrayidx21 = getelementptr inbounds i8, ptr %buf, i64 1 + %arrayidx21 = getelementptr inbounds nuw i8, ptr %buf, i64 1 br i1 %cmp10, label %if.then12, label %if.end26 if.then12: ; preds = %if.end9 @@ -54,7 +54,7 @@ if.then12: ; preds = %if.end9 %6 = trunc i32 %c to i8 %7 = and i8 %6, 63 %conv24 = or disjoint i8 %7, -128 - %arrayidx25 = getelementptr inbounds i8, ptr %buf, i64 2 + %arrayidx25 = getelementptr inbounds nuw i8, ptr %buf, i64 2 store i8 %conv24, ptr %arrayidx25, align 1 br label %return @@ -72,12 +72,12 @@ if.end26: ; preds = %if.end9 %11 = trunc i32 %shr36 to i8 %12 = and i8 %11, 63 %conv39 = or disjoint i8 %12, -128 - %arrayidx40 = getelementptr inbounds i8, ptr %buf, i64 2 + %arrayidx40 = getelementptr inbounds nuw i8, ptr %buf, i64 2 store i8 %conv39, ptr %arrayidx40, align 1 %13 = trunc i32 %c to i8 %14 = and i8 %13, 63 %conv43 = or disjoint i8 %14, -128 - %arrayidx44 = getelementptr inbounds i8, ptr %buf, i64 3 + %arrayidx44 = getelementptr inbounds nuw i8, ptr %buf, i64 3 store i8 %conv43, ptr %arrayidx44, align 1 br label %return @@ -94,7 +94,7 @@ entry: br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry - %add.ptr = getelementptr inbounds i8, ptr %p, i64 1 + %add.ptr = getelementptr inbounds nuw i8, ptr %p, i64 1 store ptr %add.ptr, ptr %new_pos, align 8 %1 = load i8, ptr %p, align 1 %conv2 = sext i8 %1 to i32 @@ -126,7 +126,7 @@ if.end24: ; preds = %if.else14, %if.else for.body: ; preds = %if.end24, %if.end31 %indvars.iv = phi i64 [ 1, %if.end24 ], [ %indvars.iv.next, %if.end31 ] %c.121 = phi i32 [ %c.0, %if.end24 ], [ %or, %if.end31 ] - %arrayidx = getelementptr inbounds i8, ptr %p, i64 %indvars.iv + %arrayidx = getelementptr inbounds nuw i8, ptr %p, i64 %indvars.iv %3 = load i8, ptr %arrayidx, align 1 %.mask = and i8 %3, -64 %cmp28.not = icmp eq i8 %.mask, -128 @@ -146,7 +146,7 @@ if.end31: ; preds = %for.body br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !7 for.end: ; preds = %if.end31 - %add.ptr36 = getelementptr inbounds i8, ptr %p, i64 %len.0 + %add.ptr36 = getelementptr inbounds nuw i8, ptr %p, i64 %len.0 store ptr %add.ptr36, ptr %new_pos, align 8 br label %return @@ -171,14 +171,14 @@ for.body.i: ; preds = %entry, %for.inc.i land.lhs.true.i: ; preds = %for.body.i %1 = or disjoint i64 %indvars.iv.i, 1 - %arrayidx5.i = getelementptr inbounds i32, ptr @is_ident1.range, i64 %1 + %arrayidx5.i = getelementptr inbounds nuw i32, ptr @is_ident1.range, i64 %1 %2 = load i32, ptr %arrayidx5.i, align 4 %cmp6.not.i = icmp ugt i32 %c, %2 br i1 %cmp6.not.i, label %for.inc.i, label %in_range.exit for.inc.i: ; preds = %land.lhs.true.i, %for.body.i %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 2 - %arrayidx.i = getelementptr inbounds i32, ptr @is_ident1.range, i64 %indvars.iv.next.i + %arrayidx.i = getelementptr inbounds nuw i32, ptr @is_ident1.range, i64 %indvars.iv.next.i %3 = load i32, ptr %arrayidx.i, align 8 %cmp.not.not.i = icmp eq i32 %3, -1 br i1 %cmp.not.not.i, label %in_range.exit, label %for.body.i, !llvm.loop !9 @@ -201,14 +201,14 @@ for.body.i.i: ; preds = %entry, %for.inc.i.i land.lhs.true.i.i: ; preds = %for.body.i.i %1 = or disjoint i64 %indvars.iv.i.i, 1 - %arrayidx5.i.i = getelementptr inbounds i32, ptr @is_ident1.range, i64 %1 + %arrayidx5.i.i = getelementptr inbounds nuw i32, ptr @is_ident1.range, i64 %1 %2 = load i32, ptr %arrayidx5.i.i, align 4 %cmp6.not.i.i = icmp ugt i32 %c, %2 br i1 %cmp6.not.i.i, label %for.inc.i.i, label %lor.end for.inc.i.i: ; preds = %land.lhs.true.i.i, %for.body.i.i %indvars.iv.next.i.i = add nuw nsw i64 %indvars.iv.i.i, 2 - %arrayidx.i.i = getelementptr inbounds i32, ptr @is_ident1.range, i64 %indvars.iv.next.i.i + %arrayidx.i.i = getelementptr inbounds nuw i32, ptr @is_ident1.range, i64 %indvars.iv.next.i.i %3 = load i32, ptr %arrayidx.i.i, align 8 %cmp.not.not.i.i = icmp eq i32 %3, -1 br i1 %cmp.not.not.i.i, label %for.body.i, label %for.body.i.i, !llvm.loop !9 @@ -221,14 +221,14 @@ for.body.i: ; preds = %for.inc.i.i, %for.i land.lhs.true.i: ; preds = %for.body.i %5 = or disjoint i64 %indvars.iv.i, 1 - %arrayidx5.i = getelementptr inbounds i32, ptr @is_ident2.range, i64 %5 + %arrayidx5.i = getelementptr inbounds nuw i32, ptr @is_ident2.range, i64 %5 %6 = load i32, ptr %arrayidx5.i, align 4 %cmp6.not.i = icmp ugt i32 %c, %6 br i1 %cmp6.not.i, label %for.inc.i, label %lor.end for.inc.i: ; preds = %land.lhs.true.i, %for.body.i %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 2 - %arrayidx.i = getelementptr inbounds i32, ptr @is_ident2.range, i64 %indvars.iv.next.i + %arrayidx.i = getelementptr inbounds nuw i32, ptr @is_ident2.range, i64 %indvars.iv.next.i %7 = load i32, ptr %arrayidx.i, align 8 %cmp.not.not.i = icmp eq i32 %7, -1 br i1 %cmp.not.not.i, label %lor.end, label %for.body.i, !llvm.loop !9 @@ -254,7 +254,7 @@ while.body: ; preds = %entry, %char_width. br i1 %cmp.i, label %if.then.i, label %if.end.i if.then.i: ; preds = %while.body - %add.ptr.i = getelementptr inbounds i8, ptr %p.addr.011, i64 1 + %add.ptr.i = getelementptr inbounds nuw i8, ptr %p.addr.011, i64 1 %conv2.i = zext nneg i8 %0 to i32 br label %decode_utf8.exit @@ -284,7 +284,7 @@ if.end24.i: ; preds = %if.else14.i, %if.el for.body.i: ; preds = %if.end31.i, %if.end24.i %indvars.iv.i = phi i64 [ 1, %if.end24.i ], [ %indvars.iv.next.i, %if.end31.i ] %c.121.i = phi i32 [ %c.0.i, %if.end24.i ], [ %or.i, %if.end31.i ] - %arrayidx.i = getelementptr inbounds i8, ptr %p.addr.011, i64 %indvars.iv.i + %arrayidx.i = getelementptr inbounds nuw i8, ptr %p.addr.011, i64 %indvars.iv.i %2 = load i8, ptr %arrayidx.i, align 1 %.mask.i = and i8 %2, -64 %cmp28.not.i = icmp eq i8 %.mask.i, -128 @@ -304,7 +304,7 @@ if.end31.i: ; preds = %for.body.i br i1 %exitcond.not.i, label %for.end.i, label %for.body.i, !llvm.loop !7 for.end.i: ; preds = %if.end31.i - %add.ptr36.i = getelementptr inbounds i8, ptr %p.addr.011, i64 %len.0.i + %add.ptr36.i = getelementptr inbounds nuw i8, ptr %p.addr.011, i64 %len.0.i br label %decode_utf8.exit decode_utf8.exit: ; preds = %if.then.i, %for.end.i @@ -320,14 +320,14 @@ for.body.i.i: ; preds = %decode_utf8.exit, % land.lhs.true.i.i: ; preds = %for.body.i.i %5 = or disjoint i64 %indvars.iv.i.i, 1 - %arrayidx5.i.i = getelementptr inbounds i32, ptr @char_width.range1, i64 %5 + %arrayidx5.i.i = getelementptr inbounds nuw i32, ptr @char_width.range1, i64 %5 %6 = load i32, ptr %arrayidx5.i.i, align 4 %cmp6.not.i.i = icmp ugt i32 %retval.0.i, %6 br i1 %cmp6.not.i.i, label %for.inc.i.i, label %char_width.exit for.inc.i.i: ; preds = %land.lhs.true.i.i, %for.body.i.i %indvars.iv.next.i.i = add nuw nsw i64 %indvars.iv.i.i, 2 - %arrayidx.i.i = getelementptr inbounds i32, ptr @char_width.range1, i64 %indvars.iv.next.i.i + %arrayidx.i.i = getelementptr inbounds nuw i32, ptr @char_width.range1, i64 %indvars.iv.next.i.i %7 = load i32, ptr %arrayidx.i.i, align 8 %cmp.not.not.i.i = icmp eq i32 %7, -1 br i1 %cmp.not.not.i.i, label %for.body.i3.i, label %for.body.i.i, !llvm.loop !9 @@ -340,14 +340,14 @@ for.body.i3.i: ; preds = %for.inc.i.i, %for.i land.lhs.true.i6.i: ; preds = %for.body.i3.i %9 = or disjoint i64 %indvars.iv.i4.i, 1 - %arrayidx5.i7.i = getelementptr inbounds i32, ptr @char_width.range2, i64 %9 + %arrayidx5.i7.i = getelementptr inbounds nuw i32, ptr @char_width.range2, i64 %9 %10 = load i32, ptr %arrayidx5.i7.i, align 4 %cmp6.not.i8.i = icmp ugt i32 %retval.0.i, %10 br i1 %cmp6.not.i8.i, label %for.inc.i10.i, label %char_width.exit for.inc.i10.i: ; preds = %land.lhs.true.i6.i, %for.body.i3.i %indvars.iv.next.i11.i = add nuw nsw i64 %indvars.iv.i4.i, 2 - %arrayidx.i12.i = getelementptr inbounds i32, ptr @char_width.range2, i64 %indvars.iv.next.i11.i + %arrayidx.i12.i = getelementptr inbounds nuw i32, ptr @char_width.range2, i64 %indvars.iv.next.i11.i %11 = load i32, ptr %arrayidx.i12.i, align 8 %cmp.not.not.i13.i = icmp eq i32 %11, -1 br i1 %cmp.not.not.i13.i, label %char_width.exit, label %for.body.i3.i, !llvm.loop !9 diff --git a/bench/clamav/optimized/rs.cpp.ll b/bench/clamav/optimized/rs.cpp.ll index c4c87ba6e02..9e7d230b07a 100644 --- a/bench/clamav/optimized/rs.cpp.ll +++ b/bench/clamav/optimized/rs.cpp.ll @@ -5,11 +5,11 @@ target triple = "x86_64-pc-linux-gnu" ; Function Attrs: mustprogress nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable define void @_ZN7RSCoder4InitEi(ptr nocapture noundef nonnull align 4 dereferenceable(11273) %0, i32 noundef %1) local_unnamed_addr #0 align 2 { - %3 = getelementptr inbounds i8, ptr %0, i64 9220 + %3 = getelementptr inbounds nuw i8, ptr %0, i64 9220 store i32 %1, ptr %3, align 4 - %4 = getelementptr inbounds i8, ptr %0, i64 11272 + %4 = getelementptr inbounds nuw i8, ptr %0, i64 11272 store i8 0, ptr %4, align 4 - %5 = getelementptr inbounds i8, ptr %0, i64 2048 + %5 = getelementptr inbounds nuw i8, ptr %0, i64 2048 br label %6 6: ; preds = %6, %2 @@ -19,7 +19,7 @@ define void @_ZN7RSCoder4InitEi(ptr nocapture noundef nonnull align 4 dereferenc %8 = getelementptr inbounds [256 x i32], ptr %5, i64 0, i64 %7 %9 = trunc nuw nsw i64 %indvars.iv.i to i32 store i32 %9, ptr %8, align 4 - %10 = getelementptr inbounds [512 x i32], ptr %0, i64 0, i64 %indvars.iv.i + %10 = getelementptr inbounds nuw [512 x i32], ptr %0, i64 0, i64 %indvars.iv.i store i32 %.01318.i, ptr %10, align 4 %11 = shl i32 %.01318.i, 1 %12 = icmp sgt i32 %11, 255 @@ -34,7 +34,7 @@ define void @_ZN7RSCoder4InitEi(ptr nocapture noundef nonnull align 4 dereferenc %14 = add nsw i64 %indvars.iv21.i, -255 %15 = getelementptr inbounds [512 x i32], ptr %0, i64 0, i64 %14 %16 = load i32, ptr %15, align 4 - %17 = getelementptr inbounds [512 x i32], ptr %0, i64 0, i64 %indvars.iv21.i + %17 = getelementptr inbounds nuw [512 x i32], ptr %0, i64 0, i64 %indvars.iv21.i store i32 %16, ptr %17, align 4 %indvars.iv.next22.i = add nuw nsw i64 %indvars.iv21.i, 1 %exitcond24.not.i = icmp eq i64 %indvars.iv.next22.i, 512 @@ -47,7 +47,7 @@ _ZN7RSCoder6gfInitEv.exit: ; preds = %.preheader.i ; Function Attrs: mustprogress nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable define void @_ZN7RSCoder6gfInitEv(ptr nocapture noundef nonnull align 4 dereferenceable(11273) %0) local_unnamed_addr #0 align 2 { - %2 = getelementptr inbounds i8, ptr %0, i64 2048 + %2 = getelementptr inbounds nuw i8, ptr %0, i64 2048 br label %3 3: ; preds = %1, %3 @@ -57,7 +57,7 @@ define void @_ZN7RSCoder6gfInitEv(ptr nocapture noundef nonnull align 4 derefere %5 = getelementptr inbounds [256 x i32], ptr %2, i64 0, i64 %4 %6 = trunc nuw nsw i64 %indvars.iv to i32 store i32 %6, ptr %5, align 4 - %7 = getelementptr inbounds [512 x i32], ptr %0, i64 0, i64 %indvars.iv + %7 = getelementptr inbounds nuw [512 x i32], ptr %0, i64 0, i64 %indvars.iv store i32 %.01318, ptr %7, align 4 %8 = shl i32 %.01318, 1 %9 = icmp sgt i32 %8, 255 @@ -72,7 +72,7 @@ define void @_ZN7RSCoder6gfInitEv(ptr nocapture noundef nonnull align 4 derefere %11 = add nsw i64 %indvars.iv21, -255 %12 = getelementptr inbounds [512 x i32], ptr %0, i64 0, i64 %11 %13 = load i32, ptr %12, align 4 - %14 = getelementptr inbounds [512 x i32], ptr %0, i64 0, i64 %indvars.iv21 + %14 = getelementptr inbounds nuw [512 x i32], ptr %0, i64 0, i64 %indvars.iv21 store i32 %13, ptr %14, align 4 %indvars.iv.next22 = add nuw nsw i64 %indvars.iv21, 1 %exitcond24.not = icmp eq i64 %indvars.iv.next22, 512 @@ -86,7 +86,7 @@ define void @_ZN7RSCoder6gfInitEv(ptr nocapture noundef nonnull align 4 derefere define void @_ZN7RSCoder6pnInitEv(ptr nocapture noundef nonnull align 4 dereferenceable(11273) %0) local_unnamed_addr #0 align 2 { %2 = alloca [256 x i32], align 16 %3 = alloca [256 x i32], align 16 - %4 = getelementptr inbounds i8, ptr %0, i64 9220 + %4 = getelementptr inbounds nuw i8, ptr %0, i64 9220 %5 = load i32, ptr %4, align 4 %6 = icmp sgt i32 %5, 0 br i1 %6, label %.preheader.lr.ph, label %._crit_edge30 @@ -96,9 +96,9 @@ define void @_ZN7RSCoder6pnInitEv(ptr nocapture noundef nonnull align 4 derefere %8 = shl nuw nsw i64 %7, 2 call void @llvm.memset.p0.i64(ptr nonnull align 16 %2, i8 0, i64 %8, i1 false) store i32 1, ptr %2, align 16 - %9 = getelementptr inbounds i8, ptr %3, i64 4 - %10 = getelementptr inbounds i8, ptr %0, i64 3072 - %11 = getelementptr inbounds i8, ptr %0, i64 2048 + %9 = getelementptr inbounds nuw i8, ptr %3, i64 4 + %10 = getelementptr inbounds nuw i8, ptr %0, i64 3072 + %11 = getelementptr inbounds nuw i8, ptr %0, i64 2048 br label %.preheader .preheader: ; preds = %.preheader.lr.ph, %._crit_edge26 @@ -108,7 +108,7 @@ define void @_ZN7RSCoder6pnInitEv(ptr nocapture noundef nonnull align 4 derefere br i1 %13, label %.lr.ph.i.preheader, label %._crit_edge23 ._crit_edge23: ; preds = %.preheader - %14 = getelementptr inbounds [512 x i32], ptr %0, i64 0, i64 %indvars.iv + %14 = getelementptr inbounds nuw [512 x i32], ptr %0, i64 0, i64 %indvars.iv %15 = load i32, ptr %14, align 4 store i32 %15, ptr %3, align 16 store i32 1, ptr %9, align 4 @@ -118,7 +118,7 @@ define void @_ZN7RSCoder6pnInitEv(ptr nocapture noundef nonnull align 4 derefere %16 = zext nneg i32 %12 to i64 %17 = shl nuw nsw i64 %16, 2 call void @llvm.memset.p0.i64(ptr nonnull align 16 %3, i8 0, i64 %17, i1 false) - %18 = getelementptr inbounds [512 x i32], ptr %0, i64 0, i64 %indvars.iv + %18 = getelementptr inbounds nuw [512 x i32], ptr %0, i64 0, i64 %indvars.iv %19 = load i32, ptr %18, align 4 store i32 %19, ptr %3, align 16 store i32 1, ptr %9, align 4 @@ -130,7 +130,7 @@ define void @_ZN7RSCoder6pnInitEv(ptr nocapture noundef nonnull align 4 derefere .lr.ph.i: ; preds = %.lr.ph.i.preheader, %.lr.ph.i %indvars.iv.i = phi i64 [ %indvars.iv.next.i, %.lr.ph.i ], [ 0, %.lr.ph.i.preheader ] - %21 = getelementptr inbounds i32, ptr %10, i64 %indvars.iv.i + %21 = getelementptr inbounds nuw i32, ptr %10, i64 %indvars.iv.i store i32 0, ptr %21, align 4 %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 %22 = load i32, ptr %4, align 4 @@ -141,7 +141,7 @@ define void @_ZN7RSCoder6pnInitEv(ptr nocapture noundef nonnull align 4 derefere .lr.ph26.i: ; preds = %.preheader20.i, %.loopexit.i %25 = phi i32 [ %52, %.loopexit.i ], [ %22, %.preheader20.i ] %indvars.iv31.i = phi i64 [ %indvars.iv.next32.i, %.loopexit.i ], [ 0, %.preheader20.i ] - %26 = getelementptr inbounds i32, ptr %3, i64 %indvars.iv31.i + %26 = getelementptr inbounds nuw i32, ptr %3, i64 %indvars.iv31.i %27 = load i32, ptr %26, align 4 %.not.i = icmp ne i32 %27, 0 %28 = sext i32 %25 to i64 @@ -150,7 +150,7 @@ define void @_ZN7RSCoder6pnInitEv(ptr nocapture noundef nonnull align 4 derefere br i1 %or.cond.i, label %.lr.ph23.preheader.i, label %.loopexit.i .lr.ph23.preheader.i: ; preds = %.lr.ph26.i - %invariant.gep.i = getelementptr inbounds i32, ptr %10, i64 %indvars.iv31.i + %invariant.gep.i = getelementptr inbounds nuw i32, ptr %10, i64 %indvars.iv31.i %30 = trunc nuw nsw i64 %indvars.iv31.i to i32 %31 = sext i32 %27 to i64 %32 = getelementptr inbounds [256 x i32], ptr %11, i64 0, i64 %31 @@ -158,7 +158,7 @@ define void @_ZN7RSCoder6pnInitEv(ptr nocapture noundef nonnull align 4 derefere .lr.ph23.i: ; preds = %_ZN7RSCoder6gfMultEii.exit.i, %.lr.ph23.preheader.i %indvars.iv28.i = phi i64 [ 0, %.lr.ph23.preheader.i ], [ %indvars.iv.next29.i, %_ZN7RSCoder6gfMultEii.exit.i ] - %33 = getelementptr inbounds i32, ptr %2, i64 %indvars.iv28.i + %33 = getelementptr inbounds nuw i32, ptr %2, i64 %indvars.iv28.i %34 = load i32, ptr %33, align 4 %35 = icmp eq i32 %34, 0 br i1 %35, label %_ZN7RSCoder6gfMultEii.exit.i, label %36 @@ -176,7 +176,7 @@ define void @_ZN7RSCoder6pnInitEv(ptr nocapture noundef nonnull align 4 derefere _ZN7RSCoder6gfMultEii.exit.i: ; preds = %36, %.lr.ph23.i %45 = phi i32 [ %44, %36 ], [ 0, %.lr.ph23.i ] - %gep.i = getelementptr inbounds i32, ptr %invariant.gep.i, i64 %indvars.iv28.i + %gep.i = getelementptr inbounds nuw i32, ptr %invariant.gep.i, i64 %indvars.iv28.i %46 = load i32, ptr %gep.i, align 4 %47 = xor i32 %46, %45 store i32 %47, ptr %gep.i, align 4 @@ -221,7 +221,7 @@ _ZN7RSCoder6pnMultEPiS0_S0_.exit: ; preds = %.loopexit.i ; Function Attrs: mustprogress nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable define void @_ZN7RSCoder6pnMultEPiS0_S0_(ptr nocapture noundef nonnull readonly align 4 dereferenceable(11273) %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, ptr nocapture noundef %3) local_unnamed_addr #0 align 2 { - %5 = getelementptr inbounds i8, ptr %0, i64 9220 + %5 = getelementptr inbounds nuw i8, ptr %0, i64 9220 %6 = load i32, ptr %5, align 4 %7 = icmp sgt i32 %6, 0 br i1 %7, label %.lr.ph, label %._crit_edge @@ -231,12 +231,12 @@ define void @_ZN7RSCoder6pnMultEPiS0_S0_(ptr nocapture noundef nonnull readonly br i1 %8, label %.lr.ph26, label %._crit_edge .lr.ph26: ; preds = %.preheader20 - %9 = getelementptr inbounds i8, ptr %0, i64 2048 + %9 = getelementptr inbounds nuw i8, ptr %0, i64 2048 br label %14 .lr.ph: ; preds = %4, %.lr.ph %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %4 ] - %10 = getelementptr inbounds i32, ptr %3, i64 %indvars.iv + %10 = getelementptr inbounds nuw i32, ptr %3, i64 %indvars.iv store i32 0, ptr %10, align 4 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %11 = load i32, ptr %5, align 4 @@ -247,7 +247,7 @@ define void @_ZN7RSCoder6pnMultEPiS0_S0_(ptr nocapture noundef nonnull readonly 14: ; preds = %.lr.ph26, %.loopexit %15 = phi i32 [ %11, %.lr.ph26 ], [ %44, %.loopexit ] %indvars.iv31 = phi i64 [ 0, %.lr.ph26 ], [ %indvars.iv.next32, %.loopexit ] - %16 = getelementptr inbounds i32, ptr %1, i64 %indvars.iv31 + %16 = getelementptr inbounds nuw i32, ptr %1, i64 %indvars.iv31 %17 = load i32, ptr %16, align 4 %.not = icmp ne i32 %17, 0 %18 = sext i32 %15 to i64 @@ -256,14 +256,14 @@ define void @_ZN7RSCoder6pnMultEPiS0_S0_(ptr nocapture noundef nonnull readonly br i1 %or.cond, label %.lr.ph23.preheader, label %.loopexit .lr.ph23.preheader: ; preds = %14 - %invariant.gep = getelementptr inbounds i32, ptr %3, i64 %indvars.iv31 + %invariant.gep = getelementptr inbounds nuw i32, ptr %3, i64 %indvars.iv31 %20 = trunc nuw nsw i64 %indvars.iv31 to i32 br label %.lr.ph23 .lr.ph23: ; preds = %.lr.ph23.preheader, %_ZN7RSCoder6gfMultEii.exit %indvars.iv28 = phi i64 [ 0, %.lr.ph23.preheader ], [ %indvars.iv.next29, %_ZN7RSCoder6gfMultEii.exit ] %21 = load i32, ptr %16, align 4 - %22 = getelementptr inbounds i32, ptr %2, i64 %indvars.iv28 + %22 = getelementptr inbounds nuw i32, ptr %2, i64 %indvars.iv28 %23 = load i32, ptr %22, align 4 %24 = icmp eq i32 %21, 0 %25 = icmp eq i32 %23, 0 @@ -285,7 +285,7 @@ define void @_ZN7RSCoder6pnMultEPiS0_S0_(ptr nocapture noundef nonnull readonly _ZN7RSCoder6gfMultEii.exit: ; preds = %.lr.ph23, %26 %37 = phi i32 [ %36, %26 ], [ 0, %.lr.ph23 ] - %gep = getelementptr inbounds i32, ptr %invariant.gep, i64 %indvars.iv28 + %gep = getelementptr inbounds nuw i32, ptr %invariant.gep, i64 %indvars.iv28 %38 = load i32, ptr %gep, align 4 %39 = xor i32 %38, %37 store i32 %39, ptr %gep, align 4 @@ -310,7 +310,7 @@ _ZN7RSCoder6gfMultEii.exit: ; preds = %.lr.ph23, %26 ; Function Attrs: mustprogress nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable define void @_ZN7RSCoder6EncodeEPhiS0_(ptr nocapture noundef nonnull readonly align 4 dereferenceable(11273) %0, ptr nocapture noundef readonly %1, i32 noundef %2, ptr nocapture noundef writeonly %3) local_unnamed_addr #0 align 2 { %5 = alloca [256 x i32], align 16 - %6 = getelementptr inbounds i8, ptr %0, i64 9220 + %6 = getelementptr inbounds nuw i8, ptr %0, i64 9220 %7 = load i32, ptr %6, align 4 %.not28 = icmp slt i32 %7, 0 br i1 %.not28, label %.preheader26, label %.lr.ph.preheader @@ -331,8 +331,8 @@ define void @_ZN7RSCoder6EncodeEPhiS0_(ptr nocapture noundef nonnull readonly al %13 = sext i32 %12 to i64 %14 = getelementptr inbounds [256 x i32], ptr %5, i64 0, i64 %13 %15 = icmp sgt i32 %7, 1 - %16 = getelementptr inbounds i8, ptr %0, i64 3072 - %17 = getelementptr inbounds i8, ptr %0, i64 2048 + %16 = getelementptr inbounds nuw i8, ptr %0, i64 3072 + %17 = getelementptr inbounds nuw i8, ptr %0, i64 2048 %18 = load i32, ptr %16, align 4 %.fr43 = freeze i32 %18 %19 = icmp eq i32 %.fr43, 0 @@ -347,7 +347,7 @@ define void @_ZN7RSCoder6EncodeEPhiS0_(ptr nocapture noundef nonnull readonly al .lr.ph31.us: ; preds = %.lr.ph31.us.preheader, %_ZN7RSCoder6gfMultEii.exit25.us %indvars.iv55 = phi i64 [ 0, %.lr.ph31.us.preheader ], [ %indvars.iv.next56, %_ZN7RSCoder6gfMultEii.exit25.us ] - %23 = getelementptr inbounds i8, ptr %1, i64 %indvars.iv55 + %23 = getelementptr inbounds nuw i8, ptr %1, i64 %indvars.iv55 %24 = load i8, ptr %23, align 1 %25 = zext i8 %24 to i32 %26 = load i32, ptr %14, align 4 @@ -377,9 +377,9 @@ _ZN7RSCoder6gfMultEii.exit25.us: ; preds = %31, %._crit_edge.us .lr.ph31.split.us37: ; preds = %.lr.ph31.us, %_ZN7RSCoder6gfMultEii.exit.us35 %indvars.iv49 = phi i64 [ %indvars.iv.next50, %_ZN7RSCoder6gfMultEii.exit.us35 ], [ %22, %.lr.ph31.us ] %indvars.iv.next50 = add nsw i64 %indvars.iv49, -1 - %39 = getelementptr inbounds [256 x i32], ptr %5, i64 0, i64 %indvars.iv.next50 + %39 = getelementptr inbounds nuw [256 x i32], ptr %5, i64 0, i64 %indvars.iv.next50 %40 = load i32, ptr %39, align 4 - %41 = getelementptr inbounds [1024 x i32], ptr %16, i64 0, i64 %indvars.iv49 + %41 = getelementptr inbounds nuw [1024 x i32], ptr %16, i64 0, i64 %indvars.iv49 %42 = load i32, ptr %41, align 4 %43 = icmp eq i32 %42, 0 br i1 %43, label %_ZN7RSCoder6gfMultEii.exit.us35, label %44 @@ -398,7 +398,7 @@ _ZN7RSCoder6gfMultEii.exit25.us: ; preds = %31, %._crit_edge.us _ZN7RSCoder6gfMultEii.exit.us35: ; preds = %44, %.lr.ph31.split.us37 %53 = phi i32 [ %52, %44 ], [ 0, %.lr.ph31.split.us37 ] %54 = xor i32 %53, %40 - %55 = getelementptr inbounds [256 x i32], ptr %5, i64 0, i64 %indvars.iv49 + %55 = getelementptr inbounds nuw [256 x i32], ptr %5, i64 0, i64 %indvars.iv49 store i32 %54, ptr %55, align 4 %56 = icmp sgt i64 %indvars.iv49, 1 br i1 %56, label %.lr.ph31.split.us37, label %._crit_edge.us, !llvm.loop !12 @@ -410,9 +410,9 @@ _ZN7RSCoder6gfMultEii.exit.us35: ; preds = %44, %.lr.ph31.split _ZN7RSCoder6gfMultEii.exit.us.us: ; preds = %.lr.ph31.us, %_ZN7RSCoder6gfMultEii.exit.us.us %indvars.iv52 = phi i64 [ %indvars.iv.next53, %_ZN7RSCoder6gfMultEii.exit.us.us ], [ %22, %.lr.ph31.us ] %indvars.iv.next53 = add nsw i64 %indvars.iv52, -1 - %57 = getelementptr inbounds [256 x i32], ptr %5, i64 0, i64 %indvars.iv.next53 + %57 = getelementptr inbounds nuw [256 x i32], ptr %5, i64 0, i64 %indvars.iv.next53 %58 = load i32, ptr %57, align 4 - %59 = getelementptr inbounds [256 x i32], ptr %5, i64 0, i64 %indvars.iv52 + %59 = getelementptr inbounds nuw [256 x i32], ptr %5, i64 0, i64 %indvars.iv52 store i32 %58, ptr %59, align 4 %60 = icmp sgt i64 %indvars.iv52, 1 br i1 %60, label %_ZN7RSCoder6gfMultEii.exit.us.us, label %._crit_edge.us, !llvm.loop !12 @@ -434,7 +434,7 @@ _ZN7RSCoder6gfMultEii.exit.us.us: ; preds = %.lr.ph31.us, %_ZN7R .lr.ph33.split.split: ; preds = %.lr.ph33.split.split.preheader, %_ZN7RSCoder6gfMultEii.exit25 %indvars.iv = phi i64 [ 0, %.lr.ph33.split.split.preheader ], [ %indvars.iv.next, %_ZN7RSCoder6gfMultEii.exit25 ] - %62 = getelementptr inbounds i8, ptr %1, i64 %indvars.iv + %62 = getelementptr inbounds nuw i8, ptr %1, i64 %indvars.iv %63 = load i8, ptr %62, align 1 %64 = zext i8 %63 to i32 %65 = load i32, ptr %14, align 4 @@ -470,7 +470,7 @@ _ZN7RSCoder6gfMultEii.exit25: ; preds = %.lr.ph33.split.spli %83 = getelementptr inbounds [256 x i32], ptr %5, i64 0, i64 %82 %84 = load i32, ptr %83, align 4 %85 = trunc i32 %84 to i8 - %86 = getelementptr inbounds i8, ptr %3, i64 %indvars.iv60 + %86 = getelementptr inbounds nuw i8, ptr %3, i64 %indvars.iv60 store i8 %85, ptr %86, align 1 %indvars.iv.next61 = add nuw nsw i64 %indvars.iv60, 1 %87 = load i32, ptr %6, align 4 @@ -486,14 +486,14 @@ _ZN7RSCoder6gfMultEii.exit25: ; preds = %.lr.ph33.split.spli define noundef zeroext i1 @_ZN7RSCoder6DecodeEPhiPii(ptr noundef nonnull align 4 dereferenceable(11273) %0, ptr nocapture noundef %1, i32 noundef %2, ptr nocapture noundef readonly %3, i32 noundef %4) local_unnamed_addr #0 align 2 { %6 = alloca [512 x i32], align 16 %7 = alloca [512 x i32], align 16 - %8 = getelementptr inbounds i8, ptr %0, i64 9220 + %8 = getelementptr inbounds nuw i8, ptr %0, i64 9220 %9 = load i32, ptr %8, align 4 %10 = icmp sgt i32 %9, 0 br i1 %10, label %.preheader96.lr.ph, label %._crit_edge105.thread .preheader96.lr.ph: ; preds = %5 %11 = icmp sgt i32 %2, 0 - %12 = getelementptr inbounds i8, ptr %0, i64 2048 + %12 = getelementptr inbounds nuw i8, ptr %0, i64 2048 br i1 %11, label %.preheader96.us.preheader, label %._crit_edge105.thread .preheader96.us.preheader: ; preds = %.preheader96.lr.ph @@ -508,7 +508,7 @@ define noundef zeroext i1 @_ZN7RSCoder6DecodeEPhiPii(ptr noundef nonnull align 4 %indvars.iv159 = phi i64 [ 0, %.preheader96.us.preheader ], [ %indvars.iv.next160, %._crit_edge.us ] %.064104.us = phi i1 [ true, %.preheader96.us.preheader ], [ %spec.select.us, %._crit_edge.us ] %indvars.iv.next160 = add nuw nsw i64 %indvars.iv159, 1 - %16 = getelementptr inbounds [512 x i32], ptr %0, i64 0, i64 %indvars.iv.next160 + %16 = getelementptr inbounds nuw [512 x i32], ptr %0, i64 0, i64 %indvars.iv.next160 %17 = load i32, ptr %16, align 4 %.fr = freeze i32 %17 %18 = icmp eq i32 %.fr, 0 @@ -524,7 +524,7 @@ _ZN7RSCoder6gfMultEii.exit.us.us.preheader: ; preds = %.preheader96.us .lr.ph.split.us111: ; preds = %.preheader96.us, %_ZN7RSCoder6gfMultEii.exit.us109 %indvars.iv = phi i64 [ %indvars.iv.next, %_ZN7RSCoder6gfMultEii.exit.us109 ], [ 0, %.preheader96.us ] %.07199.us = phi i32 [ %37, %_ZN7RSCoder6gfMultEii.exit.us109 ], [ 0, %.preheader96.us ] - %23 = getelementptr inbounds i8, ptr %1, i64 %indvars.iv + %23 = getelementptr inbounds nuw i8, ptr %1, i64 %indvars.iv %24 = load i8, ptr %23, align 1 %25 = zext i8 %24 to i32 %26 = icmp eq i32 %.07199.us, 0 @@ -550,7 +550,7 @@ _ZN7RSCoder6gfMultEii.exit.us109: ; preds = %27, %.lr.ph.split.u ._crit_edge.us: ; preds = %_ZN7RSCoder6gfMultEii.exit.us109, %_ZN7RSCoder6gfMultEii.exit.us.us.preheader %.us-phi.us = phi i32 [ %22, %_ZN7RSCoder6gfMultEii.exit.us.us.preheader ], [ %37, %_ZN7RSCoder6gfMultEii.exit.us109 ] - %38 = getelementptr inbounds [512 x i32], ptr %6, i64 0, i64 %indvars.iv159 + %38 = getelementptr inbounds nuw [512 x i32], ptr %6, i64 0, i64 %indvars.iv159 store i32 %.us-phi.us, ptr %38, align 4 %.not81.us = icmp eq i32 %.us-phi.us, 0 %spec.select.us = select i1 %.not81.us, i1 %.064104.us, i1 false @@ -561,32 +561,32 @@ _ZN7RSCoder6gfMultEii.exit.us109: ; preds = %27, %.lr.ph.split.u br i1 %spec.select.us, label %._crit_edge105.thread, label %39 39: ; preds = %._crit_edge105 - %40 = getelementptr inbounds i8, ptr %0, i64 11272 + %40 = getelementptr inbounds nuw i8, ptr %0, i64 11272 %41 = load i8, ptr %40, align 4 %42 = trunc i8 %41 to i1 br i1 %42, label %.loopexit95, label %.lr.ph .lr.ph: ; preds = %39 store i8 1, ptr %40, align 4 - %43 = getelementptr inbounds i8, ptr %0, i64 9224 + %43 = getelementptr inbounds nuw i8, ptr %0, i64 9224 %44 = add nuw i32 %9, 1 %45 = zext i32 %44 to i64 %46 = shl nuw nsw i64 %45, 2 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %43, i8 0, i64 %46, i1 false) - %47 = getelementptr inbounds i8, ptr %0, i64 9224 + %47 = getelementptr inbounds nuw i8, ptr %0, i64 9224 store i32 1, ptr %47, align 4 %48 = icmp sgt i32 %4, 0 br i1 %48, label %.lr.ph122, label %._crit_edge123 .lr.ph122: ; preds = %.lr.ph - %49 = getelementptr inbounds i8, ptr %0, i64 2048 + %49 = getelementptr inbounds nuw i8, ptr %0, i64 2048 %50 = zext nneg i32 %9 to i64 %wide.trip.count172 = zext nneg i32 %4 to i64 br label %.lr.ph118.us .lr.ph118.us: ; preds = %.lr.ph122, %._crit_edge119.us %indvars.iv169 = phi i64 [ 0, %.lr.ph122 ], [ %indvars.iv.next170, %._crit_edge119.us ] - %51 = getelementptr inbounds i32, ptr %3, i64 %indvars.iv169 + %51 = getelementptr inbounds nuw i32, ptr %3, i64 %indvars.iv169 %52 = load i32, ptr %51, align 4 %53 = xor i32 %52, -1 %54 = add i32 %2, %53 @@ -602,7 +602,7 @@ _ZN7RSCoder6gfMultEii.exit.us109: ; preds = %27, %.lr.ph.split.u .lr.ph118.split.us128: ; preds = %.lr.ph118.us, %_ZN7RSCoder6gfMultEii.exit84.us125 %indvars.iv166 = phi i64 [ %indvars.iv.next167, %_ZN7RSCoder6gfMultEii.exit84.us125 ], [ %50, %.lr.ph118.us ] %indvars.iv.next167 = add nsw i64 %indvars.iv166, -1 - %61 = getelementptr inbounds [512 x i32], ptr %47, i64 0, i64 %indvars.iv.next167 + %61 = getelementptr inbounds nuw [512 x i32], ptr %47, i64 0, i64 %indvars.iv.next167 %62 = load i32, ptr %61, align 4 %63 = icmp eq i32 %62, 0 br i1 %63, label %_ZN7RSCoder6gfMultEii.exit84.us125, label %64 @@ -620,7 +620,7 @@ _ZN7RSCoder6gfMultEii.exit.us109: ; preds = %27, %.lr.ph.split.u _ZN7RSCoder6gfMultEii.exit84.us125: ; preds = %64, %.lr.ph118.split.us128 %73 = phi i32 [ %72, %64 ], [ 0, %.lr.ph118.split.us128 ] - %74 = getelementptr inbounds [512 x i32], ptr %47, i64 0, i64 %indvars.iv166 + %74 = getelementptr inbounds nuw [512 x i32], ptr %47, i64 0, i64 %indvars.iv166 %75 = load i32, ptr %74, align 4 %76 = xor i32 %75, %73 store i32 %76, ptr %74, align 4 @@ -630,26 +630,21 @@ _ZN7RSCoder6gfMultEii.exit84.us125: ; preds = %64, %.lr.ph118.spli ._crit_edge119.us: ; preds = %_ZN7RSCoder6gfMultEii.exit84.us125, %.lr.ph118.us %indvars.iv.next170 = add nuw nsw i64 %indvars.iv169, 1 %exitcond173.not = icmp eq i64 %indvars.iv.next170, %wide.trip.count172 - br i1 %exitcond173.not, label %._crit_edge123.loopexit, label %.lr.ph118.us, !llvm.loop !17 + br i1 %exitcond173.not, label %._crit_edge123, label %.lr.ph118.us, !llvm.loop !17 -._crit_edge123.loopexit: ; preds = %._crit_edge119.us - %.pre199.pre = load i32, ptr %8, align 4 - br label %._crit_edge123 - -._crit_edge123: ; preds = %._crit_edge123.loopexit, %.lr.ph - %.pre199 = phi i32 [ %.pre199.pre, %._crit_edge123.loopexit ], [ %9, %.lr.ph ] - %78 = getelementptr inbounds i8, ptr %0, i64 8192 +._crit_edge123: ; preds = %._crit_edge119.us, %.lr.ph + %78 = getelementptr inbounds nuw i8, ptr %0, i64 8192 store i32 0, ptr %78, align 4 %79 = sub nsw i32 255, %2 - %80 = getelementptr inbounds i8, ptr %0, i64 2048 - %81 = getelementptr inbounds i8, ptr %0, i64 7168 - %82 = getelementptr inbounds i8, ptr %0, i64 8196 + %80 = getelementptr inbounds nuw i8, ptr %0, i64 2048 + %81 = getelementptr inbounds nuw i8, ptr %0, i64 7168 + %82 = getelementptr inbounds nuw i8, ptr %0, i64 8196 %83 = zext i32 %79 to i64 br label %.preheader94 .preheader94: ; preds = %._crit_edge123, %152 %84 = phi i32 [ 0, %._crit_edge123 ], [ %153, %152 ] - %85 = phi i32 [ %.pre199, %._crit_edge123 ], [ %154, %152 ] + %85 = phi i32 [ %9, %._crit_edge123 ], [ %154, %152 ] %indvars.iv182 = phi i64 [ %83, %._crit_edge123 ], [ %indvars.iv.next183, %152 ] %.not78129 = icmp slt i32 %85, 0 br i1 %.not78129, label %._crit_edge133.thread, label %.lr.ph132.preheader @@ -668,7 +663,7 @@ _ZN7RSCoder6gfMultEii.exit84.us125: ; preds = %64, %.lr.ph118.spli %90 = sext i32 %89 to i64 %91 = getelementptr inbounds [512 x i32], ptr %0, i64 0, i64 %90 %92 = load i32, ptr %91, align 4 - %93 = getelementptr inbounds [512 x i32], ptr %47, i64 0, i64 %indvars.iv174 + %93 = getelementptr inbounds nuw [512 x i32], ptr %47, i64 0, i64 %indvars.iv174 %94 = load i32, ptr %93, align 4 %95 = icmp eq i32 %92, 0 %96 = icmp eq i32 %94, 0 @@ -715,7 +710,7 @@ _ZN7RSCoder6gfMultEii.exit86: ; preds = %.lr.ph132, %97 .lr.ph137: ; preds = %._crit_edge133.thread, %_ZN7RSCoder6gfMultEii.exit88 %indvars.iv179 = phi i64 [ %indvars.iv.next180, %_ZN7RSCoder6gfMultEii.exit88 ], [ 1, %._crit_edge133.thread ] - %119 = getelementptr inbounds [512 x i32], ptr %47, i64 0, i64 %indvars.iv179 + %119 = getelementptr inbounds nuw [512 x i32], ptr %47, i64 0, i64 %indvars.iv179 %120 = load i32, ptr %119, align 4 %121 = add nuw nsw i64 %indvars.iv179, 4294967295 %122 = mul i64 %121, %indvars.iv182 @@ -773,7 +768,7 @@ _ZN7RSCoder6gfMultEii.exit88: ; preds = %.lr.ph137, %130 .loopexit95: ; preds = %152, %39 %156 = phi i32 [ %9, %39 ], [ %154, %152 ] - %157 = getelementptr inbounds i8, ptr %0, i64 9224 + %157 = getelementptr inbounds nuw i8, ptr %0, i64 9224 %158 = icmp sgt i32 %156, 0 br i1 %158, label %.lr.ph.i.preheader, label %_ZN7RSCoder6pnMultEPiS0_S0_.exit @@ -781,7 +776,7 @@ _ZN7RSCoder6gfMultEii.exit88: ; preds = %.lr.ph137, %130 %159 = zext nneg i32 %156 to i64 %160 = shl nuw nsw i64 %159, 2 call void @llvm.memset.p0.i64(ptr nonnull align 16 %7, i8 0, i64 %160, i1 false) - %161 = getelementptr inbounds i8, ptr %0, i64 2048 + %161 = getelementptr inbounds nuw i8, ptr %0, i64 2048 %162 = zext nneg i32 %156 to i64 br label %163 @@ -791,20 +786,20 @@ _ZN7RSCoder6gfMultEii.exit88: ; preds = %.lr.ph137, %130 %164 = ashr exact i64 %sext, 32 %165 = sub nsw i64 %162, %164 %smax = tail call i64 @llvm.smax.i64(i64 %165, i64 1) - %166 = getelementptr inbounds i32, ptr %157, i64 %indvars.iv31.i + %166 = getelementptr inbounds nuw i32, ptr %157, i64 %indvars.iv31.i %167 = load i32, ptr %166, align 4 %.not.i.not = icmp eq i32 %167, 0 br i1 %.not.i.not, label %.loopexit.i, label %.lr.ph23.preheader.i .lr.ph23.preheader.i: ; preds = %163 - %invariant.gep.i = getelementptr inbounds i32, ptr %7, i64 %indvars.iv31.i + %invariant.gep.i = getelementptr inbounds nuw i32, ptr %7, i64 %indvars.iv31.i %168 = sext i32 %167 to i64 %169 = getelementptr inbounds [256 x i32], ptr %161, i64 0, i64 %168 br label %.lr.ph23.i .lr.ph23.i: ; preds = %_ZN7RSCoder6gfMultEii.exit.i, %.lr.ph23.preheader.i %indvars.iv28.i = phi i64 [ 0, %.lr.ph23.preheader.i ], [ %indvars.iv.next29.i, %_ZN7RSCoder6gfMultEii.exit.i ] - %170 = getelementptr inbounds i32, ptr %6, i64 %indvars.iv28.i + %170 = getelementptr inbounds nuw i32, ptr %6, i64 %indvars.iv28.i %171 = load i32, ptr %170, align 4 %172 = icmp eq i32 %171, 0 br i1 %172, label %_ZN7RSCoder6gfMultEii.exit.i, label %173 @@ -822,7 +817,7 @@ _ZN7RSCoder6gfMultEii.exit88: ; preds = %.lr.ph137, %130 _ZN7RSCoder6gfMultEii.exit.i: ; preds = %173, %.lr.ph23.i %182 = phi i32 [ %181, %173 ], [ 0, %.lr.ph23.i ] - %gep.i = getelementptr inbounds i32, ptr %invariant.gep.i, i64 %indvars.iv28.i + %gep.i = getelementptr inbounds nuw i32, ptr %invariant.gep.i, i64 %indvars.iv28.i %183 = load i32, ptr %gep.i, align 4 %184 = xor i32 %183, %182 store i32 %184, ptr %gep.i, align 4 @@ -836,7 +831,7 @@ _ZN7RSCoder6gfMultEii.exit.i: ; preds = %173, %.lr.ph23.i br i1 %exitcond190.not, label %_ZN7RSCoder6pnMultEPiS0_S0_.exit, label %163, !llvm.loop !9 _ZN7RSCoder6pnMultEPiS0_S0_.exit: ; preds = %.loopexit.i, %.loopexit95 - %185 = getelementptr inbounds i8, ptr %0, i64 8192 + %185 = getelementptr inbounds nuw i8, ptr %0, i64 8192 %186 = load i32, ptr %185, align 4 %.not80 = icmp sle i32 %186, %156 %187 = icmp sgt i32 %186, 0 @@ -844,15 +839,15 @@ _ZN7RSCoder6pnMultEPiS0_S0_.exit: ; preds = %.loopexit.i, %.loop br i1 %or.cond, label %.lr.ph148, label %.loopexit .lr.ph148: ; preds = %_ZN7RSCoder6pnMultEPiS0_S0_.exit - %188 = getelementptr inbounds i8, ptr %0, i64 7168 - %189 = getelementptr inbounds i8, ptr %0, i64 2048 - %190 = getelementptr inbounds i8, ptr %0, i64 8196 + %188 = getelementptr inbounds nuw i8, ptr %0, i64 7168 + %189 = getelementptr inbounds nuw i8, ptr %0, i64 2048 + %190 = getelementptr inbounds nuw i8, ptr %0, i64 8196 br label %191 191: ; preds = %.lr.ph148, %252 %192 = phi i32 [ %186, %.lr.ph148 ], [ %253, %252 ] %indvars.iv196 = phi i64 [ 0, %.lr.ph148 ], [ %indvars.iv.next197, %252 ] - %193 = getelementptr inbounds [256 x i32], ptr %188, i64 0, i64 %indvars.iv196 + %193 = getelementptr inbounds nuw [256 x i32], ptr %188, i64 0, i64 %indvars.iv196 %194 = load i32, ptr %193, align 4 %195 = sub nsw i32 255, %194 %196 = load i32, ptr %8, align 4 @@ -866,7 +861,7 @@ _ZN7RSCoder6pnMultEPiS0_S0_.exit: ; preds = %.loopexit.i, %.loop .lr.ph144: ; preds = %.lr.ph144.preheader, %_ZN7RSCoder6gfMultEii.exit91 %indvars.iv191 = phi i64 [ 0, %.lr.ph144.preheader ], [ %indvars.iv.next192, %_ZN7RSCoder6gfMultEii.exit91 ] %.063141 = phi i32 [ 0, %.lr.ph144.preheader ], [ %220, %_ZN7RSCoder6gfMultEii.exit91 ] - %198 = getelementptr inbounds [512 x i32], ptr %7, i64 0, i64 %indvars.iv191 + %198 = getelementptr inbounds nuw [512 x i32], ptr %7, i64 0, i64 %indvars.iv191 %199 = load i32, ptr %198, align 4 %200 = trunc nuw nsw i64 %indvars.iv191 to i32 %201 = mul nsw i32 %195, %200 @@ -907,7 +902,7 @@ _ZN7RSCoder6gfMultEii.exit91: ; preds = %.lr.ph144, %208 br i1 %or.cond82, label %223, label %252 223: ; preds = %._crit_edge145 - %224 = getelementptr inbounds [256 x i32], ptr %190, i64 0, i64 %indvars.iv196 + %224 = getelementptr inbounds nuw [256 x i32], ptr %190, i64 0, i64 %indvars.iv196 %225 = load i32, ptr %224, align 4 %226 = sext i32 %225 to i64 %227 = getelementptr inbounds [256 x i32], ptr %189, i64 0, i64 %226 @@ -938,7 +933,7 @@ _ZN7RSCoder6gfMultEii.exit91: ; preds = %.lr.ph144, %208 _ZN7RSCoder6gfMultEii.exit93: ; preds = %223, %235 %247 = phi i8 [ %246, %235 ], [ 0, %223 ] %248 = zext nneg i32 %222 to i64 - %249 = getelementptr inbounds i8, ptr %1, i64 %248 + %249 = getelementptr inbounds nuw i8, ptr %1, i64 %248 %250 = load i8, ptr %249, align 1 %251 = xor i8 %250, %247 store i8 %251, ptr %249, align 1 @@ -953,11 +948,11 @@ _ZN7RSCoder6gfMultEii.exit93: ; preds = %223, %235 br i1 %255, label %191, label %.loopexit.loopexit, !llvm.loop !22 .loopexit.loopexit: ; preds = %252 - %.pre200 = load i32, ptr %8, align 4 + %.pre199 = load i32, ptr %8, align 4 br label %.loopexit .loopexit: ; preds = %.loopexit.loopexit, %_ZN7RSCoder6pnMultEPiS0_S0_.exit - %256 = phi i32 [ %.pre200, %.loopexit.loopexit ], [ %156, %_ZN7RSCoder6pnMultEPiS0_S0_.exit ] + %256 = phi i32 [ %.pre199, %.loopexit.loopexit ], [ %156, %_ZN7RSCoder6pnMultEPiS0_S0_.exit ] %257 = phi i32 [ %253, %.loopexit.loopexit ], [ %186, %_ZN7RSCoder6pnMultEPiS0_S0_.exit ] %258 = icmp sle i32 %257, %256 br label %._crit_edge105.thread diff --git a/bench/cmake/optimized/archive_write_add_filter_b64encode.c.ll b/bench/cmake/optimized/archive_write_add_filter_b64encode.c.ll index b28bbf6b2ac..63e4c5b2ad1 100644 --- a/bench/cmake/optimized/archive_write_add_filter_b64encode.c.ll +++ b/bench/cmake/optimized/archive_write_add_filter_b64encode.c.ll @@ -29,30 +29,30 @@ define dso_local range(i32 -30, 1) i32 @archive_write_add_filter_b64encode(ptr n br i1 %7, label %8, label %11 8: ; preds = %5 - %9 = getelementptr inbounds i8, ptr %2, i64 8 + %9 = getelementptr inbounds nuw i8, ptr %2, i64 8 %10 = load ptr, ptr %9, align 8 tail call void (ptr, i32, ptr, ...) @archive_set_error(ptr noundef %10, i32 noundef 12, ptr noundef nonnull @.str.1) #6 br label %22 11: ; preds = %5 - %12 = getelementptr inbounds i8, ptr %6, i64 8 + %12 = getelementptr inbounds nuw i8, ptr %6, i64 8 %13 = tail call ptr @archive_strncat(ptr noundef nonnull %12, ptr noundef nonnull @.str.2, i64 noundef 1) #6 store i32 420, ptr %6, align 8 - %14 = getelementptr inbounds i8, ptr %2, i64 72 + %14 = getelementptr inbounds nuw i8, ptr %2, i64 72 store ptr %6, ptr %14, align 8 - %15 = getelementptr inbounds i8, ptr %2, i64 80 + %15 = getelementptr inbounds nuw i8, ptr %2, i64 80 store ptr @.str.3, ptr %15, align 8 - %16 = getelementptr inbounds i8, ptr %2, i64 88 + %16 = getelementptr inbounds nuw i8, ptr %2, i64 88 store i32 7, ptr %16, align 8 - %17 = getelementptr inbounds i8, ptr %2, i64 32 + %17 = getelementptr inbounds nuw i8, ptr %2, i64 32 store ptr @archive_filter_b64encode_open, ptr %17, align 8 - %18 = getelementptr inbounds i8, ptr %2, i64 24 + %18 = getelementptr inbounds nuw i8, ptr %2, i64 24 store ptr @archive_filter_b64encode_options, ptr %18, align 8 - %19 = getelementptr inbounds i8, ptr %2, i64 40 + %19 = getelementptr inbounds nuw i8, ptr %2, i64 40 store ptr @archive_filter_b64encode_write, ptr %19, align 8 - %20 = getelementptr inbounds i8, ptr %2, i64 56 + %20 = getelementptr inbounds nuw i8, ptr %2, i64 56 store ptr @archive_filter_b64encode_close, ptr %20, align 8 - %21 = getelementptr inbounds i8, ptr %2, i64 64 + %21 = getelementptr inbounds nuw i8, ptr %2, i64 64 store ptr @archive_filter_b64encode_free, ptr %21, align 8 br label %22 @@ -74,9 +74,9 @@ declare ptr @archive_strncat(ptr noundef, ptr noundef, i64 noundef) local_unname ; Function Attrs: nounwind uwtable define internal range(i32 -30, 1) i32 @archive_filter_b64encode_open(ptr nocapture noundef %0) #0 { - %2 = getelementptr inbounds i8, ptr %0, i64 72 + %2 = getelementptr inbounds nuw i8, ptr %0, i64 72 %3 = load ptr, ptr %2, align 8 - %4 = getelementptr inbounds i8, ptr %0, i64 8 + %4 = getelementptr inbounds nuw i8, ptr %0, i64 8 %5 = load ptr, ptr %4, align 8 %6 = load i32, ptr %5, align 8 %7 = icmp eq i32 %6, -1329217314 @@ -99,9 +99,9 @@ define internal range(i32 -30, 1) i32 @archive_filter_b64encode_open(ptr nocaptu 16: ; preds = %8, %13, %12, %1 %.020 = phi i64 [ %15, %13 ], [ 65536, %12 ], [ 65536, %1 ], [ %10, %8 ] - %17 = getelementptr inbounds i8, ptr %3, i64 56 + %17 = getelementptr inbounds nuw i8, ptr %3, i64 56 store i64 %.020, ptr %17, align 8 - %18 = getelementptr inbounds i8, ptr %3, i64 32 + %18 = getelementptr inbounds nuw i8, ptr %3, i64 32 %19 = add nsw i64 %.020, 512 %20 = tail call ptr @archive_string_ensure(ptr noundef nonnull %18, i64 noundef %19) #6 %21 = icmp eq ptr %20, null @@ -114,7 +114,7 @@ define internal range(i32 -30, 1) i32 @archive_filter_b64encode_open(ptr nocaptu 24: ; preds = %16 %25 = load i32, ptr %3, align 8 - %26 = getelementptr inbounds i8, ptr %3, i64 8 + %26 = getelementptr inbounds nuw i8, ptr %3, i64 8 %27 = load ptr, ptr %26, align 8 tail call void (ptr, ptr, ...) @archive_string_sprintf(ptr noundef nonnull %18, ptr noundef nonnull @.str.9, i32 noundef %25, ptr noundef %27) #6 store ptr %3, ptr %2, align 8 @@ -127,7 +127,7 @@ define internal range(i32 -30, 1) i32 @archive_filter_b64encode_open(ptr nocaptu ; Function Attrs: nounwind uwtable define internal range(i32 -25, 1) i32 @archive_filter_b64encode_options(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, ptr noundef %2) #0 { - %4 = getelementptr inbounds i8, ptr %0, i64 72 + %4 = getelementptr inbounds nuw i8, ptr %0, i64 72 %5 = load ptr, ptr %4, align 8 %6 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(5) @.str.4) #8 %7 = icmp eq i32 %6, 0 @@ -138,7 +138,7 @@ define internal range(i32 -25, 1) i32 @archive_filter_b64encode_options(ptr noca br i1 %9, label %10, label %13 10: ; preds = %8 - %11 = getelementptr inbounds i8, ptr %0, i64 8 + %11 = getelementptr inbounds nuw i8, ptr %0, i64 8 %12 = load ptr, ptr %11, align 8 tail call void (ptr, i32, ptr, ...) @archive_set_error(ptr noundef %12, i32 noundef -1, ptr noundef nonnull @.str.5) #6 br label %37 @@ -187,14 +187,14 @@ atol8.exit: ; preds = %atol8.exit.loopexit br i1 %28, label %29, label %32 29: ; preds = %27 - %30 = getelementptr inbounds i8, ptr %0, i64 8 + %30 = getelementptr inbounds nuw i8, ptr %0, i64 8 %31 = load ptr, ptr %30, align 8 tail call void (ptr, i32, ptr, ...) @archive_set_error(ptr noundef %31, i32 noundef -1, ptr noundef nonnull @.str.7) #6 br label %37 32: ; preds = %27 - %33 = getelementptr inbounds i8, ptr %5, i64 8 - %34 = getelementptr inbounds i8, ptr %5, i64 16 + %33 = getelementptr inbounds nuw i8, ptr %5, i64 8 + %34 = getelementptr inbounds nuw i8, ptr %5, i64 16 store i64 0, ptr %34, align 8 %35 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %2) #8 %36 = tail call ptr @archive_strncat(ptr noundef nonnull %33, ptr noundef nonnull %2, i64 noundef %35) #6 @@ -207,13 +207,13 @@ atol8.exit: ; preds = %atol8.exit.loopexit ; Function Attrs: nounwind uwtable define internal i32 @archive_filter_b64encode_write(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, i64 noundef %2) #0 { - %4 = getelementptr inbounds i8, ptr %0, i64 72 + %4 = getelementptr inbounds nuw i8, ptr %0, i64 72 %5 = load ptr, ptr %4, align 8 %6 = icmp eq i64 %2, 0 br i1 %6, label %.loopexit, label %7 7: ; preds = %3 - %8 = getelementptr inbounds i8, ptr %5, i64 64 + %8 = getelementptr inbounds nuw i8, ptr %5, i64 64 %9 = load i64, ptr %8, align 8 %.not = icmp eq i64 %9, 0 br i1 %.not, label %24, label %.preheader @@ -223,22 +223,21 @@ define internal i32 @archive_filter_b64encode_write(ptr nocapture noundef readon br i1 %10, label %.lr.ph, label %._crit_edge.thread .lr.ph: ; preds = %.preheader - %11 = getelementptr inbounds i8, ptr %5, i64 72 + %11 = getelementptr inbounds nuw i8, ptr %5, i64 72 br label %12 12: ; preds = %.lr.ph, %12 %.151 = phi ptr [ %1, %.lr.ph ], [ %14, %12 ] %.14350 = phi i64 [ %2, %.lr.ph ], [ %18, %12 ] - %13 = phi i64 [ %9, %.lr.ph ], [ %.pr, %12 ] + %13 = phi i64 [ %9, %.lr.ph ], [ %16, %12 ] %14 = getelementptr inbounds i8, ptr %.151, i64 1 %15 = load i8, ptr %.151, align 1 %16 = add nuw nsw i64 %13, 1 store i64 %16, ptr %8, align 8 - %17 = getelementptr inbounds [57 x i8], ptr %11, i64 0, i64 %13 + %17 = getelementptr inbounds nuw [57 x i8], ptr %11, i64 0, i64 %13 store i8 %15, ptr %17, align 1 %18 = add i64 %.14350, -1 - %.pr = load i64, ptr %8, align 8 - %19 = icmp ult i64 %.pr, 57 + %19 = icmp ult i64 %13, 56 %20 = icmp ne i64 %18, 0 %21 = select i1 %19, i1 %20, i1 false br i1 %21, label %12, label %._crit_edge, !llvm.loop !7 @@ -249,8 +248,8 @@ define internal i32 @archive_filter_b64encode_write(ptr nocapture noundef readon ._crit_edge.thread: ; preds = %.preheader, %._crit_edge %.1.lcssa75 = phi ptr [ %14, %._crit_edge ], [ %1, %.preheader ] %.143.lcssa74 = phi i64 [ %18, %._crit_edge ], [ %2, %.preheader ] - %22 = getelementptr inbounds i8, ptr %5, i64 32 - %23 = getelementptr inbounds i8, ptr %5, i64 72 + %22 = getelementptr inbounds nuw i8, ptr %5, i64 32 + %23 = getelementptr inbounds nuw i8, ptr %5, i64 72 tail call fastcc void @la_b64_encode(ptr noundef nonnull %22, ptr noundef nonnull %23, i64 noundef 57) store i64 0, ptr %8, align 8 br label %24 @@ -262,7 +261,7 @@ define internal i32 @archive_filter_b64encode_write(ptr nocapture noundef readon br i1 %25, label %.lr.ph57, label %._crit_edge58 .lr.ph57: ; preds = %24 - %26 = getelementptr inbounds i8, ptr %5, i64 32 + %26 = getelementptr inbounds nuw i8, ptr %5, i64 32 br label %27 27: ; preds = %.lr.ph57, %27 @@ -281,22 +280,22 @@ define internal i32 @archive_filter_b64encode_write(ptr nocapture noundef readon br i1 %.not48, label %33, label %31 31: ; preds = %._crit_edge58 - %32 = getelementptr inbounds i8, ptr %5, i64 72 + %32 = getelementptr inbounds nuw i8, ptr %5, i64 72 tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 %32, ptr align 1 %.2.lcssa, i64 %.244.lcssa, i1 false) store i64 %.244.lcssa, ptr %8, align 8 br label %33 33: ; preds = %31, %._crit_edge58 - %34 = getelementptr inbounds i8, ptr %5, i64 40 - %35 = getelementptr inbounds i8, ptr %5, i64 56 + %34 = getelementptr inbounds nuw i8, ptr %5, i64 40 + %35 = getelementptr inbounds nuw i8, ptr %5, i64 56 %36 = load i64, ptr %34, align 8 %37 = load i64, ptr %35, align 8 %.not4961 = icmp ult i64 %36, %37 br i1 %.not4961, label %.loopexit, label %.lr.ph63 .lr.ph63: ; preds = %33 - %38 = getelementptr inbounds i8, ptr %5, i64 32 - %39 = getelementptr inbounds i8, ptr %0, i64 16 + %38 = getelementptr inbounds nuw i8, ptr %5, i64 32 + %39 = getelementptr inbounds nuw i8, ptr %0, i64 16 br label %40 40: ; preds = %.lr.ph63, %40 @@ -324,29 +323,29 @@ define internal i32 @archive_filter_b64encode_write(ptr nocapture noundef readon ; Function Attrs: nounwind uwtable define internal i32 @archive_filter_b64encode_close(ptr nocapture noundef readonly %0) #0 { - %2 = getelementptr inbounds i8, ptr %0, i64 72 + %2 = getelementptr inbounds nuw i8, ptr %0, i64 72 %3 = load ptr, ptr %2, align 8 - %4 = getelementptr inbounds i8, ptr %3, i64 64 + %4 = getelementptr inbounds nuw i8, ptr %3, i64 64 %5 = load i64, ptr %4, align 8 %.not = icmp eq i64 %5, 0 br i1 %.not, label %9, label %6 6: ; preds = %1 - %7 = getelementptr inbounds i8, ptr %3, i64 32 - %8 = getelementptr inbounds i8, ptr %3, i64 72 + %7 = getelementptr inbounds nuw i8, ptr %3, i64 32 + %8 = getelementptr inbounds nuw i8, ptr %3, i64 72 tail call fastcc void @la_b64_encode(ptr noundef nonnull %7, ptr noundef nonnull %8, i64 noundef %5) br label %9 9: ; preds = %6, %1 - %10 = getelementptr inbounds i8, ptr %3, i64 32 + %10 = getelementptr inbounds nuw i8, ptr %3, i64 32 tail call void (ptr, ptr, ...) @archive_string_sprintf(ptr noundef nonnull %10, ptr noundef nonnull @.str.10) #6 - %11 = getelementptr inbounds i8, ptr %0, i64 8 + %11 = getelementptr inbounds nuw i8, ptr %0, i64 8 %12 = load ptr, ptr %11, align 8 %13 = tail call i32 @archive_write_set_bytes_in_last_block(ptr noundef %12, i32 noundef 1) #6 - %14 = getelementptr inbounds i8, ptr %0, i64 16 + %14 = getelementptr inbounds nuw i8, ptr %0, i64 16 %15 = load ptr, ptr %14, align 8 %16 = load ptr, ptr %10, align 8 - %17 = getelementptr inbounds i8, ptr %3, i64 40 + %17 = getelementptr inbounds nuw i8, ptr %3, i64 40 %18 = load i64, ptr %17, align 8 %19 = tail call i32 @__archive_write_filter(ptr noundef %15, ptr noundef %16, i64 noundef %18) #6 ret i32 %19 @@ -354,11 +353,11 @@ define internal i32 @archive_filter_b64encode_close(ptr nocapture noundef readon ; Function Attrs: nounwind uwtable define internal noundef i32 @archive_filter_b64encode_free(ptr nocapture noundef readonly %0) #0 { - %2 = getelementptr inbounds i8, ptr %0, i64 72 + %2 = getelementptr inbounds nuw i8, ptr %0, i64 72 %3 = load ptr, ptr %2, align 8 - %4 = getelementptr inbounds i8, ptr %3, i64 8 + %4 = getelementptr inbounds nuw i8, ptr %3, i64 8 tail call void @archive_string_free(ptr noundef nonnull %4) #6 - %5 = getelementptr inbounds i8, ptr %3, i64 32 + %5 = getelementptr inbounds nuw i8, ptr %3, i64 32 tail call void @archive_string_free(ptr noundef nonnull %5) #6 tail call void @free(ptr noundef %3) #6 ret i32 0 @@ -387,7 +386,7 @@ define internal fastcc void @la_b64_encode(ptr noundef %0, ptr nocapture noundef %5 = load i8, ptr %.03536, align 1 %6 = lshr i8 %5, 2 %7 = zext nneg i8 %6 to i64 - %8 = getelementptr inbounds [64 x i8], ptr @base64, i64 0, i64 %7 + %8 = getelementptr inbounds nuw [64 x i8], ptr @base64, i64 0, i64 %7 %9 = load i8, ptr %8, align 1 %10 = tail call ptr @archive_strappend_char(ptr noundef %0, i8 noundef signext %9) #6 %11 = load i8, ptr %.03536, align 1 @@ -398,7 +397,7 @@ define internal fastcc void @la_b64_encode(ptr noundef %0, ptr nocapture noundef %16 = lshr i8 %15, 4 %17 = or disjoint i8 %13, %16 %18 = zext nneg i8 %17 to i64 - %19 = getelementptr inbounds [64 x i8], ptr @base64, i64 0, i64 %18 + %19 = getelementptr inbounds nuw [64 x i8], ptr @base64, i64 0, i64 %18 %20 = load i8, ptr %19, align 1 %21 = tail call ptr @archive_strappend_char(ptr noundef %0, i8 noundef signext %20) #6 %22 = load i8, ptr %14, align 1 @@ -409,13 +408,13 @@ define internal fastcc void @la_b64_encode(ptr noundef %0, ptr nocapture noundef %27 = lshr i8 %26, 6 %28 = or disjoint i8 %24, %27 %29 = zext nneg i8 %28 to i64 - %30 = getelementptr inbounds [64 x i8], ptr @base64, i64 0, i64 %29 + %30 = getelementptr inbounds nuw [64 x i8], ptr @base64, i64 0, i64 %29 %31 = load i8, ptr %30, align 1 %32 = tail call ptr @archive_strappend_char(ptr noundef %0, i8 noundef signext %31) #6 %33 = load i8, ptr %25, align 1 %34 = and i8 %33, 63 %35 = zext nneg i8 %34 to i64 - %36 = getelementptr inbounds [64 x i8], ptr @base64, i64 0, i64 %35 + %36 = getelementptr inbounds nuw [64 x i8], ptr @base64, i64 0, i64 %35 %37 = load i8, ptr %36, align 1 %38 = tail call ptr @archive_strappend_char(ptr noundef %0, i8 noundef signext %37) #6 %39 = getelementptr inbounds i8, ptr %.03536, i64 3 @@ -433,7 +432,7 @@ define internal fastcc void @la_b64_encode(ptr noundef %0, ptr nocapture noundef %42 = load i8, ptr %.035.lcssa43, align 1 %43 = lshr i8 %42, 2 %44 = zext nneg i8 %43 to i64 - %45 = getelementptr inbounds [64 x i8], ptr @base64, i64 0, i64 %44 + %45 = getelementptr inbounds nuw [64 x i8], ptr @base64, i64 0, i64 %44 %46 = load i8, ptr %45, align 1 %47 = tail call ptr @archive_strappend_char(ptr noundef %0, i8 noundef signext %46) #6 %48 = load i8, ptr %.035.lcssa43, align 1 @@ -444,7 +443,7 @@ define internal fastcc void @la_b64_encode(ptr noundef %0, ptr nocapture noundef 52: ; preds = %._crit_edge.thread %53 = zext nneg i8 %50 to i64 - %54 = getelementptr inbounds [64 x i8], ptr @base64, i64 0, i64 %53 + %54 = getelementptr inbounds nuw [64 x i8], ptr @base64, i64 0, i64 %53 %55 = load i8, ptr %54, align 16 %56 = tail call ptr @archive_strappend_char(ptr noundef %0, i8 noundef signext %55) #6 br label %.sink.split @@ -455,14 +454,14 @@ define internal fastcc void @la_b64_encode(ptr noundef %0, ptr nocapture noundef %60 = lshr i8 %59, 4 %61 = or disjoint i8 %60, %50 %62 = zext nneg i8 %61 to i64 - %63 = getelementptr inbounds [64 x i8], ptr @base64, i64 0, i64 %62 + %63 = getelementptr inbounds nuw [64 x i8], ptr @base64, i64 0, i64 %62 %64 = load i8, ptr %63, align 1 %65 = tail call ptr @archive_strappend_char(ptr noundef %0, i8 noundef signext %64) #6 %66 = load i8, ptr %58, align 1 %67 = shl i8 %66, 2 %68 = and i8 %67, 60 %69 = zext nneg i8 %68 to i64 - %70 = getelementptr inbounds [64 x i8], ptr @base64, i64 0, i64 %69 + %70 = getelementptr inbounds nuw [64 x i8], ptr @base64, i64 0, i64 %69 %71 = load i8, ptr %70, align 4 br label %.sink.split diff --git a/bench/cmake/optimized/archive_write_add_filter_uuencode.c.ll b/bench/cmake/optimized/archive_write_add_filter_uuencode.c.ll index 0989c6e5cc7..6cf79e1b1c1 100644 --- a/bench/cmake/optimized/archive_write_add_filter_uuencode.c.ll +++ b/bench/cmake/optimized/archive_write_add_filter_uuencode.c.ll @@ -28,30 +28,30 @@ define dso_local range(i32 -30, 1) i32 @archive_write_add_filter_uuencode(ptr no br i1 %7, label %8, label %11 8: ; preds = %5 - %9 = getelementptr inbounds i8, ptr %2, i64 8 + %9 = getelementptr inbounds nuw i8, ptr %2, i64 8 %10 = load ptr, ptr %9, align 8 tail call void (ptr, i32, ptr, ...) @archive_set_error(ptr noundef %10, i32 noundef 12, ptr noundef nonnull @.str.1) #6 br label %22 11: ; preds = %5 - %12 = getelementptr inbounds i8, ptr %6, i64 8 + %12 = getelementptr inbounds nuw i8, ptr %6, i64 8 %13 = tail call ptr @archive_strncat(ptr noundef nonnull %12, ptr noundef nonnull @.str.2, i64 noundef 1) #6 store i32 420, ptr %6, align 8 - %14 = getelementptr inbounds i8, ptr %2, i64 72 + %14 = getelementptr inbounds nuw i8, ptr %2, i64 72 store ptr %6, ptr %14, align 8 - %15 = getelementptr inbounds i8, ptr %2, i64 80 + %15 = getelementptr inbounds nuw i8, ptr %2, i64 80 store ptr @.str.3, ptr %15, align 8 - %16 = getelementptr inbounds i8, ptr %2, i64 88 + %16 = getelementptr inbounds nuw i8, ptr %2, i64 88 store i32 7, ptr %16, align 8 - %17 = getelementptr inbounds i8, ptr %2, i64 32 + %17 = getelementptr inbounds nuw i8, ptr %2, i64 32 store ptr @archive_filter_uuencode_open, ptr %17, align 8 - %18 = getelementptr inbounds i8, ptr %2, i64 24 + %18 = getelementptr inbounds nuw i8, ptr %2, i64 24 store ptr @archive_filter_uuencode_options, ptr %18, align 8 - %19 = getelementptr inbounds i8, ptr %2, i64 40 + %19 = getelementptr inbounds nuw i8, ptr %2, i64 40 store ptr @archive_filter_uuencode_write, ptr %19, align 8 - %20 = getelementptr inbounds i8, ptr %2, i64 56 + %20 = getelementptr inbounds nuw i8, ptr %2, i64 56 store ptr @archive_filter_uuencode_close, ptr %20, align 8 - %21 = getelementptr inbounds i8, ptr %2, i64 64 + %21 = getelementptr inbounds nuw i8, ptr %2, i64 64 store ptr @archive_filter_uuencode_free, ptr %21, align 8 br label %22 @@ -73,9 +73,9 @@ declare ptr @archive_strncat(ptr noundef, ptr noundef, i64 noundef) local_unname ; Function Attrs: nounwind uwtable define internal range(i32 -30, 1) i32 @archive_filter_uuencode_open(ptr nocapture noundef %0) #0 { - %2 = getelementptr inbounds i8, ptr %0, i64 72 + %2 = getelementptr inbounds nuw i8, ptr %0, i64 72 %3 = load ptr, ptr %2, align 8 - %4 = getelementptr inbounds i8, ptr %0, i64 8 + %4 = getelementptr inbounds nuw i8, ptr %0, i64 8 %5 = load ptr, ptr %4, align 8 %6 = load i32, ptr %5, align 8 %7 = icmp eq i32 %6, -1329217314 @@ -98,9 +98,9 @@ define internal range(i32 -30, 1) i32 @archive_filter_uuencode_open(ptr nocaptur 16: ; preds = %8, %13, %12, %1 %.020 = phi i64 [ %15, %13 ], [ 65536, %12 ], [ 65536, %1 ], [ %10, %8 ] - %17 = getelementptr inbounds i8, ptr %3, i64 56 + %17 = getelementptr inbounds nuw i8, ptr %3, i64 56 store i64 %.020, ptr %17, align 8 - %18 = getelementptr inbounds i8, ptr %3, i64 32 + %18 = getelementptr inbounds nuw i8, ptr %3, i64 32 %19 = add nsw i64 %.020, 512 %20 = tail call ptr @archive_string_ensure(ptr noundef nonnull %18, i64 noundef %19) #6 %21 = icmp eq ptr %20, null @@ -113,7 +113,7 @@ define internal range(i32 -30, 1) i32 @archive_filter_uuencode_open(ptr nocaptur 24: ; preds = %16 %25 = load i32, ptr %3, align 8 - %26 = getelementptr inbounds i8, ptr %3, i64 8 + %26 = getelementptr inbounds nuw i8, ptr %3, i64 8 %27 = load ptr, ptr %26, align 8 tail call void (ptr, ptr, ...) @archive_string_sprintf(ptr noundef nonnull %18, ptr noundef nonnull @.str.9, i32 noundef %25, ptr noundef %27) #6 store ptr %3, ptr %2, align 8 @@ -126,7 +126,7 @@ define internal range(i32 -30, 1) i32 @archive_filter_uuencode_open(ptr nocaptur ; Function Attrs: nounwind uwtable define internal range(i32 -25, 1) i32 @archive_filter_uuencode_options(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, ptr noundef %2) #0 { - %4 = getelementptr inbounds i8, ptr %0, i64 72 + %4 = getelementptr inbounds nuw i8, ptr %0, i64 72 %5 = load ptr, ptr %4, align 8 %6 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(5) @.str.4) #8 %7 = icmp eq i32 %6, 0 @@ -137,7 +137,7 @@ define internal range(i32 -25, 1) i32 @archive_filter_uuencode_options(ptr nocap br i1 %9, label %10, label %13 10: ; preds = %8 - %11 = getelementptr inbounds i8, ptr %0, i64 8 + %11 = getelementptr inbounds nuw i8, ptr %0, i64 8 %12 = load ptr, ptr %11, align 8 tail call void (ptr, i32, ptr, ...) @archive_set_error(ptr noundef %12, i32 noundef -1, ptr noundef nonnull @.str.5) #6 br label %37 @@ -186,14 +186,14 @@ atol8.exit: ; preds = %atol8.exit.loopexit br i1 %28, label %29, label %32 29: ; preds = %27 - %30 = getelementptr inbounds i8, ptr %0, i64 8 + %30 = getelementptr inbounds nuw i8, ptr %0, i64 8 %31 = load ptr, ptr %30, align 8 tail call void (ptr, i32, ptr, ...) @archive_set_error(ptr noundef %31, i32 noundef -1, ptr noundef nonnull @.str.7) #6 br label %37 32: ; preds = %27 - %33 = getelementptr inbounds i8, ptr %5, i64 8 - %34 = getelementptr inbounds i8, ptr %5, i64 16 + %33 = getelementptr inbounds nuw i8, ptr %5, i64 8 + %34 = getelementptr inbounds nuw i8, ptr %5, i64 16 store i64 0, ptr %34, align 8 %35 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %2) #8 %36 = tail call ptr @archive_strncat(ptr noundef nonnull %33, ptr noundef nonnull %2, i64 noundef %35) #6 @@ -206,13 +206,13 @@ atol8.exit: ; preds = %atol8.exit.loopexit ; Function Attrs: nounwind uwtable define internal i32 @archive_filter_uuencode_write(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, i64 noundef %2) #0 { - %4 = getelementptr inbounds i8, ptr %0, i64 72 + %4 = getelementptr inbounds nuw i8, ptr %0, i64 72 %5 = load ptr, ptr %4, align 8 %6 = icmp eq i64 %2, 0 br i1 %6, label %.loopexit, label %7 7: ; preds = %3 - %8 = getelementptr inbounds i8, ptr %5, i64 64 + %8 = getelementptr inbounds nuw i8, ptr %5, i64 64 %9 = load i64, ptr %8, align 8 %.not = icmp eq i64 %9, 0 br i1 %.not, label %24, label %.preheader @@ -222,22 +222,21 @@ define internal i32 @archive_filter_uuencode_write(ptr nocapture noundef readonl br i1 %10, label %.lr.ph, label %._crit_edge.thread .lr.ph: ; preds = %.preheader - %11 = getelementptr inbounds i8, ptr %5, i64 72 + %11 = getelementptr inbounds nuw i8, ptr %5, i64 72 br label %12 12: ; preds = %.lr.ph, %12 %.151 = phi ptr [ %1, %.lr.ph ], [ %14, %12 ] %.14350 = phi i64 [ %2, %.lr.ph ], [ %18, %12 ] - %13 = phi i64 [ %9, %.lr.ph ], [ %.pr, %12 ] + %13 = phi i64 [ %9, %.lr.ph ], [ %16, %12 ] %14 = getelementptr inbounds i8, ptr %.151, i64 1 %15 = load i8, ptr %.151, align 1 %16 = add nuw nsw i64 %13, 1 store i64 %16, ptr %8, align 8 - %17 = getelementptr inbounds [45 x i8], ptr %11, i64 0, i64 %13 + %17 = getelementptr inbounds nuw [45 x i8], ptr %11, i64 0, i64 %13 store i8 %15, ptr %17, align 1 %18 = add i64 %.14350, -1 - %.pr = load i64, ptr %8, align 8 - %19 = icmp ult i64 %.pr, 45 + %19 = icmp ult i64 %13, 44 %20 = icmp ne i64 %18, 0 %21 = select i1 %19, i1 %20, i1 false br i1 %21, label %12, label %._crit_edge, !llvm.loop !7 @@ -248,8 +247,8 @@ define internal i32 @archive_filter_uuencode_write(ptr nocapture noundef readonl ._crit_edge.thread: ; preds = %.preheader, %._crit_edge %.1.lcssa75 = phi ptr [ %14, %._crit_edge ], [ %1, %.preheader ] %.143.lcssa74 = phi i64 [ %18, %._crit_edge ], [ %2, %.preheader ] - %22 = getelementptr inbounds i8, ptr %5, i64 32 - %23 = getelementptr inbounds i8, ptr %5, i64 72 + %22 = getelementptr inbounds nuw i8, ptr %5, i64 32 + %23 = getelementptr inbounds nuw i8, ptr %5, i64 72 tail call fastcc void @uu_encode(ptr noundef nonnull %22, ptr noundef nonnull %23, i64 noundef 45) store i64 0, ptr %8, align 8 br label %24 @@ -261,7 +260,7 @@ define internal i32 @archive_filter_uuencode_write(ptr nocapture noundef readonl br i1 %25, label %.lr.ph57, label %._crit_edge58 .lr.ph57: ; preds = %24 - %26 = getelementptr inbounds i8, ptr %5, i64 32 + %26 = getelementptr inbounds nuw i8, ptr %5, i64 32 br label %27 27: ; preds = %.lr.ph57, %27 @@ -280,22 +279,22 @@ define internal i32 @archive_filter_uuencode_write(ptr nocapture noundef readonl br i1 %.not48, label %33, label %31 31: ; preds = %._crit_edge58 - %32 = getelementptr inbounds i8, ptr %5, i64 72 + %32 = getelementptr inbounds nuw i8, ptr %5, i64 72 tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 %32, ptr align 1 %.2.lcssa, i64 %.244.lcssa, i1 false) store i64 %.244.lcssa, ptr %8, align 8 br label %33 33: ; preds = %31, %._crit_edge58 - %34 = getelementptr inbounds i8, ptr %5, i64 40 - %35 = getelementptr inbounds i8, ptr %5, i64 56 + %34 = getelementptr inbounds nuw i8, ptr %5, i64 40 + %35 = getelementptr inbounds nuw i8, ptr %5, i64 56 %36 = load i64, ptr %34, align 8 %37 = load i64, ptr %35, align 8 %.not4961 = icmp ult i64 %36, %37 br i1 %.not4961, label %.loopexit, label %.lr.ph63 .lr.ph63: ; preds = %33 - %38 = getelementptr inbounds i8, ptr %5, i64 32 - %39 = getelementptr inbounds i8, ptr %0, i64 16 + %38 = getelementptr inbounds nuw i8, ptr %5, i64 32 + %39 = getelementptr inbounds nuw i8, ptr %0, i64 16 br label %40 40: ; preds = %.lr.ph63, %40 @@ -323,29 +322,29 @@ define internal i32 @archive_filter_uuencode_write(ptr nocapture noundef readonl ; Function Attrs: nounwind uwtable define internal i32 @archive_filter_uuencode_close(ptr nocapture noundef readonly %0) #0 { - %2 = getelementptr inbounds i8, ptr %0, i64 72 + %2 = getelementptr inbounds nuw i8, ptr %0, i64 72 %3 = load ptr, ptr %2, align 8 - %4 = getelementptr inbounds i8, ptr %3, i64 64 + %4 = getelementptr inbounds nuw i8, ptr %3, i64 64 %5 = load i64, ptr %4, align 8 %.not = icmp eq i64 %5, 0 br i1 %.not, label %9, label %6 6: ; preds = %1 - %7 = getelementptr inbounds i8, ptr %3, i64 32 - %8 = getelementptr inbounds i8, ptr %3, i64 72 + %7 = getelementptr inbounds nuw i8, ptr %3, i64 32 + %8 = getelementptr inbounds nuw i8, ptr %3, i64 72 tail call fastcc void @uu_encode(ptr noundef nonnull %7, ptr noundef nonnull %8, i64 noundef %5) br label %9 9: ; preds = %6, %1 - %10 = getelementptr inbounds i8, ptr %3, i64 32 + %10 = getelementptr inbounds nuw i8, ptr %3, i64 32 tail call void (ptr, ptr, ...) @archive_string_sprintf(ptr noundef nonnull %10, ptr noundef nonnull @.str.10) #6 - %11 = getelementptr inbounds i8, ptr %0, i64 8 + %11 = getelementptr inbounds nuw i8, ptr %0, i64 8 %12 = load ptr, ptr %11, align 8 %13 = tail call i32 @archive_write_set_bytes_in_last_block(ptr noundef %12, i32 noundef 1) #6 - %14 = getelementptr inbounds i8, ptr %0, i64 16 + %14 = getelementptr inbounds nuw i8, ptr %0, i64 16 %15 = load ptr, ptr %14, align 8 %16 = load ptr, ptr %10, align 8 - %17 = getelementptr inbounds i8, ptr %3, i64 40 + %17 = getelementptr inbounds nuw i8, ptr %3, i64 40 %18 = load i64, ptr %17, align 8 %19 = tail call i32 @__archive_write_filter(ptr noundef %15, ptr noundef %16, i64 noundef %18) #6 ret i32 %19 @@ -353,11 +352,11 @@ define internal i32 @archive_filter_uuencode_close(ptr nocapture noundef readonl ; Function Attrs: nounwind uwtable define internal noundef i32 @archive_filter_uuencode_free(ptr nocapture noundef readonly %0) #0 { - %2 = getelementptr inbounds i8, ptr %0, i64 72 + %2 = getelementptr inbounds nuw i8, ptr %0, i64 72 %3 = load ptr, ptr %2, align 8 - %4 = getelementptr inbounds i8, ptr %3, i64 8 + %4 = getelementptr inbounds nuw i8, ptr %3, i64 8 tail call void @archive_string_free(ptr noundef nonnull %4) #6 - %5 = getelementptr inbounds i8, ptr %3, i64 32 + %5 = getelementptr inbounds nuw i8, ptr %3, i64 32 tail call void @archive_string_free(ptr noundef nonnull %5) #6 tail call void @free(ptr noundef %3) #6 ret i32 0 diff --git a/bench/coremark/optimized/core_matrix.c.ll b/bench/coremark/optimized/core_matrix.c.ll index 08c6264f5d1..1581b26ccf4 100644 --- a/bench/coremark/optimized/core_matrix.c.ll +++ b/bench/coremark/optimized/core_matrix.c.ll @@ -7,11 +7,11 @@ target triple = "x86_64-unknown-linux-gnu" define dso_local zeroext i16 @core_bench_matrix(ptr nocapture noundef readonly %p, i16 noundef signext %seed, i16 noundef zeroext %crc) local_unnamed_addr #0 { entry: %0 = load i32, ptr %p, align 8 - %C2 = getelementptr inbounds i8, ptr %p, i64 24 + %C2 = getelementptr inbounds nuw i8, ptr %p, i64 24 %1 = load ptr, ptr %C2, align 8 - %A3 = getelementptr inbounds i8, ptr %p, i64 8 + %A3 = getelementptr inbounds nuw i8, ptr %p, i64 8 %2 = load ptr, ptr %A3, align 8 - %B4 = getelementptr inbounds i8, ptr %p, i64 16 + %B4 = getelementptr inbounds nuw i8, ptr %p, i64 16 %3 = load ptr, ptr %B4, align 8 %call = tail call signext i16 @matrix_test(i32 noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i16 noundef signext %seed) %call5 = tail call zeroext i16 @crc16(i16 noundef signext %call, i16 noundef zeroext %crc) #6 @@ -48,7 +48,7 @@ for.body3.i: ; preds = %for.body3.i, %for.c %0 = trunc nuw i64 %indvars.iv.i to i32 %add.i = add i32 %mul.i, %0 %idxprom.i = zext i32 %add.i to i64 - %arrayidx.i = getelementptr inbounds i16, ptr %A, i64 %idxprom.i + %arrayidx.i = getelementptr inbounds nuw i16, ptr %A, i64 %idxprom.i %1 = load i16, ptr %arrayidx.i, align 2 %add5.i = add i16 %1, %val store i16 %add5.i, ptr %arrayidx.i, align 2 @@ -75,11 +75,11 @@ for.body3.i37: ; preds = %for.body3.i37, %for %2 = trunc nuw i64 %indvars.iv.i38 to i32 %add.i39 = add i32 %mul.i36, %2 %idxprom.i40 = zext i32 %add.i39 to i64 - %arrayidx.i41 = getelementptr inbounds i16, ptr %A, i64 %idxprom.i40 + %arrayidx.i41 = getelementptr inbounds nuw i16, ptr %A, i64 %idxprom.i40 %3 = load i16, ptr %arrayidx.i41, align 2 %conv.i = sext i16 %3 to i32 %mul5.i = mul nsw i32 %conv.i, %conv4.i - %arrayidx9.i = getelementptr inbounds i32, ptr %C, i64 %idxprom.i40 + %arrayidx9.i = getelementptr inbounds nuw i32, ptr %C, i64 %idxprom.i40 store i32 %mul5.i, ptr %arrayidx9.i, align 4 %indvars.iv.next.i42 = add nuw nsw i64 %indvars.iv.i38, 1 %exitcond.not.i43 = icmp eq i64 %indvars.iv.next.i42, %wide.trip.count.i @@ -110,7 +110,7 @@ for.body3.i49: ; preds = %for.body3.i49, %for %4 = trunc nuw i64 %indvars.iv.i50 to i32 %add.i51 = add i32 %mul.i48, %4 %idxprom.i52 = zext i32 %add.i51 to i64 - %arrayidx.i53 = getelementptr inbounds i32, ptr %C, i64 %idxprom.i52 + %arrayidx.i53 = getelementptr inbounds nuw i32, ptr %C, i64 %idxprom.i52 %5 = load i32, ptr %arrayidx.i53, align 4 %add4.i = add nsw i32 %5, %tmp.112.i %cmp5.i = icmp sgt i32 %add4.i, %conv.i45 @@ -134,7 +134,7 @@ for.body.preheader.i: ; preds = %for.inc15.i for.body.i: ; preds = %for.inc13.i, %for.body.preheader.i %indvars.iv15.i = phi i64 [ 0, %for.body.preheader.i ], [ %indvars.iv.next16.i, %for.inc13.i ] - %arrayidx.i56 = getelementptr inbounds i32, ptr %C, i64 %indvars.iv15.i + %arrayidx.i56 = getelementptr inbounds nuw i32, ptr %C, i64 %indvars.iv15.i store i32 0, ptr %arrayidx.i56, align 4 %6 = trunc nuw i64 %indvars.iv15.i to i32 %mul.i57 = mul i32 %N, %6 @@ -146,10 +146,10 @@ for.body3.i58: ; preds = %for.body3.i58, %for %8 = trunc nuw i64 %indvars.iv.i59 to i32 %add.i60 = add i32 %mul.i57, %8 %idxprom4.i = zext i32 %add.i60 to i64 - %arrayidx5.i = getelementptr inbounds i16, ptr %A, i64 %idxprom4.i + %arrayidx5.i = getelementptr inbounds nuw i16, ptr %A, i64 %idxprom4.i %9 = load i16, ptr %arrayidx5.i, align 2 %conv.i61 = sext i16 %9 to i32 - %arrayidx7.i = getelementptr inbounds i16, ptr %B, i64 %indvars.iv.i59 + %arrayidx7.i = getelementptr inbounds nuw i16, ptr %B, i64 %indvars.iv.i59 %10 = load i16, ptr %arrayidx7.i, align 2 %conv8.i = sext i16 %10 to i32 %mul9.i = mul nsw i32 %conv8.i, %conv.i61 @@ -180,7 +180,7 @@ for.body3.i74: ; preds = %for.body3.i74, %for %11 = trunc nuw i64 %indvars.iv.i75 to i32 %add.i79 = add i32 %mul.i73, %11 %idxprom.i80 = zext i32 %add.i79 to i64 - %arrayidx.i81 = getelementptr inbounds i32, ptr %C, i64 %idxprom.i80 + %arrayidx.i81 = getelementptr inbounds nuw i32, ptr %C, i64 %idxprom.i80 %12 = load i32, ptr %arrayidx.i81, align 4 %add4.i82 = add nsw i32 %12, %tmp.112.i78 %cmp5.i83 = icmp sgt i32 %add4.i82, %conv.i45 @@ -212,7 +212,7 @@ for.body3.i99: ; preds = %for.inc22.i, %for.c %13 = trunc nuw i64 %indvars.iv24.i to i32 %add.i100 = add i32 %mul.i98, %13 %idxprom.i101 = zext i32 %add.i100 to i64 - %arrayidx.i102 = getelementptr inbounds i32, ptr %C, i64 %idxprom.i101 + %arrayidx.i102 = getelementptr inbounds nuw i32, ptr %C, i64 %idxprom.i101 store i32 0, ptr %arrayidx.i102, align 4 br label %for.body6.i @@ -222,13 +222,13 @@ for.body6.i: ; preds = %for.body6.i, %for.b %15 = trunc nuw i64 %indvars.iv.i103 to i32 %add8.i = add i32 %mul.i98, %15 %idxprom9.i = zext i32 %add8.i to i64 - %arrayidx10.i = getelementptr inbounds i16, ptr %A, i64 %idxprom9.i + %arrayidx10.i = getelementptr inbounds nuw i16, ptr %A, i64 %idxprom9.i %16 = load i16, ptr %arrayidx10.i, align 2 %conv.i104 = sext i16 %16 to i32 %mul11.i = mul i32 %N, %15 %add12.i105 = add i32 %mul11.i, %13 %idxprom13.i = zext i32 %add12.i105 to i64 - %arrayidx14.i = getelementptr inbounds i16, ptr %B, i64 %idxprom13.i + %arrayidx14.i = getelementptr inbounds nuw i16, ptr %B, i64 %idxprom13.i %17 = load i16, ptr %arrayidx14.i, align 2 %conv15.i = sext i16 %17 to i32 %mul16.i = mul nsw i32 %conv15.i, %conv.i104 @@ -264,7 +264,7 @@ for.body3.i118: ; preds = %for.body3.i118, %fo %18 = trunc nuw i64 %indvars.iv.i119 to i32 %add.i123 = add i32 %mul.i117, %18 %idxprom.i124 = zext i32 %add.i123 to i64 - %arrayidx.i125 = getelementptr inbounds i32, ptr %C, i64 %idxprom.i124 + %arrayidx.i125 = getelementptr inbounds nuw i32, ptr %C, i64 %idxprom.i124 %19 = load i32, ptr %arrayidx.i125, align 4 %add4.i126 = add nsw i32 %19, %tmp.112.i122 %cmp5.i127 = icmp sgt i32 %add4.i126, %conv.i45 @@ -296,7 +296,7 @@ for.body3.i143: ; preds = %for.inc25.i159, %fo %20 = trunc nuw i64 %indvars.iv25.i to i32 %add.i144 = add i32 %mul.i142, %20 %idxprom.i145 = zext i32 %add.i144 to i64 - %arrayidx.i146 = getelementptr inbounds i32, ptr %C, i64 %idxprom.i145 + %arrayidx.i146 = getelementptr inbounds nuw i32, ptr %C, i64 %idxprom.i145 store i32 0, ptr %arrayidx.i146, align 4 br label %for.body6.i147 @@ -306,13 +306,13 @@ for.body6.i147: ; preds = %for.body6.i147, %fo %22 = trunc nuw i64 %indvars.iv.i148 to i32 %add8.i149 = add i32 %mul.i142, %22 %idxprom9.i150 = zext i32 %add8.i149 to i64 - %arrayidx10.i151 = getelementptr inbounds i16, ptr %A, i64 %idxprom9.i150 + %arrayidx10.i151 = getelementptr inbounds nuw i16, ptr %A, i64 %idxprom9.i150 %23 = load i16, ptr %arrayidx10.i151, align 2 %conv31.i = zext i16 %23 to i32 %mul11.i152 = mul i32 %N, %22 %add12.i153 = add i32 %mul11.i152, %20 %idxprom13.i154 = zext i32 %add12.i153 to i64 - %arrayidx14.i155 = getelementptr inbounds i16, ptr %B, i64 %idxprom13.i154 + %arrayidx14.i155 = getelementptr inbounds nuw i16, ptr %B, i64 %idxprom13.i154 %24 = load i16, ptr %arrayidx14.i155, align 2 %conv1532.i = zext i16 %24 to i32 %mul16.i156 = mul nuw i32 %conv1532.i, %conv31.i @@ -353,7 +353,7 @@ for.body3.i171: ; preds = %for.body3.i171, %fo %25 = trunc nuw i64 %indvars.iv.i172 to i32 %add.i176 = add i32 %mul.i170, %25 %idxprom.i177 = zext i32 %add.i176 to i64 - %arrayidx.i178 = getelementptr inbounds i32, ptr %C, i64 %idxprom.i177 + %arrayidx.i178 = getelementptr inbounds nuw i32, ptr %C, i64 %idxprom.i177 %26 = load i32, ptr %arrayidx.i178, align 4 %add4.i179 = add nsw i32 %26, %tmp.112.i175 %cmp5.i180 = icmp sgt i32 %add4.i179, %conv.i45 @@ -385,7 +385,7 @@ for.body3.i199: ; preds = %for.body3.i199, %fo %27 = trunc nuw i64 %indvars.iv.i200 to i32 %add.i201 = add i32 %mul.i198, %27 %idxprom.i202 = zext i32 %add.i201 to i64 - %arrayidx.i203 = getelementptr inbounds i16, ptr %A, i64 %idxprom.i202 + %arrayidx.i203 = getelementptr inbounds nuw i16, ptr %A, i64 %idxprom.i202 %28 = load i16, ptr %arrayidx.i203, align 2 %add5.i204 = sub i16 %28, %val store i16 %add5.i204, ptr %arrayidx.i203, align 2 @@ -423,7 +423,7 @@ for.body3: ; preds = %for.cond1.preheader %0 = trunc nuw i64 %indvars.iv to i32 %add = add i32 %mul, %0 %idxprom = zext i32 %add to i64 - %arrayidx = getelementptr inbounds i16, ptr %A, i64 %idxprom + %arrayidx = getelementptr inbounds nuw i16, ptr %A, i64 %idxprom %1 = load i16, ptr %arrayidx, align 2 %add5 = add i16 %1, %val store i16 %add5, ptr %arrayidx, align 2 @@ -461,11 +461,11 @@ for.body3: ; preds = %for.cond1.preheader %0 = trunc nuw i64 %indvars.iv to i32 %add = add i32 %mul, %0 %idxprom = zext i32 %add to i64 - %arrayidx = getelementptr inbounds i16, ptr %A, i64 %idxprom + %arrayidx = getelementptr inbounds nuw i16, ptr %A, i64 %idxprom %1 = load i16, ptr %arrayidx, align 2 %conv = sext i16 %1 to i32 %mul5 = mul nsw i32 %conv, %conv4 - %arrayidx9 = getelementptr inbounds i32, ptr %C, i64 %idxprom + %arrayidx9 = getelementptr inbounds nuw i32, ptr %C, i64 %idxprom store i32 %mul5, ptr %arrayidx9, align 4 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count @@ -507,7 +507,7 @@ for.body3: ; preds = %for.cond1.preheader %0 = trunc nuw i64 %indvars.iv to i32 %add = add i32 %mul, %0 %idxprom = zext i32 %add to i64 - %arrayidx = getelementptr inbounds i32, ptr %C, i64 %idxprom + %arrayidx = getelementptr inbounds nuw i32, ptr %C, i64 %idxprom %1 = load i32, ptr %arrayidx, align 4 %add4 = add nsw i32 %1, %tmp.112 %cmp5 = icmp sgt i32 %add4, %conv @@ -542,7 +542,7 @@ for.body.preheader: ; preds = %entry for.body: ; preds = %for.body.preheader, %for.inc13 %indvars.iv15 = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next16, %for.inc13 ] - %arrayidx = getelementptr inbounds i32, ptr %C, i64 %indvars.iv15 + %arrayidx = getelementptr inbounds nuw i32, ptr %C, i64 %indvars.iv15 store i32 0, ptr %arrayidx, align 4 %0 = trunc nuw i64 %indvars.iv15 to i32 %mul = mul i32 %N, %0 @@ -554,10 +554,10 @@ for.body3: ; preds = %for.body, %for.body %2 = trunc nuw i64 %indvars.iv to i32 %add = add i32 %mul, %2 %idxprom4 = zext i32 %add to i64 - %arrayidx5 = getelementptr inbounds i16, ptr %A, i64 %idxprom4 + %arrayidx5 = getelementptr inbounds nuw i16, ptr %A, i64 %idxprom4 %3 = load i16, ptr %arrayidx5, align 2 %conv = sext i16 %3 to i32 - %arrayidx7 = getelementptr inbounds i16, ptr %B, i64 %indvars.iv + %arrayidx7 = getelementptr inbounds nuw i16, ptr %B, i64 %indvars.iv %4 = load i16, ptr %arrayidx7, align 2 %conv8 = sext i16 %4 to i32 %mul9 = mul nsw i32 %conv8, %conv @@ -596,7 +596,7 @@ for.body3: ; preds = %for.cond1.preheader %0 = trunc nuw i64 %indvars.iv24 to i32 %add = add i32 %mul, %0 %idxprom = zext i32 %add to i64 - %arrayidx = getelementptr inbounds i32, ptr %C, i64 %idxprom + %arrayidx = getelementptr inbounds nuw i32, ptr %C, i64 %idxprom store i32 0, ptr %arrayidx, align 4 br label %for.body6 @@ -606,13 +606,13 @@ for.body6: ; preds = %for.body3, %for.bod %2 = trunc nuw i64 %indvars.iv to i32 %add8 = add i32 %mul, %2 %idxprom9 = zext i32 %add8 to i64 - %arrayidx10 = getelementptr inbounds i16, ptr %A, i64 %idxprom9 + %arrayidx10 = getelementptr inbounds nuw i16, ptr %A, i64 %idxprom9 %3 = load i16, ptr %arrayidx10, align 2 %conv = sext i16 %3 to i32 %mul11 = mul i32 %N, %2 %add12 = add i32 %mul11, %0 %idxprom13 = zext i32 %add12 to i64 - %arrayidx14 = getelementptr inbounds i16, ptr %B, i64 %idxprom13 + %arrayidx14 = getelementptr inbounds nuw i16, ptr %B, i64 %idxprom13 %4 = load i16, ptr %arrayidx14, align 2 %conv15 = sext i16 %4 to i32 %mul16 = mul nsw i32 %conv15, %conv @@ -656,7 +656,7 @@ for.body3: ; preds = %for.cond1.preheader %0 = trunc nuw i64 %indvars.iv25 to i32 %add = add i32 %mul, %0 %idxprom = zext i32 %add to i64 - %arrayidx = getelementptr inbounds i32, ptr %C, i64 %idxprom + %arrayidx = getelementptr inbounds nuw i32, ptr %C, i64 %idxprom store i32 0, ptr %arrayidx, align 4 br label %for.body6 @@ -666,13 +666,13 @@ for.body6: ; preds = %for.body3, %for.bod %2 = trunc nuw i64 %indvars.iv to i32 %add8 = add i32 %mul, %2 %idxprom9 = zext i32 %add8 to i64 - %arrayidx10 = getelementptr inbounds i16, ptr %A, i64 %idxprom9 + %arrayidx10 = getelementptr inbounds nuw i16, ptr %A, i64 %idxprom9 %3 = load i16, ptr %arrayidx10, align 2 %conv31 = zext i16 %3 to i32 %mul11 = mul i32 %N, %2 %add12 = add i32 %mul11, %0 %idxprom13 = zext i32 %add12 to i64 - %arrayidx14 = getelementptr inbounds i16, ptr %B, i64 %idxprom13 + %arrayidx14 = getelementptr inbounds nuw i16, ptr %B, i64 %idxprom13 %4 = load i16, ptr %arrayidx14, align 2 %conv1532 = zext i16 %4 to i32 %mul16 = mul nuw i32 %conv1532, %conv31 @@ -713,7 +713,7 @@ while.end.thread: ; preds = %entry %add49 = add i64 %0, 3 %conv50 = and i64 %add49, 4294967292 %1 = inttoptr i64 %conv50 to ptr - %add.ptr53 = getelementptr inbounds i8, ptr %1, i64 2 + %add.ptr53 = getelementptr inbounds nuw i8, ptr %1, i64 2 br label %for.cond8.preheader.preheader while.body: ; preds = %entry, %while.body @@ -731,7 +731,7 @@ while.end: ; preds = %while.body %3 = inttoptr i64 %conv to ptr %mul5 = mul i32 %i.038, %i.038 %idx.ext = zext i32 %mul5 to i64 - %add.ptr = getelementptr inbounds i16, ptr %3, i64 %idx.ext + %add.ptr = getelementptr inbounds nuw i16, ptr %3, i64 %idx.ext %cmp642.not = icmp eq i32 %i.038, 0 br i1 %cmp642.not, label %for.end34, label %for.cond8.preheader.preheader @@ -761,12 +761,12 @@ for.body11: ; preds = %for.cond8.preheader %5 = trunc nuw i64 %indvars.iv to i32 %add19 = add i32 %mul18, %5 %idxprom = zext i32 %add19 to i64 - %arrayidx = getelementptr inbounds i16, ptr %add.ptr59, i64 %idxprom + %arrayidx = getelementptr inbounds nuw i16, ptr %add.ptr59, i64 %idxprom store i16 %conv17, ptr %arrayidx, align 2 %add21 = add i32 %add13, %order.139 %6 = trunc i32 %add21 to i16 %conv25 = and i16 %6, 255 - %arrayidx29 = getelementptr inbounds i16, ptr %4, i64 %idxprom + %arrayidx29 = getelementptr inbounds nuw i16, ptr %4, i64 %idxprom store i16 %conv25, ptr %arrayidx29, align 2 %inc30 = add nsw i32 %order.139, 1 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 @@ -783,16 +783,16 @@ for.end34: ; preds = %for.inc32, %while.e %idx.ext58 = phi i64 [ %idx.ext, %while.end ], [ %idx.ext57, %for.inc32 ] %7 = phi ptr [ %3, %while.end ], [ %4, %for.inc32 ] %i.0.lcssa56 = phi i32 [ 0, %while.end ], [ %i.0.lcssa55, %for.inc32 ] - %A35 = getelementptr inbounds i8, ptr %p, i64 8 + %A35 = getelementptr inbounds nuw i8, ptr %p, i64 8 store ptr %7, ptr %A35, align 8 - %B36 = getelementptr inbounds i8, ptr %p, i64 16 + %B36 = getelementptr inbounds nuw i8, ptr %p, i64 16 store ptr %add.ptr60, ptr %B36, align 8 - %add.ptr39 = getelementptr inbounds i16, ptr %add.ptr60, i64 %idx.ext58 + %add.ptr39 = getelementptr inbounds nuw i16, ptr %add.ptr60, i64 %idx.ext58 %8 = ptrtoint ptr %add.ptr39 to i64 %add42 = add nuw nsw i64 %8, 3 %conv43 = and i64 %add42, 4294967292 %9 = inttoptr i64 %conv43 to ptr - %C = getelementptr inbounds i8, ptr %p, i64 24 + %C = getelementptr inbounds nuw i8, ptr %p, i64 24 store ptr %9, ptr %C, align 8 store i32 %i.0.lcssa56, ptr %p, align 8 ret i32 %i.0.lcssa56 diff --git a/bench/duckdb/optimized/no_operator_caching_verifier.cpp.ll b/bench/duckdb/optimized/no_operator_caching_verifier.cpp.ll index 6c03eccb0d7..fdb4ce03539 100644 --- a/bench/duckdb/optimized/no_operator_caching_verifier.cpp.ll +++ b/bench/duckdb/optimized/no_operator_caching_verifier.cpp.ll @@ -52,7 +52,7 @@ entry: %__dnew.i.i = alloca i64, align 8 %agg.tmp = alloca %"class.std::__cxx11::basic_string", align 8 %agg.tmp2 = alloca %"class.duckdb::unique_ptr", align 8 - %0 = getelementptr inbounds i8, ptr %agg.tmp, i64 16 + %0 = getelementptr inbounds nuw i8, ptr %agg.tmp, i64 16 store ptr %0, ptr %agg.tmp, align 8, !tbaa !3 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %__dnew.i.i) #10 store i64 19, ptr %__dnew.i.i, align 8, !tbaa !8 @@ -61,7 +61,7 @@ entry: %1 = load i64, ptr %__dnew.i.i, align 8, !tbaa !8 store i64 %1, ptr %0, align 8, !tbaa !12 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(19) %call2.i11.i8, ptr noundef nonnull align 1 dereferenceable(19) @.str, i64 19, i1 false) - %_M_string_length.i.i.i.i = getelementptr inbounds i8, ptr %agg.tmp, i64 8 + %_M_string_length.i.i.i.i = getelementptr inbounds nuw i8, ptr %agg.tmp, i64 8 store i64 %1, ptr %_M_string_length.i.i.i.i, align 8, !tbaa !13 %2 = load ptr, ptr %agg.tmp, align 8, !tbaa !10 %arrayidx.i.i.i = getelementptr inbounds i8, ptr %2, i64 %1 @@ -80,7 +80,7 @@ invoke.cont4: ; preds = %entry _ZNKSt14default_deleteIN6duckdb12SQLStatementEEclEPS1_.exit.i: ; preds = %invoke.cont4 %vtable.i.i = load ptr, ptr %4, align 8, !tbaa !15 - %vfn.i.i = getelementptr inbounds i8, ptr %vtable.i.i, i64 8 + %vfn.i.i = getelementptr inbounds nuw i8, ptr %vtable.i.i, i64 8 %5 = load ptr, ptr %vfn.i.i, align 8 call void %5(ptr noundef nonnull align 8 dereferenceable(128) %4) #10 br label %_ZNSt10unique_ptrIN6duckdb12SQLStatementESt14default_deleteIS1_EED2Ev.exit @@ -114,7 +114,7 @@ lpad3: ; preds = %entry _ZNKSt14default_deleteIN6duckdb12SQLStatementEEclEPS1_.exit.i11: ; preds = %lpad3 %vtable.i.i12 = load ptr, ptr %9, align 8, !tbaa !15 - %vfn.i.i13 = getelementptr inbounds i8, ptr %vtable.i.i12, i64 8 + %vfn.i.i13 = getelementptr inbounds nuw i8, ptr %vtable.i.i12, i64 8 %10 = load ptr, ptr %vfn.i.i13, align 8 call void %10(ptr noundef nonnull align 8 dereferenceable(128) %9) #10 br label %_ZNSt10unique_ptrIN6duckdb12SQLStatementESt14default_deleteIS1_EED2Ev.exit14 @@ -156,7 +156,7 @@ entry: %ref.tmp1 = alloca %"class.duckdb::unique_ptr", align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %ref.tmp1) #10 %vtable = load ptr, ptr %statement_p, align 8, !tbaa !15 - %vfn = getelementptr inbounds i8, ptr %vtable, i64 24 + %vfn = getelementptr inbounds nuw i8, ptr %vtable, i64 24 %0 = load ptr, ptr %vfn, align 8 call void %0(ptr dead_on_unwind nonnull writable sret(%"class.duckdb::unique_ptr") align 8 %ref.tmp1, ptr noundef nonnull align 8 dereferenceable(128) %statement_p) call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %agg.tmp.i) @@ -177,7 +177,7 @@ invoke.cont.i: ; preds = %call.i.noexc _ZNKSt14default_deleteIN6duckdb12SQLStatementEEclEPS1_.exit.i.i: ; preds = %invoke.cont.i %vtable.i.i.i = load ptr, ptr %2, align 8, !tbaa !15, !noalias !17 - %vfn.i.i.i = getelementptr inbounds i8, ptr %vtable.i.i.i, i64 8 + %vfn.i.i.i = getelementptr inbounds nuw i8, ptr %vtable.i.i.i, i64 8 %3 = load ptr, ptr %vfn.i.i.i, align 8, !noalias !17 call void %3(ptr noundef nonnull align 8 dereferenceable(128) %2) #10, !noalias !17 br label %_ZNSt10unique_ptrIN6duckdb25NoOperatorCachingVerifierESt14default_deleteIS1_EED2Ev.exit @@ -191,7 +191,7 @@ lpad.i: ; preds = %call.i.noexc _ZNKSt14default_deleteIN6duckdb12SQLStatementEEclEPS1_.exit.i3.i: ; preds = %lpad.i %vtable.i.i4.i = load ptr, ptr %5, align 8, !tbaa !15, !noalias !17 - %vfn.i.i5.i = getelementptr inbounds i8, ptr %vtable.i.i4.i, i64 8 + %vfn.i.i5.i = getelementptr inbounds nuw i8, ptr %vtable.i.i4.i, i64 8 %6 = load ptr, ptr %vfn.i.i5.i, align 8, !noalias !17 call void %6(ptr noundef nonnull align 8 dereferenceable(128) %5) #10, !noalias !17 br label %_ZNSt10unique_ptrIN6duckdb12SQLStatementESt14default_deleteIS1_EED2Ev.exit6.i @@ -210,7 +210,7 @@ _ZNSt10unique_ptrIN6duckdb25NoOperatorCachingVerifierESt14default_deleteIS1_EED2 _ZNKSt14default_deleteIN6duckdb12SQLStatementEEclEPS1_.exit.i: ; preds = %_ZNSt10unique_ptrIN6duckdb25NoOperatorCachingVerifierESt14default_deleteIS1_EED2Ev.exit %vtable.i.i5 = load ptr, ptr %7, align 8, !tbaa !15 - %vfn.i.i6 = getelementptr inbounds i8, ptr %vtable.i.i5, i64 8 + %vfn.i.i6 = getelementptr inbounds nuw i8, ptr %vtable.i.i5, i64 8 %8 = load ptr, ptr %vfn.i.i6, align 8 call void %8(ptr noundef nonnull align 8 dereferenceable(128) %7) #10 br label %_ZNSt10unique_ptrIN6duckdb12SQLStatementESt14default_deleteIS1_EED2Ev.exit @@ -232,7 +232,7 @@ lpad.body: ; preds = %lpad, %_ZNSt10uniqu _ZNKSt14default_deleteIN6duckdb12SQLStatementEEclEPS1_.exit.i8: ; preds = %lpad.body %vtable.i.i9 = load ptr, ptr %10, align 8, !tbaa !15 - %vfn.i.i10 = getelementptr inbounds i8, ptr %vtable.i.i9, i64 8 + %vfn.i.i10 = getelementptr inbounds nuw i8, ptr %vtable.i.i9, i64 8 %11 = load ptr, ptr %vfn.i.i10, align 8 call void %11(ptr noundef nonnull align 8 dereferenceable(128) %10) #10 br label %_ZNSt10unique_ptrIN6duckdb12SQLStatementESt14default_deleteIS1_EED2Ev.exit11 diff --git a/bench/entt/optimized/resource_loader.cpp.ll b/bench/entt/optimized/resource_loader.cpp.ll index 27cc989507d..e93babd293f 100644 --- a/bench/entt/optimized/resource_loader.cpp.ll +++ b/bench/entt/optimized/resource_loader.cpp.ll @@ -170,7 +170,7 @@ if.then.i: ; preds = %invoke.cont7 %vbase.offset.ptr.i = getelementptr i8, ptr %vtable.i, i64 -24 %vbase.offset.i = load i64, ptr %vbase.offset.ptr.i, align 8 %add.ptr.i = getelementptr inbounds i8, ptr @_ZSt4cerr, i64 %vbase.offset.i - %_M_streambuf_state.i.i.i = getelementptr inbounds i8, ptr %add.ptr.i, i64 32 + %_M_streambuf_state.i.i.i = getelementptr inbounds nuw i8, ptr %add.ptr.i, i64 32 %0 = load i32, ptr %_M_streambuf_state.i.i.i, align 8, !tbaa !7 %or.i.i.i = or i32 %0, 1 invoke void @_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate(ptr noundef nonnull align 8 dereferenceable(264) %add.ptr.i, i32 noundef %or.i.i.i) @@ -231,7 +231,7 @@ if.then.i: ; preds = %invoke.cont6 %vbase.offset.ptr.i = getelementptr i8, ptr %vtable.i, i64 -24 %vbase.offset.i = load i64, ptr %vbase.offset.ptr.i, align 8 %add.ptr.i = getelementptr inbounds i8, ptr @_ZSt4cerr, i64 %vbase.offset.i - %_M_streambuf_state.i.i.i = getelementptr inbounds i8, ptr %add.ptr.i, i64 32 + %_M_streambuf_state.i.i.i = getelementptr inbounds nuw i8, ptr %add.ptr.i, i64 32 %0 = load i32, ptr %_M_streambuf_state.i.i.i, align 8, !tbaa !7 %or.i.i.i = or i32 %0, 1 invoke void @_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate(ptr noundef nonnull align 8 dereferenceable(264) %add.ptr.i, i32 noundef %or.i.i.i) @@ -288,14 +288,14 @@ cleanup.cont: call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %resource) #14 tail call void @llvm.experimental.noalias.scope.decl(metadata !17) tail call void @llvm.experimental.noalias.scope.decl(metadata !20) - %_M_refcount.i.i.i.i = getelementptr inbounds i8, ptr %resource, i64 8 + %_M_refcount.i.i.i.i = getelementptr inbounds nuw i8, ptr %resource, i64 8 %call5.i.i.i16.i.i.i.i.i = tail call noalias noundef nonnull dereferenceable(24) ptr @_Znwm(i64 noundef 24) #15, !noalias !23 - %_M_use_count.i.i.i.i.i.i.i = getelementptr inbounds i8, ptr %call5.i.i.i16.i.i.i.i.i, i64 8 + %_M_use_count.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %call5.i.i.i16.i.i.i.i.i, i64 8 store i32 1, ptr %_M_use_count.i.i.i.i.i.i.i, align 8, !tbaa !24, !noalias !23 - %_M_weak_count.i.i.i.i.i.i.i = getelementptr inbounds i8, ptr %call5.i.i.i16.i.i.i.i.i, i64 12 + %_M_weak_count.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %call5.i.i.i16.i.i.i.i.i, i64 12 store i32 1, ptr %_M_weak_count.i.i.i.i.i.i.i, align 4, !tbaa !26, !noalias !23 store ptr getelementptr inbounds (i8, ptr @_ZTVSt23_Sp_counted_ptr_inplaceIiSaIvELN9__gnu_cxx12_Lock_policyE2EE, i64 16), ptr %call5.i.i.i16.i.i.i.i.i, align 8, !tbaa !4, !noalias !23 - %_M_impl.i.i.i.i.i.i.i = getelementptr inbounds i8, ptr %call5.i.i.i16.i.i.i.i.i, i64 16 + %_M_impl.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %call5.i.i.i16.i.i.i.i.i, i64 16 store i32 42, ptr %_M_impl.i.i.i.i.i.i.i, align 4, !tbaa !27, !noalias !23 store ptr %call5.i.i.i16.i.i.i.i.i, ptr %_M_refcount.i.i.i.i, align 8, !tbaa !28, !alias.scope !23 store ptr %_M_impl.i.i.i.i.i.i.i, ptr %resource, align 8, !tbaa !30, !alias.scope !23 @@ -320,7 +320,7 @@ if.else34: ; preds = %invoke.cont28 invoke.cont37: ; preds = %if.else34 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %ref.tmp38) #14 - %message_.i.i = getelementptr inbounds i8, ptr %gtest_ar, i64 8 + %message_.i.i = getelementptr inbounds nuw i8, ptr %gtest_ar, i64 8 %2 = load ptr, ptr %message_.i.i, align 8, !tbaa !30 %cmp.not.i.i100 = icmp eq ptr %2, null br i1 %cmp.not.i.i100, label %invoke.cont40, label %cond.true.i.i @@ -347,7 +347,7 @@ invoke.cont44: ; preds = %invoke.cont42 _ZNKSt14default_deleteINSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEEEclEPS5_.exit.i.i102: ; preds = %invoke.cont44 %vtable.i.i.i103 = load ptr, ptr %4, align 8, !tbaa !4 - %vfn.i.i.i104 = getelementptr inbounds i8, ptr %vtable.i.i.i103, i64 8 + %vfn.i.i.i104 = getelementptr inbounds nuw i8, ptr %vtable.i.i.i103, i64 8 %5 = load ptr, ptr %vfn.i.i.i104, align 8 call void %5(ptr noundef nonnull align 8 dereferenceable(128) %4) #14 br label %_ZN7testing7MessageD2Ev.exit105 @@ -381,7 +381,7 @@ ehcleanup46: ; preds = %lpad43, %lpad39 _ZNKSt14default_deleteINSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEEEclEPS5_.exit.i.i107: ; preds = %ehcleanup46 %vtable.i.i.i108 = load ptr, ptr %9, align 8, !tbaa !4 - %vfn.i.i.i109 = getelementptr inbounds i8, ptr %vtable.i.i.i108, i64 8 + %vfn.i.i.i109 = getelementptr inbounds nuw i8, ptr %vtable.i.i.i108, i64 8 %10 = load ptr, ptr %vfn.i.i.i109, align 8 call void %10(ptr noundef nonnull align 8 dereferenceable(128) %9) #14 br label %ehcleanup48 @@ -393,19 +393,19 @@ ehcleanup48: ; preds = %_ZNKSt14default_del br label %ehcleanup57 cleanup50: ; preds = %_ZN7testing7MessageD2Ev.exit105, %invoke.cont28 - %message_.i111 = getelementptr inbounds i8, ptr %gtest_ar, i64 8 + %message_.i111 = getelementptr inbounds nuw i8, ptr %gtest_ar, i64 8 %11 = load ptr, ptr %message_.i111, align 8, !tbaa !30 %cmp.not.i.i112 = icmp eq ptr %11, null br i1 %cmp.not.i.i112, label %if.then.i.i122, label %delete.notnull.i.i.i113 delete.notnull.i.i.i113: ; preds = %cleanup50 %12 = load ptr, ptr %11, align 8, !tbaa !42 - %13 = getelementptr inbounds i8, ptr %11, i64 16 + %13 = getelementptr inbounds nuw i8, ptr %11, i64 16 %cmp.i.i.i.i.i.i114 = icmp eq ptr %12, %13 br i1 %cmp.i.i.i.i.i.i114, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i.i.i.i117, label %if.then.i.i.i.i.i115 _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i.i.i.i117: ; preds = %delete.notnull.i.i.i113 - %_M_string_length.i.i.i.i.i.i118 = getelementptr inbounds i8, ptr %11, i64 8 + %_M_string_length.i.i.i.i.i.i118 = getelementptr inbounds nuw i8, ptr %11, i64 8 %14 = load i64, ptr %_M_string_length.i.i.i.i.i.i118, align 8, !tbaa !45 %cmp3.i.i.i.i.i.i119 = icmp ult i64 %14, 16 call void @llvm.assume(i1 %cmp3.i.i.i.i.i.i119) @@ -430,11 +430,11 @@ if.then.i.i.i: ; preds = %if.then.i.i122 store i32 0, ptr %_M_use_count.i.i.i.i.i.i.i, align 8, !tbaa !24 store i32 0, ptr %_M_weak_count.i.i.i.i.i.i.i, align 4, !tbaa !26 %vtable.i.i.i124 = load ptr, ptr %call5.i.i.i16.i.i.i.i.i, align 8, !tbaa !4 - %vfn.i.i.i125 = getelementptr inbounds i8, ptr %vtable.i.i.i124, i64 16 + %vfn.i.i.i125 = getelementptr inbounds nuw i8, ptr %vtable.i.i.i124, i64 16 %17 = load ptr, ptr %vfn.i.i.i125, align 8 call void %17(ptr noundef nonnull align 8 dereferenceable(16) %call5.i.i.i16.i.i.i.i.i) #14 %vtable3.i.i.i = load ptr, ptr %call5.i.i.i16.i.i.i.i.i, align 8, !tbaa !4 - %vfn4.i.i.i = getelementptr inbounds i8, ptr %vtable3.i.i.i, i64 24 + %vfn4.i.i.i = getelementptr inbounds nuw i8, ptr %vtable3.i.i.i, i64 24 %18 = load ptr, ptr %vfn4.i.i.i, align 8 call void %18(ptr noundef nonnull align 8 dereferenceable(16) %call5.i.i.i16.i.i.i.i.i) #14 br label %_ZNSt12__shared_ptrIiLN9__gnu_cxx12_Lock_policyE2EED2Ev.exit @@ -486,19 +486,19 @@ declare void @_ZN7testing8internal12AssertHelperD1Ev(ptr noundef nonnull align 8 ; Function Attrs: inlinehint mustprogress nounwind uwtable define linkonce_odr dso_local void @_ZN7testing15AssertionResultD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %this) unnamed_addr #7 comdat align 2 personality ptr @__gxx_personality_v0 { entry: - %message_ = getelementptr inbounds i8, ptr %this, i64 8 + %message_ = getelementptr inbounds nuw i8, ptr %this, i64 8 %0 = load ptr, ptr %message_, align 8, !tbaa !30 %cmp.not.i = icmp eq ptr %0, null br i1 %cmp.not.i, label %_ZNSt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EED2Ev.exit, label %delete.notnull.i.i delete.notnull.i.i: ; preds = %entry %1 = load ptr, ptr %0, align 8, !tbaa !42 - %2 = getelementptr inbounds i8, ptr %0, i64 16 + %2 = getelementptr inbounds nuw i8, ptr %0, i64 16 %cmp.i.i.i.i.i = icmp eq ptr %1, %2 br i1 %cmp.i.i.i.i.i, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i.i.i, label %if.then.i.i.i.i _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i.i.i: ; preds = %delete.notnull.i.i - %_M_string_length.i.i.i.i.i = getelementptr inbounds i8, ptr %0, i64 8 + %_M_string_length.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %0, i64 8 %3 = load i64, ptr %_M_string_length.i.i.i.i.i, align 8, !tbaa !45 %cmp3.i.i.i.i.i = icmp ult i64 %3, 16 tail call void @llvm.assume(i1 %cmp3.i.i.i.i.i) @@ -520,13 +520,13 @@ _ZNSt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14defaul ; Function Attrs: mustprogress nounwind uwtable define linkonce_odr dso_local void @_ZNSt12__shared_ptrIiLN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %this) unnamed_addr #8 comdat align 2 personality ptr @__gxx_personality_v0 { entry: - %_M_refcount = getelementptr inbounds i8, ptr %this, i64 8 + %_M_refcount = getelementptr inbounds nuw i8, ptr %this, i64 8 %0 = load ptr, ptr %_M_refcount, align 8, !tbaa !28 %cmp.not.i = icmp eq ptr %0, null br i1 %cmp.not.i, label %_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev.exit, label %if.then.i if.then.i: ; preds = %entry - %_M_use_count.i.i = getelementptr inbounds i8, ptr %0, i64 8 + %_M_use_count.i.i = getelementptr inbounds nuw i8, ptr %0, i64 8 %1 = load atomic i64, ptr %_M_use_count.i.i acquire, align 8 %cmp.i.i = icmp eq i64 %1, 4294967297 %2 = trunc i64 %1 to i32 @@ -534,14 +534,14 @@ if.then.i: ; preds = %entry if.then.i.i: ; preds = %if.then.i store i32 0, ptr %_M_use_count.i.i, align 8, !tbaa !24 - %_M_weak_count.i.i = getelementptr inbounds i8, ptr %0, i64 12 + %_M_weak_count.i.i = getelementptr inbounds nuw i8, ptr %0, i64 12 store i32 0, ptr %_M_weak_count.i.i, align 4, !tbaa !26 %vtable.i.i = load ptr, ptr %0, align 8, !tbaa !4 - %vfn.i.i = getelementptr inbounds i8, ptr %vtable.i.i, i64 16 + %vfn.i.i = getelementptr inbounds nuw i8, ptr %vtable.i.i, i64 16 %3 = load ptr, ptr %vfn.i.i, align 8 tail call void %3(ptr noundef nonnull align 8 dereferenceable(16) %0) #14 %vtable3.i.i = load ptr, ptr %0, align 8, !tbaa !4 - %vfn4.i.i = getelementptr inbounds i8, ptr %vtable3.i.i, i64 24 + %vfn4.i.i = getelementptr inbounds nuw i8, ptr %vtable3.i.i, i64 24 %4 = load ptr, ptr %vfn4.i.i, align 8 tail call void %4(ptr noundef nonnull align 8 dereferenceable(16) %0) #14 br label %_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev.exit @@ -636,10 +636,10 @@ declare void @_ZN7testing4TestC2Ev(ptr noundef nonnull align 8 dereferenceable(1 define linkonce_odr dso_local void @_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE24_M_release_last_use_coldEv(ptr noundef nonnull align 8 dereferenceable(16) %this) local_unnamed_addr #8 comdat align 2 personality ptr @__gxx_personality_v0 { entry: %vtable.i = load ptr, ptr %this, align 8, !tbaa !4 - %vfn.i = getelementptr inbounds i8, ptr %vtable.i, i64 16 + %vfn.i = getelementptr inbounds nuw i8, ptr %vtable.i, i64 16 %0 = load ptr, ptr %vfn.i, align 8 tail call void %0(ptr noundef nonnull align 8 dereferenceable(16) %this) #14 - %_M_weak_count.i = getelementptr inbounds i8, ptr %this, i64 12 + %_M_weak_count.i = getelementptr inbounds nuw i8, ptr %this, i64 12 %1 = load i8, ptr @__libc_single_threaded, align 1, !tbaa !46 %tobool.i.not.i = icmp eq i8 %1, 0 br i1 %tobool.i.not.i, label %if.else.i.i, label %if.then.i.i @@ -661,7 +661,7 @@ invoke.cont.i: ; preds = %if.else.i.i, %if.th if.then.i: ; preds = %invoke.cont.i %vtable2.i = load ptr, ptr %this, align 8, !tbaa !4 - %vfn3.i = getelementptr inbounds i8, ptr %vtable2.i, i64 24 + %vfn3.i = getelementptr inbounds nuw i8, ptr %vtable2.i, i64 24 %4 = load ptr, ptr %vfn3.i, align 8 tail call void %4(ptr noundef nonnull align 8 dereferenceable(16) %this) #14 br label %_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE19_M_release_last_useEv.exit @@ -715,12 +715,12 @@ _ZNSt15__allocated_ptrISaISt23_Sp_counted_ptr_inplaceIiSaIvELN9__gnu_cxx12_Lock_ ; Function Attrs: mustprogress nounwind uwtable define linkonce_odr dso_local noundef ptr @_ZNSt23_Sp_counted_ptr_inplaceIiSaIvELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info(ptr noundef nonnull align 8 dereferenceable(24) %this, ptr noundef nonnull align 8 dereferenceable(16) %__ti) unnamed_addr #8 comdat align 2 { entry: - %_M_impl.i = getelementptr inbounds i8, ptr %this, i64 16 + %_M_impl.i = getelementptr inbounds nuw i8, ptr %this, i64 16 %cmp = icmp eq ptr %__ti, @_ZZNSt19_Sp_make_shared_tag5_S_tiEvE5__tag br i1 %cmp, label %cleanup, label %lor.lhs.false lor.lhs.false: ; preds = %entry - %__name.i = getelementptr inbounds i8, ptr %__ti, i64 8 + %__name.i = getelementptr inbounds nuw i8, ptr %__ti, i64 8 %0 = load ptr, ptr %__name.i, align 8, !tbaa !48 %cmp.i = icmp eq ptr %0, @_ZTSSt19_Sp_make_shared_tag br i1 %cmp.i, label %_ZNKSt9type_infoeqERKS_.exit.thread, label %if.end.i @@ -760,7 +760,7 @@ entry: %0 = tail call i32 @__cxa_atexit(ptr nonnull @_ZNSt8ios_base4InitD1Ev, ptr nonnull @_ZStL8__ioinit, ptr nonnull @__dso_handle) #14 call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %agg.tmp.i) call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %ref.tmp.i) #14 - %1 = getelementptr inbounds i8, ptr %ref.tmp.i, i64 16 + %1 = getelementptr inbounds nuw i8, ptr %ref.tmp.i, i64 16 store ptr %1, ptr %ref.tmp.i, align 8, !tbaa !50 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %__dnew.i.i.i) #14 store i64 125, ptr %__dnew.i.i.i, align 8, !tbaa !51 @@ -769,12 +769,12 @@ entry: %2 = load i64, ptr %__dnew.i.i.i, align 8, !tbaa !51 store i64 %2, ptr %1, align 8, !tbaa !46 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(125) %call2.i11.i24.i, ptr noundef nonnull align 1 dereferenceable(125) @.str.3, i64 125, i1 false) - %_M_string_length.i.i.i.i.i = getelementptr inbounds i8, ptr %ref.tmp.i, i64 8 + %_M_string_length.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %ref.tmp.i, i64 8 store i64 %2, ptr %_M_string_length.i.i.i.i.i, align 8, !tbaa !45 %arrayidx.i.i.i.i = getelementptr inbounds i8, ptr %call2.i11.i24.i, i64 %2 store i8 0, ptr %arrayidx.i.i.i.i, align 1, !tbaa !46 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %__dnew.i.i.i) #14 - %3 = getelementptr inbounds i8, ptr %agg.tmp.i, i64 16 + %3 = getelementptr inbounds nuw i8, ptr %agg.tmp.i, i64 16 store ptr %3, ptr %agg.tmp.i, align 8, !tbaa !50 %4 = load ptr, ptr %ref.tmp.i, align 8, !tbaa !42 %5 = load i64, ptr %_M_string_length.i.i.i.i.i, align 8, !tbaa !45 @@ -811,13 +811,13 @@ if.end.i.i.i.i.i.i.i: ; preds = %if.end.i.i.i.i invoke.cont3.i: ; preds = %if.end.i.i.i.i.i.i.i, %if.then.i.i.i.i.i.i, %if.end.i.i.i.i %9 = load i64, ptr %__dnew.i.i.i.i, align 8, !tbaa !51 - %_M_string_length.i.i.i.i.i.i = getelementptr inbounds i8, ptr %agg.tmp.i, i64 8 + %_M_string_length.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %agg.tmp.i, i64 8 store i64 %9, ptr %_M_string_length.i.i.i.i.i.i, align 8, !tbaa !45 %10 = load ptr, ptr %agg.tmp.i, align 8, !tbaa !42 %arrayidx.i.i.i.i.i = getelementptr inbounds i8, ptr %10, i64 %9 store i8 0, ptr %arrayidx.i.i.i.i.i, align 1, !tbaa !46 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %__dnew.i.i.i.i) #14 - %line.i.i = getelementptr inbounds i8, ptr %agg.tmp.i, i64 32 + %line.i.i = getelementptr inbounds nuw i8, ptr %agg.tmp.i, i64 32 store i32 5, ptr %line.i.i, align 8, !tbaa !52 %call.i = invoke noundef ptr @_ZN7testing8internal13GetTestTypeIdEv() to label %invoke.cont5.i unwind label %lpad4.i diff --git a/bench/faiss/optimized/utils.cpp.ll b/bench/faiss/optimized/utils.cpp.ll index 4711ac99e47..b19a0e9a5d2 100644 --- a/bench/faiss/optimized/utils.cpp.ll +++ b/bench/faiss/optimized/utils.cpp.ll @@ -81,20 +81,20 @@ $_ZNSt8_Rb_treeISt6vectorIhSaIhEES2_St9_IdentityIS2_ESt4lessIS2_ESaIS2_EE24_M_ge define weak_odr void @_ZN5faiss16CombinerRangeKNNIfEC2Elmfb(ptr noundef nonnull align 8 dereferenceable(80) %0, i64 noundef %1, i64 noundef %2, float noundef %3, i1 noundef zeroext %4) unnamed_addr #0 comdat($_ZN5faiss16CombinerRangeKNNIfEC5Elmfb) align 2 { %6 = zext i1 %4 to i8 store i64 %1, ptr %0, align 8 - %7 = getelementptr inbounds i8, ptr %0, i64 8 + %7 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 %2, ptr %7, align 8 - %8 = getelementptr inbounds i8, ptr %0, i64 16 + %8 = getelementptr inbounds nuw i8, ptr %0, i64 16 store float %3, ptr %8, align 8 - %9 = getelementptr inbounds i8, ptr %0, i64 20 + %9 = getelementptr inbounds nuw i8, ptr %0, i64 20 store i8 %6, ptr %9, align 4 - %10 = getelementptr inbounds i8, ptr %0, i64 24 + %10 = getelementptr inbounds nuw i8, ptr %0, i64 24 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(56) %10, i8 0, i64 56, i1 false) ret void } ; Function Attrs: mustprogress uwtable define weak_odr void @_ZN5faiss16CombinerRangeKNNIfE13compute_sizesEPl(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef %1) local_unnamed_addr #1 comdat align 2 { - %3 = getelementptr inbounds i8, ptr %0, i64 72 + %3 = getelementptr inbounds nuw i8, ptr %0, i64 72 store ptr %1, ptr %3, align 8 store i64 0, ptr %1, align 8 %4 = load i64, ptr %0, align 8 @@ -102,21 +102,17 @@ define weak_odr void @_ZN5faiss16CombinerRangeKNNIfE13compute_sizesEPl(ptr nound br i1 %5, label %.lr.ph, label %._crit_edge .lr.ph: ; preds = %2 - %6 = getelementptr inbounds i8, ptr %0, i64 40 - %7 = getelementptr inbounds i8, ptr %0, i64 48 - %8 = getelementptr inbounds i8, ptr %0, i64 32 - %9 = getelementptr inbounds i8, ptr %0, i64 8 - %10 = getelementptr inbounds i8, ptr %0, i64 20 - %11 = getelementptr inbounds i8, ptr %0, i64 16 + %6 = getelementptr inbounds nuw i8, ptr %0, i64 40 + %7 = getelementptr inbounds nuw i8, ptr %0, i64 48 + %8 = getelementptr inbounds nuw i8, ptr %0, i64 32 + %9 = getelementptr inbounds nuw i8, ptr %0, i64 8 + %10 = getelementptr inbounds nuw i8, ptr %0, i64 20 + %11 = getelementptr inbounds nuw i8, ptr %0, i64 16 br label %13 .preheader: ; preds = %_ZN5faiss12_GLOBAL__N_18count_gtIfEEllPKT_S2_.exit %12 = icmp sgt i64 %50, 0 - br i1 %12, label %.lr.ph34.preheader, label %._crit_edge - -.lr.ph34.preheader: ; preds = %.preheader - %.pre = load i64, ptr %1, align 8 - br label %.lr.ph34 + br i1 %12, label %.lr.ph34, label %._crit_edge 13: ; preds = %.lr.ph, %_ZN5faiss12_GLOBAL__N_18count_gtIfEEllPKT_S2_.exit %.02032 = phi i64 [ 0, %.lr.ph ], [ %.1, %_ZN5faiss12_GLOBAL__N_18count_gtIfEEllPKT_S2_.exit ] @@ -126,7 +122,7 @@ define weak_odr void @_ZN5faiss16CombinerRangeKNNIfE13compute_sizesEPl(ptr nound br i1 %.not, label %19, label %15 15: ; preds = %13 - %16 = getelementptr inbounds i8, ptr %14, i64 %.02230 + %16 = getelementptr inbounds nuw i8, ptr %14, i64 %.02230 %17 = load i8, ptr %16, align 1 %18 = trunc i8 %17 to i1 br i1 %18, label %40, label %19 @@ -147,7 +143,7 @@ define weak_odr void @_ZN5faiss16CombinerRangeKNNIfE13compute_sizesEPl(ptr nound .lr.ph.i: ; preds = %28, %32 %.010.i = phi i64 [ %33, %32 ], [ 0, %28 ] - %29 = getelementptr inbounds float, ptr %23, i64 %.010.i + %29 = getelementptr inbounds nuw float, ptr %23, i64 %.010.i %30 = load float, ptr %29, align 4 %31 = fcmp ogt float %30, %26 br i1 %31, label %32, label %_ZN5faiss12_GLOBAL__N_18count_gtIfEEllPKT_S2_.exit @@ -162,7 +158,7 @@ define weak_odr void @_ZN5faiss16CombinerRangeKNNIfE13compute_sizesEPl(ptr nound .lr.ph.i25: ; preds = %34, %38 %.010.i26 = phi i64 [ %39, %38 ], [ 0, %34 ] - %35 = getelementptr inbounds float, ptr %23, i64 %.010.i26 + %35 = getelementptr inbounds nuw float, ptr %23, i64 %.010.i26 %36 = load float, ptr %35, align 4 %37 = fcmp olt float %36, %26 br i1 %37, label %38, label %_ZN5faiss12_GLOBAL__N_18count_gtIfEEllPKT_S2_.exit @@ -186,17 +182,17 @@ _ZN5faiss12_GLOBAL__N_18count_gtIfEEllPKT_S2_.exit: ; preds = %38, %.lr.ph.i25, %.021 = phi i64 [ %47, %40 ], [ %21, %28 ], [ %21, %34 ], [ %.010.i, %.lr.ph.i ], [ %21, %32 ], [ %.010.i26, %.lr.ph.i25 ], [ %21, %38 ] %.1 = phi i64 [ %42, %40 ], [ %.02032, %28 ], [ %.02032, %34 ], [ %.02032, %.lr.ph.i ], [ %.02032, %32 ], [ %.02032, %.lr.ph.i25 ], [ %.02032, %38 ] %48 = add nuw nsw i64 %.02230, 1 - %49 = getelementptr inbounds i64, ptr %1, i64 %48 + %49 = getelementptr inbounds nuw i64, ptr %1, i64 %48 store i64 %.021, ptr %49, align 8 %50 = load i64, ptr %0, align 8 %51 = icmp slt i64 %48, %50 br i1 %51, label %13, label %.preheader, !llvm.loop !8 -.lr.ph34: ; preds = %.lr.ph34.preheader, %.lr.ph34 - %52 = phi i64 [ %56, %.lr.ph34 ], [ %.pre, %.lr.ph34.preheader ] - %.033 = phi i64 [ %53, %.lr.ph34 ], [ 0, %.lr.ph34.preheader ] +.lr.ph34: ; preds = %.preheader, %.lr.ph34 + %52 = phi i64 [ %56, %.lr.ph34 ], [ 0, %.preheader ] + %.033 = phi i64 [ %53, %.lr.ph34 ], [ 0, %.preheader ] %53 = add nuw nsw i64 %.033, 1 - %54 = getelementptr inbounds i64, ptr %1, i64 %53 + %54 = getelementptr inbounds nuw i64, ptr %1, i64 %53 %55 = load i64, ptr %54, align 8 %56 = add nsw i64 %55, %52 store i64 %56, ptr %54, align 8 @@ -211,7 +207,7 @@ _ZN5faiss12_GLOBAL__N_18count_gtIfEEllPKT_S2_.exit: ; preds = %38, %.lr.ph.i25, ; Function Attrs: mustprogress uwtable define weak_odr void @_ZN5faiss16CombinerRangeKNNIfE12write_resultEPfPl(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #1 comdat align 2 personality ptr @__gxx_personality_v0 { %4 = alloca %"class.std::__cxx11::basic_string", align 8 - %5 = getelementptr inbounds i8, ptr %0, i64 72 + %5 = getelementptr inbounds nuw i8, ptr %0, i64 72 %6 = load ptr, ptr %5, align 8 %.not = icmp eq ptr %6, null br i1 %.not, label %16, label %.preheader @@ -222,13 +218,13 @@ define weak_odr void @_ZN5faiss16CombinerRangeKNNIfE12write_resultEPfPl(ptr noun br i1 %8, label %.lr.ph, label %._crit_edge .lr.ph: ; preds = %.preheader - %9 = getelementptr inbounds i8, ptr %0, i64 40 - %10 = getelementptr inbounds i8, ptr %0, i64 56 - %11 = getelementptr inbounds i8, ptr %0, i64 48 - %12 = getelementptr inbounds i8, ptr %0, i64 64 - %13 = getelementptr inbounds i8, ptr %0, i64 32 - %14 = getelementptr inbounds i8, ptr %0, i64 8 - %15 = getelementptr inbounds i8, ptr %0, i64 24 + %9 = getelementptr inbounds nuw i8, ptr %0, i64 40 + %10 = getelementptr inbounds nuw i8, ptr %0, i64 56 + %11 = getelementptr inbounds nuw i8, ptr %0, i64 48 + %12 = getelementptr inbounds nuw i8, ptr %0, i64 64 + %13 = getelementptr inbounds nuw i8, ptr %0, i64 32 + %14 = getelementptr inbounds nuw i8, ptr %0, i64 8 + %15 = getelementptr inbounds nuw i8, ptr %0, i64 24 br label %32 16: ; preds = %3 @@ -275,9 +271,9 @@ define weak_odr void @_ZN5faiss16CombinerRangeKNNIfE12write_resultEPfPl(ptr noun %.02731 = phi i64 [ 0, %.lr.ph ], [ %34, %72 ] %33 = load ptr, ptr %5, align 8 %34 = add nuw nsw i64 %.02731, 1 - %35 = getelementptr inbounds i64, ptr %33, i64 %34 + %35 = getelementptr inbounds nuw i64, ptr %33, i64 %34 %36 = load i64, ptr %35, align 8 - %37 = getelementptr inbounds i64, ptr %33, i64 %.02731 + %37 = getelementptr inbounds nuw i64, ptr %33, i64 %.02731 %38 = load i64, ptr %37, align 8 %39 = sub nsw i64 %36, %38 %40 = getelementptr inbounds float, ptr %1, i64 %38 @@ -287,7 +283,7 @@ define weak_odr void @_ZN5faiss16CombinerRangeKNNIfE12write_resultEPfPl(ptr noun br i1 %.not30, label %47, label %43 43: ; preds = %32 - %44 = getelementptr inbounds i8, ptr %42, i64 %.02731 + %44 = getelementptr inbounds nuw i8, ptr %42, i64 %.02731 %45 = load i8, ptr %44, align 1 %46 = trunc i8 %45 to i1 br i1 %46, label %58, label %47 @@ -362,7 +358,7 @@ declare void @__cxa_free_exception(ptr) local_unnamed_addr ; Function Attrs: mustprogress nounwind uwtable define linkonce_odr void @_ZN5faiss14FaissExceptionD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %0) unnamed_addr #0 comdat align 2 { store ptr getelementptr inbounds (i8, ptr @_ZTVN5faiss14FaissExceptionE, i64 16), ptr %0, align 8 - %2 = getelementptr inbounds i8, ptr %0, i64 8 + %2 = getelementptr inbounds nuw i8, ptr %0, i64 8 tail call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #17 tail call void @_ZNSt9exceptionD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #17 ret void @@ -384,20 +380,20 @@ declare void @_ZNSt9exceptionD2Ev(ptr noundef nonnull align 8 dereferenceable(8) define weak_odr void @_ZN5faiss16CombinerRangeKNNIsEC2Elmsb(ptr noundef nonnull align 8 dereferenceable(80) %0, i64 noundef %1, i64 noundef %2, i16 noundef signext %3, i1 noundef zeroext %4) unnamed_addr #0 comdat($_ZN5faiss16CombinerRangeKNNIsEC5Elmsb) align 2 { %6 = zext i1 %4 to i8 store i64 %1, ptr %0, align 8 - %7 = getelementptr inbounds i8, ptr %0, i64 8 + %7 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 %2, ptr %7, align 8 - %8 = getelementptr inbounds i8, ptr %0, i64 16 + %8 = getelementptr inbounds nuw i8, ptr %0, i64 16 store i16 %3, ptr %8, align 8 - %9 = getelementptr inbounds i8, ptr %0, i64 18 + %9 = getelementptr inbounds nuw i8, ptr %0, i64 18 store i8 %6, ptr %9, align 2 - %10 = getelementptr inbounds i8, ptr %0, i64 24 + %10 = getelementptr inbounds nuw i8, ptr %0, i64 24 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(56) %10, i8 0, i64 56, i1 false) ret void } ; Function Attrs: mustprogress uwtable define weak_odr void @_ZN5faiss16CombinerRangeKNNIsE13compute_sizesEPl(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef %1) local_unnamed_addr #1 comdat align 2 { - %3 = getelementptr inbounds i8, ptr %0, i64 72 + %3 = getelementptr inbounds nuw i8, ptr %0, i64 72 store ptr %1, ptr %3, align 8 store i64 0, ptr %1, align 8 %4 = load i64, ptr %0, align 8 @@ -405,21 +401,17 @@ define weak_odr void @_ZN5faiss16CombinerRangeKNNIsE13compute_sizesEPl(ptr nound br i1 %5, label %.lr.ph, label %._crit_edge .lr.ph: ; preds = %2 - %6 = getelementptr inbounds i8, ptr %0, i64 40 - %7 = getelementptr inbounds i8, ptr %0, i64 48 - %8 = getelementptr inbounds i8, ptr %0, i64 32 - %9 = getelementptr inbounds i8, ptr %0, i64 8 - %10 = getelementptr inbounds i8, ptr %0, i64 18 - %11 = getelementptr inbounds i8, ptr %0, i64 16 + %6 = getelementptr inbounds nuw i8, ptr %0, i64 40 + %7 = getelementptr inbounds nuw i8, ptr %0, i64 48 + %8 = getelementptr inbounds nuw i8, ptr %0, i64 32 + %9 = getelementptr inbounds nuw i8, ptr %0, i64 8 + %10 = getelementptr inbounds nuw i8, ptr %0, i64 18 + %11 = getelementptr inbounds nuw i8, ptr %0, i64 16 br label %13 .preheader: ; preds = %_ZN5faiss12_GLOBAL__N_18count_gtIsEEllPKT_S2_.exit %12 = icmp sgt i64 %50, 0 - br i1 %12, label %.lr.ph34.preheader, label %._crit_edge - -.lr.ph34.preheader: ; preds = %.preheader - %.pre = load i64, ptr %1, align 8 - br label %.lr.ph34 + br i1 %12, label %.lr.ph34, label %._crit_edge 13: ; preds = %.lr.ph, %_ZN5faiss12_GLOBAL__N_18count_gtIsEEllPKT_S2_.exit %.02032 = phi i64 [ 0, %.lr.ph ], [ %.1, %_ZN5faiss12_GLOBAL__N_18count_gtIsEEllPKT_S2_.exit ] @@ -429,7 +421,7 @@ define weak_odr void @_ZN5faiss16CombinerRangeKNNIsE13compute_sizesEPl(ptr nound br i1 %.not, label %19, label %15 15: ; preds = %13 - %16 = getelementptr inbounds i8, ptr %14, i64 %.02230 + %16 = getelementptr inbounds nuw i8, ptr %14, i64 %.02230 %17 = load i8, ptr %16, align 1 %18 = trunc i8 %17 to i1 br i1 %18, label %40, label %19 @@ -450,7 +442,7 @@ define weak_odr void @_ZN5faiss16CombinerRangeKNNIsE13compute_sizesEPl(ptr nound .lr.ph.i: ; preds = %28, %32 %.010.i = phi i64 [ %33, %32 ], [ 0, %28 ] - %29 = getelementptr inbounds i16, ptr %23, i64 %.010.i + %29 = getelementptr inbounds nuw i16, ptr %23, i64 %.010.i %30 = load i16, ptr %29, align 2 %31 = icmp sgt i16 %30, %26 br i1 %31, label %32, label %_ZN5faiss12_GLOBAL__N_18count_gtIsEEllPKT_S2_.exit @@ -465,7 +457,7 @@ define weak_odr void @_ZN5faiss16CombinerRangeKNNIsE13compute_sizesEPl(ptr nound .lr.ph.i25: ; preds = %34, %38 %.010.i26 = phi i64 [ %39, %38 ], [ 0, %34 ] - %35 = getelementptr inbounds i16, ptr %23, i64 %.010.i26 + %35 = getelementptr inbounds nuw i16, ptr %23, i64 %.010.i26 %36 = load i16, ptr %35, align 2 %37 = icmp slt i16 %36, %26 br i1 %37, label %38, label %_ZN5faiss12_GLOBAL__N_18count_gtIsEEllPKT_S2_.exit @@ -489,17 +481,17 @@ _ZN5faiss12_GLOBAL__N_18count_gtIsEEllPKT_S2_.exit: ; preds = %38, %.lr.ph.i25, %.021 = phi i64 [ %47, %40 ], [ %21, %28 ], [ %21, %34 ], [ %.010.i, %.lr.ph.i ], [ %21, %32 ], [ %.010.i26, %.lr.ph.i25 ], [ %21, %38 ] %.1 = phi i64 [ %42, %40 ], [ %.02032, %28 ], [ %.02032, %34 ], [ %.02032, %.lr.ph.i ], [ %.02032, %32 ], [ %.02032, %.lr.ph.i25 ], [ %.02032, %38 ] %48 = add nuw nsw i64 %.02230, 1 - %49 = getelementptr inbounds i64, ptr %1, i64 %48 + %49 = getelementptr inbounds nuw i64, ptr %1, i64 %48 store i64 %.021, ptr %49, align 8 %50 = load i64, ptr %0, align 8 %51 = icmp slt i64 %48, %50 br i1 %51, label %13, label %.preheader, !llvm.loop !13 -.lr.ph34: ; preds = %.lr.ph34.preheader, %.lr.ph34 - %52 = phi i64 [ %56, %.lr.ph34 ], [ %.pre, %.lr.ph34.preheader ] - %.033 = phi i64 [ %53, %.lr.ph34 ], [ 0, %.lr.ph34.preheader ] +.lr.ph34: ; preds = %.preheader, %.lr.ph34 + %52 = phi i64 [ %56, %.lr.ph34 ], [ 0, %.preheader ] + %.033 = phi i64 [ %53, %.lr.ph34 ], [ 0, %.preheader ] %53 = add nuw nsw i64 %.033, 1 - %54 = getelementptr inbounds i64, ptr %1, i64 %53 + %54 = getelementptr inbounds nuw i64, ptr %1, i64 %53 %55 = load i64, ptr %54, align 8 %56 = add nsw i64 %55, %52 store i64 %56, ptr %54, align 8 @@ -514,7 +506,7 @@ _ZN5faiss12_GLOBAL__N_18count_gtIsEEllPKT_S2_.exit: ; preds = %38, %.lr.ph.i25, ; Function Attrs: mustprogress uwtable define weak_odr void @_ZN5faiss16CombinerRangeKNNIsE12write_resultEPsPl(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #1 comdat align 2 personality ptr @__gxx_personality_v0 { %4 = alloca %"class.std::__cxx11::basic_string", align 8 - %5 = getelementptr inbounds i8, ptr %0, i64 72 + %5 = getelementptr inbounds nuw i8, ptr %0, i64 72 %6 = load ptr, ptr %5, align 8 %.not = icmp eq ptr %6, null br i1 %.not, label %16, label %.preheader @@ -525,13 +517,13 @@ define weak_odr void @_ZN5faiss16CombinerRangeKNNIsE12write_resultEPsPl(ptr noun br i1 %8, label %.lr.ph, label %._crit_edge .lr.ph: ; preds = %.preheader - %9 = getelementptr inbounds i8, ptr %0, i64 40 - %10 = getelementptr inbounds i8, ptr %0, i64 56 - %11 = getelementptr inbounds i8, ptr %0, i64 48 - %12 = getelementptr inbounds i8, ptr %0, i64 64 - %13 = getelementptr inbounds i8, ptr %0, i64 32 - %14 = getelementptr inbounds i8, ptr %0, i64 8 - %15 = getelementptr inbounds i8, ptr %0, i64 24 + %9 = getelementptr inbounds nuw i8, ptr %0, i64 40 + %10 = getelementptr inbounds nuw i8, ptr %0, i64 56 + %11 = getelementptr inbounds nuw i8, ptr %0, i64 48 + %12 = getelementptr inbounds nuw i8, ptr %0, i64 64 + %13 = getelementptr inbounds nuw i8, ptr %0, i64 32 + %14 = getelementptr inbounds nuw i8, ptr %0, i64 8 + %15 = getelementptr inbounds nuw i8, ptr %0, i64 24 br label %32 16: ; preds = %3 @@ -578,9 +570,9 @@ define weak_odr void @_ZN5faiss16CombinerRangeKNNIsE12write_resultEPsPl(ptr noun %.02731 = phi i64 [ 0, %.lr.ph ], [ %34, %72 ] %33 = load ptr, ptr %5, align 8 %34 = add nuw nsw i64 %.02731, 1 - %35 = getelementptr inbounds i64, ptr %33, i64 %34 + %35 = getelementptr inbounds nuw i64, ptr %33, i64 %34 %36 = load i64, ptr %35, align 8 - %37 = getelementptr inbounds i64, ptr %33, i64 %.02731 + %37 = getelementptr inbounds nuw i64, ptr %33, i64 %.02731 %38 = load i64, ptr %37, align 8 %39 = sub nsw i64 %36, %38 %40 = getelementptr inbounds i16, ptr %1, i64 %38 @@ -590,7 +582,7 @@ define weak_odr void @_ZN5faiss16CombinerRangeKNNIsE12write_resultEPsPl(ptr noun br i1 %.not30, label %47, label %43 43: ; preds = %32 - %44 = getelementptr inbounds i8, ptr %42, i64 %.02731 + %44 = getelementptr inbounds nuw i8, ptr %42, i64 %.02731 %45 = load i8, ptr %44, align 1 %46 = trunc i8 %45 to i1 br i1 %46, label %58, label %47 @@ -674,7 +666,7 @@ define noundef double @_ZN5faiss12getmillisecsEv() local_unnamed_addr #8 { %2 = call i32 @gettimeofday(ptr noundef nonnull %1, ptr noundef null) #17 %3 = load i64, ptr %1, align 8 %4 = sitofp i64 %3 to double - %5 = getelementptr inbounds i8, ptr %1, i64 8 + %5 = getelementptr inbounds nuw i8, ptr %1, i64 8 %6 = load i64, ptr %5, align 8 %7 = sitofp i64 %6 to double %8 = fmul double %7, 1.000000e-03 @@ -1156,7 +1148,7 @@ define void @_ZN5faiss20ranklist_handle_tiesEiPlPKf(i32 noundef %0, ptr noundef %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %19 ] %.01418 = phi i32 [ -1, %.lr.ph.preheader ], [ %.1, %19 ] %.01517 = phi float [ 0xC7D2CED320000000, %.lr.ph.preheader ], [ %.116, %19 ] - %5 = getelementptr inbounds float, ptr %2, i64 %indvars.iv + %5 = getelementptr inbounds nuw float, ptr %2, i64 %indvars.iv %6 = load float, ptr %5, align 4 %7 = fcmp une float %6, %.01517 br i1 %7, label %8, label %19 @@ -1170,7 +1162,7 @@ define void @_ZN5faiss20ranklist_handle_tiesEiPlPKf(i32 noundef %0, ptr noundef 12: ; preds = %8 %13 = sext i32 %.01418 to i64 %14 = getelementptr inbounds i64, ptr %1, i64 %13 - %15 = getelementptr inbounds i64, ptr %1, i64 %indvars.iv + %15 = getelementptr inbounds nuw i64, ptr %1, i64 %indvars.iv tail call void @_ZSt6__sortIPlN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_(ptr noundef %14, ptr noundef %15) %.pre = load float, ptr %5, align 4 br label %16 @@ -1212,7 +1204,7 @@ define linkonce_odr void @_ZSt6__sortIPlN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S .preheader: ; preds = %3, %_ZSt25__unguarded_linear_insertIPlN9__gnu_cxx5__ops14_Val_less_iterEEvT_T0_.exit.i.i %.019.i.idx.i = phi i64 [ %.019.i.add.i, %_ZSt25__unguarded_linear_insertIPlN9__gnu_cxx5__ops14_Val_less_iterEEvT_T0_.exit.i.i ], [ 8, %3 ] %.pn18.i.i = phi ptr [ %.019.i.ptr.i, %_ZSt25__unguarded_linear_insertIPlN9__gnu_cxx5__ops14_Val_less_iterEEvT_T0_.exit.i.i ], [ %0, %3 ] - %.019.i.ptr.i = getelementptr inbounds i8, ptr %0, i64 %.019.i.idx.i + %.019.i.ptr.i = getelementptr inbounds nuw i8, ptr %0, i64 %.019.i.idx.i %12 = load i64, ptr %.019.i.ptr.i, align 8 %13 = load i64, ptr %0, align 8 %14 = icmp slt i64 %12, %13 @@ -1245,7 +1237,7 @@ _ZSt25__unguarded_linear_insertIPlN9__gnu_cxx5__ops14_Val_less_iterEEvT_T0_.exit br i1 %.not.i.i, label %_ZSt16__insertion_sortIPlN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_.exit.i, label %.preheader, !llvm.loop !28 _ZSt16__insertion_sortIPlN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_.exit.i: ; preds = %_ZSt25__unguarded_linear_insertIPlN9__gnu_cxx5__ops14_Val_less_iterEEvT_T0_.exit.i.i - %22 = getelementptr inbounds i8, ptr %0, i64 128 + %22 = getelementptr inbounds nuw i8, ptr %0, i64 128 %.not5.i.i = icmp eq ptr %22, %1 br i1 %.not5.i.i, label %_ZSt22__final_insertion_sortIPlN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_.exit, label %.lr.ph.i.i @@ -1332,7 +1324,7 @@ define linkonce_odr void @_ZSt16__introsort_loopIPllN9__gnu_cxx5__ops15_Iter_les br i1 %8, label %.lr.ph, label %_ZSt14__partial_sortIPlN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_S4_T0_.exit .lr.ph: ; preds = %3 - %9 = getelementptr inbounds i8, ptr %0, i64 8 + %9 = getelementptr inbounds nuw i8, ptr %0, i64 8 br label %10 10: ; preds = %.lr.ph, %_ZSt27__unguarded_partition_pivotIPlN9__gnu_cxx5__ops15_Iter_less_iterEET_S4_S4_T0_.exit @@ -1410,13 +1402,13 @@ define linkonce_odr void @_ZSt16__introsort_loopIPllN9__gnu_cxx5__ops15_Iter_les %.01317.i.i.i.i.i = phi i64 [ %.018.i.i67.i.i.i, %52 ], [ %.128.i.i.i.i, %47 ] %.018.in.i.i.i.i.i = add nsw i64 %.01317.i.i.i.i.i, -1 %.018.i.i67.i.i.i = lshr i64 %.018.in.i.i.i.i.i, 1 - %49 = getelementptr inbounds i64, ptr %0, i64 %.018.i.i67.i.i.i + %49 = getelementptr inbounds nuw i64, ptr %0, i64 %.018.i.i67.i.i.i %50 = load i64, ptr %49, align 8 %51 = icmp slt i64 %50, %15 br i1 %51, label %52, label %_ZSt10__pop_heapIPlN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_S4_RT0_.exit.i.i 52: ; preds = %.lr.ph.i.i.i.i.i - %53 = getelementptr inbounds i64, ptr %0, i64 %.01317.i.i.i.i.i + %53 = getelementptr inbounds nuw i64, ptr %0, i64 %.01317.i.i.i.i.i store i64 %50, ptr %53, align 8 %.not.i.i.i = icmp ult i64 %.018.in.i.i.i.i.i, 2 br i1 %.not.i.i.i, label %_ZSt10__pop_heapIPlN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_S4_RT0_.exit.i.i, label %.lr.ph.i.i.i.i.i, !llvm.loop !31 @@ -1431,7 +1423,7 @@ _ZSt10__pop_heapIPlN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_S4_RT0_.exit.i.i: ; 56: ; preds = %10 %57 = add nsw i64 %.01219, -1 %58 = lshr i64 %11, 4 - %59 = getelementptr inbounds i64, ptr %0, i64 %58 + %59 = getelementptr inbounds nuw i64, ptr %0, i64 %58 %60 = getelementptr inbounds i8, ptr %.020, i64 -8 %61 = load i64, ptr %9, align 8 %62 = load i64, ptr %59, align 8 @@ -1544,7 +1536,7 @@ define linkonce_odr void @_ZSt11__make_heapIPlN9__gnu_cxx5__ops15_Iter_less_iter .split: ; preds = %3 %9 = add nsw i64 %7, -2 %10 = lshr i64 %9, 1 - %11 = getelementptr inbounds i64, ptr %0, i64 %10 + %11 = getelementptr inbounds nuw i64, ptr %0, i64 %10 %12 = load i64, ptr %11, align 8 %13 = add nsw i64 %7, -1 %14 = lshr i64 %13, 1 @@ -2157,7 +2149,7 @@ tailrecurse: ; preds = %tailrecurse, %4 %.04972.us = phi i64 [ 0, %.lr.ph74.us ], [ %.049..us, %20 ] %21 = add i64 %.04873.us, %.04972.us %22 = lshr i64 %21, 1 - %23 = getelementptr inbounds i64, ptr %10, i64 %22 + %23 = getelementptr inbounds nuw i64, ptr %10, i64 %22 %24 = load i64, ptr %23, align 8 %25 = and i64 %24, -1152921504606846977 %.not.us = icmp sgt i64 %25, %14 @@ -2246,7 +2238,7 @@ define noundef double @_ZN5faiss16imbalance_factorEiPKi(i32 noundef %0, ptr noca %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ] %.01519 = phi double [ 0.000000e+00, %.lr.ph.preheader ], [ %8, %.lr.ph ] %.01618 = phi double [ 0.000000e+00, %.lr.ph.preheader ], [ %7, %.lr.ph ] - %4 = getelementptr inbounds i32, ptr %1, i64 %indvars.iv + %4 = getelementptr inbounds nuw i32, ptr %1, i64 %indvars.iv %5 = load i32, ptr %4, align 4 %6 = sitofp i32 %5 to double %7 = fadd double %.01618, %6 @@ -2296,7 +2288,7 @@ _ZNSt6vectorIiSaIiEEC2EmRKiRKS0_.exit: ; preds = %.noexc8, %_ZNSt6vec .lr.ph: ; preds = %.lr.ph.preheader, %.lr.ph %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ] - %9 = getelementptr inbounds i64, ptr %2, i64 %indvars.iv + %9 = getelementptr inbounds nuw i64, ptr %2, i64 %indvars.iv %10 = load i64, ptr %9, align 8 %11 = getelementptr inbounds i32, ptr %.sroa.0.0, i64 %10 %12 = load i32, ptr %11, align 4 @@ -2317,7 +2309,7 @@ _ZNSt6vectorIiSaIiEEC2EmRKiRKS0_.exit: ; preds = %.noexc8, %_ZNSt6vec %indvars.iv.i = phi i64 [ 0, %.lr.ph.preheader.i ], [ %indvars.iv.next.i, %.lr.ph.i ] %.01519.i = phi double [ 0.000000e+00, %.lr.ph.preheader.i ], [ %18, %.lr.ph.i ] %.01618.i = phi double [ 0.000000e+00, %.lr.ph.preheader.i ], [ %17, %.lr.ph.i ] - %14 = getelementptr inbounds i32, ptr %.sroa.0.0, i64 %indvars.iv.i + %14 = getelementptr inbounds nuw i32, ptr %.sroa.0.0, i64 %indvars.iv.i %15 = load i32, ptr %14, align 4 %16 = sitofp i32 %15 to double %17 = fadd double %.01618.i, %16 @@ -2372,7 +2364,7 @@ define noundef i32 @_ZN5faiss9ivec_histEmPKiiPi(i64 noundef %0, ptr nocapture no 13: ; preds = %.lr.ph %14 = zext nneg i32 %9 to i64 - %15 = getelementptr inbounds i32, ptr %3, i64 %14 + %15 = getelementptr inbounds nuw i32, ptr %3, i64 %14 %16 = load i32, ptr %15, align 4 %17 = add nsw i32 %16, 1 store i32 %17, ptr %15, align 4 @@ -2513,14 +2505,14 @@ _ZNSt6vectorIiSaIiEEC2EmRKS0_.exit: ; preds = %.noexc44, %_ZNSt6ve .lr.ph: ; preds = %.lr.ph.preheader, %58 %indvars.iv73 = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next74, %58 ] %.idx = shl nsw i64 %indvars.iv73, 10 - %43 = getelementptr inbounds i8, ptr %.sroa.0.0, i64 %.idx + %43 = getelementptr inbounds nuw i8, ptr %.sroa.0.0, i64 %.idx %.idx78 = shl nsw i64 %indvars.iv73, 5 - %44 = getelementptr inbounds i8, ptr %3, i64 %.idx78 + %44 = getelementptr inbounds nuw i8, ptr %3, i64 %.idx78 br label %.preheader .preheader: ; preds = %.lr.ph, %57 %indvars.iv69 = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next70, %57 ] - %45 = getelementptr inbounds i32, ptr %43, i64 %indvars.iv69 + %45 = getelementptr inbounds nuw i32, ptr %43, i64 %indvars.iv69 %46 = trunc nuw nsw i64 %indvars.iv69 to i32 br label %47 @@ -2534,7 +2526,7 @@ _ZNSt6vectorIiSaIiEEC2EmRKS0_.exit: ; preds = %.noexc44, %_ZNSt6ve 51: ; preds = %47 %52 = load i32, ptr %45, align 4 - %53 = getelementptr inbounds i32, ptr %44, i64 %indvars.iv65 + %53 = getelementptr inbounds nuw i32, ptr %44, i64 %indvars.iv65 %54 = load i32, ptr %53, align 4 %55 = add nsw i32 %54, %52 store i32 %55, ptr %53, align 4 @@ -2894,7 +2886,7 @@ define void @_ZN5faiss14binary_to_realEmPKhPf(i64 noundef %0, ptr nocapture noun .lr.ph: ; preds = %3, %.lr.ph %.07 = phi i64 [ %16, %.lr.ph ], [ 0, %3 ] %4 = lshr i64 %.07, 3 - %5 = getelementptr inbounds i8, ptr %1, i64 %4 + %5 = getelementptr inbounds nuw i8, ptr %1, i64 %4 %6 = load i8, ptr %5, align 1 %7 = zext i8 %6 to i32 %8 = trunc i64 %.07 to i32 @@ -2942,7 +2934,7 @@ define void @_ZN5faiss14real_to_binaryEmPKfPh(i64 noundef %0, ptr nocapture noun br i1 %exitcond.not, label %14, label %6, !llvm.loop !57 14: ; preds = %6 - %15 = getelementptr inbounds i8, ptr %2, i64 %.01316 + %15 = getelementptr inbounds nuw i8, ptr %2, i64 %.01316 store i8 %.1, ptr %15, align 1 %16 = add nuw nsw i64 %.01316, 1 %exitcond17.not = icmp eq i64 %16, %4 @@ -2992,10 +2984,10 @@ define noundef zeroext i1 @_ZN5faiss12check_openmpEv() local_unnamed_addr #1 per 5: ; preds = %0 %6 = tail call noalias noundef nonnull dereferenceable(40) ptr @_Znwm(i64 noundef 40) #28 store ptr %6, ptr %1, align 8 - %7 = getelementptr inbounds i8, ptr %6, i64 40 - %8 = getelementptr inbounds i8, ptr %1, i64 16 + %7 = getelementptr inbounds nuw i8, ptr %6, i64 40 + %8 = getelementptr inbounds nuw i8, ptr %1, i64 16 store ptr %7, ptr %8, align 8 - %9 = getelementptr inbounds i8, ptr %1, i64 8 + %9 = getelementptr inbounds nuw i8, ptr %1, i64 8 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(40) %6, i8 0, i64 40, i1 false) store ptr %7, ptr %9, align 8 store i64 0, ptr %2, align 8 @@ -3147,9 +3139,9 @@ define void @_ZN5faiss7CodeSet6insertEmPKhPb(ptr noundef nonnull align 8 derefer br i1 %.not, label %._crit_edge, label %.lr.ph .lr.ph: ; preds = %4 - %6 = getelementptr inbounds i8, ptr %5, i64 16 - %7 = getelementptr inbounds i8, ptr %5, i64 8 - %8 = getelementptr inbounds i8, ptr %0, i64 8 + %6 = getelementptr inbounds nuw i8, ptr %5, i64 16 + %7 = getelementptr inbounds nuw i8, ptr %5, i64 8 + %8 = getelementptr inbounds nuw i8, ptr %0, i64 8 br label %9 9: ; preds = %.lr.ph, %_ZNSt6vectorIhSaIhEED2Ev.exit @@ -3175,7 +3167,7 @@ _ZNSt6vectorIhSaIhEE17_S_check_init_lenEmRKS0_.exit.i.i: ; preds = %9 .noexc4.i: ; preds = %_ZNSt6vectorIhSaIhEE17_S_check_init_lenEmRKS0_.exit.i.i %15 = call noalias noundef nonnull ptr @_Znwm(i64 noundef %10) #28 store ptr %15, ptr %5, align 8 - %16 = getelementptr inbounds i8, ptr %15, i64 %10 + %16 = getelementptr inbounds nuw i8, ptr %15, i64 %10 store ptr %16, ptr %6, align 8 call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %15, ptr align 1 %12, i64 %10, i1 false) br label %_ZNSt12_Vector_baseIhSaIhEE11_M_allocateEm.exit.thread.i.i @@ -3242,23 +3234,23 @@ define linkonce_odr { ptr, i8 } @_ZNSt8_Rb_treeISt6vectorIhSaIhEES2_St9_Identity 6: ; preds = %2 %.not.i = icmp ne ptr %4, null - %7 = getelementptr inbounds i8, ptr %0, i64 8 + %7 = getelementptr inbounds nuw i8, ptr %0, i64 8 %8 = icmp eq ptr %5, %7 %or.cond.i = select i1 %.not.i, i1 true, i1 %8 %.pre.i = load ptr, ptr %1, align 8 br i1 %or.cond.i, label %._crit_edge.i, label %9 ._crit_edge.i: ; preds = %6 - %.phi.trans.insert.i = getelementptr inbounds i8, ptr %1, i64 8 + %.phi.trans.insert.i = getelementptr inbounds nuw i8, ptr %1, i64 8 %.pre11.i = load ptr, ptr %.phi.trans.insert.i, align 8 br label %_ZNSt8_Rb_treeISt6vectorIhSaIhEES2_St9_IdentityIS2_ESt4lessIS2_ESaIS2_EE10_M_insert_IS2_NS8_11_Alloc_nodeEEESt17_Rb_tree_iteratorIS2_EPSt18_Rb_tree_node_baseSE_OT_RT0_.exit 9: ; preds = %6 - %10 = getelementptr inbounds i8, ptr %5, i64 32 - %11 = getelementptr inbounds i8, ptr %1, i64 8 + %10 = getelementptr inbounds nuw i8, ptr %5, i64 32 + %11 = getelementptr inbounds nuw i8, ptr %1, i64 8 %12 = load ptr, ptr %11, align 8 %13 = load ptr, ptr %10, align 8 - %14 = getelementptr inbounds i8, ptr %5, i64 40 + %14 = getelementptr inbounds nuw i8, ptr %5, i64 40 %15 = load ptr, ptr %14, align 8 %16 = ptrtoint ptr %12 to i64 %17 = ptrtoint ptr %.pre.i to i64 @@ -3292,17 +3284,17 @@ _ZNSt8_Rb_treeISt6vectorIhSaIhEES2_St9_IdentityIS2_ESt4lessIS2_ESaIS2_EE10_M_ins %29 = phi ptr [ %.pre11.i, %._crit_edge.i ], [ %12, %_ZNKSt4lessISt6vectorIhSaIhEEEclERKS2_S5_.exit.i ] %30 = phi i1 [ true, %._crit_edge.i ], [ %28, %_ZNKSt4lessISt6vectorIhSaIhEEEclERKS2_S5_.exit.i ] %31 = tail call noalias noundef nonnull dereferenceable(56) ptr @_Znwm(i64 noundef 56) #28 - %32 = getelementptr inbounds i8, ptr %31, i64 32 + %32 = getelementptr inbounds nuw i8, ptr %31, i64 32 store ptr %.pre.i, ptr %32, align 8 - %33 = getelementptr inbounds i8, ptr %31, i64 40 + %33 = getelementptr inbounds nuw i8, ptr %31, i64 40 store ptr %29, ptr %33, align 8 - %34 = getelementptr inbounds i8, ptr %31, i64 48 - %35 = getelementptr inbounds i8, ptr %1, i64 16 + %34 = getelementptr inbounds nuw i8, ptr %31, i64 48 + %35 = getelementptr inbounds nuw i8, ptr %1, i64 16 %36 = load ptr, ptr %35, align 8 store ptr %36, ptr %34, align 8 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %1, i8 0, i64 24, i1 false) tail call void @_ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS_(i1 noundef zeroext %30, ptr noundef nonnull %31, ptr noundef nonnull %5, ptr noundef nonnull align 8 dereferenceable(32) %7) #17 - %37 = getelementptr inbounds i8, ptr %0, i64 40 + %37 = getelementptr inbounds nuw i8, ptr %0, i64 40 %38 = load i64, ptr %37, align 8 %39 = add i64 %38, 1 store i64 %39, ptr %37, align 8 @@ -3318,15 +3310,15 @@ _ZNSt8_Rb_treeISt6vectorIhSaIhEES2_St9_IdentityIS2_ESt4lessIS2_ESaIS2_EE10_M_ins ; Function Attrs: mustprogress uwtable define linkonce_odr { ptr, ptr } @_ZNSt8_Rb_treeISt6vectorIhSaIhEES2_St9_IdentityIS2_ESt4lessIS2_ESaIS2_EE24_M_get_insert_unique_posERKS2_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(24) %1) local_unnamed_addr #1 comdat align 2 { - %3 = getelementptr inbounds i8, ptr %0, i64 16 - %4 = getelementptr inbounds i8, ptr %0, i64 8 + %3 = getelementptr inbounds nuw i8, ptr %0, i64 16 + %4 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.02527 = load ptr, ptr %3, align 8 %.not28 = icmp eq ptr %.02527, null br i1 %.not28, label %._crit_edge.thread, label %.lr.ph .lr.ph: ; preds = %2 %5 = load ptr, ptr %1, align 8 - %6 = getelementptr inbounds i8, ptr %1, i64 8 + %6 = getelementptr inbounds nuw i8, ptr %1, i64 8 %7 = load ptr, ptr %6, align 8 %8 = ptrtoint ptr %7 to i64 %9 = ptrtoint ptr %5 to i64 @@ -3335,9 +3327,9 @@ define linkonce_odr { ptr, ptr } @_ZNSt8_Rb_treeISt6vectorIhSaIhEES2_St9_Identit 11: ; preds = %.lr.ph, %_ZNKSt4lessISt6vectorIhSaIhEEEclERKS2_S5_.exit %.02529 = phi ptr [ %.02527, %.lr.ph ], [ %.025, %_ZNKSt4lessISt6vectorIhSaIhEEEclERKS2_S5_.exit ] - %12 = getelementptr inbounds i8, ptr %.02529, i64 32 + %12 = getelementptr inbounds nuw i8, ptr %.02529, i64 32 %13 = load ptr, ptr %12, align 8 - %14 = getelementptr inbounds i8, ptr %.02529, i64 40 + %14 = getelementptr inbounds nuw i8, ptr %.02529, i64 40 %15 = load ptr, ptr %14, align 8 %16 = ptrtoint ptr %15 to i64 %17 = ptrtoint ptr %13 to i64 @@ -3363,7 +3355,7 @@ _ZNKSt4lessISt6vectorIhSaIhEEEclERKS2_S5_.exit: ; preds = %21, %23 %.0.i.i.i.i.i.i.i = phi i64 [ %22, %21 ], [ %24, %23 ] %25 = icmp slt i64 %.0.i.i.i.i.i.i.i, 0 %.in.v = select i1 %25, i64 16, i64 24 - %.in = getelementptr inbounds i8, ptr %.02529, i64 %.in.v + %.in = getelementptr inbounds nuw i8, ptr %.02529, i64 %.in.v %.025 = load ptr, ptr %.in, align 8 %.not = icmp eq ptr %.025, null br i1 %.not, label %._crit_edge, label %11, !llvm.loop !61 @@ -3373,7 +3365,7 @@ _ZNKSt4lessISt6vectorIhSaIhEEEclERKS2_S5_.exit: ; preds = %21, %23 ._crit_edge.thread: ; preds = %2, %._crit_edge %.024.lcssa33 = phi ptr [ %.02529, %._crit_edge ], [ %4, %2 ] - %26 = getelementptr inbounds i8, ptr %0, i64 24 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 24 %27 = load ptr, ptr %26, align 8 %28 = icmp eq ptr %.024.lcssa33, %27 br i1 %28, label %52, label %29 @@ -3385,12 +3377,12 @@ _ZNKSt4lessISt6vectorIhSaIhEEEclERKS2_S5_.exit: ; preds = %21, %23 31: ; preds = %29, %._crit_edge %.024.lcssa34 = phi ptr [ %.024.lcssa33, %29 ], [ %.02529, %._crit_edge ] %.sroa.010.0 = phi ptr [ %30, %29 ], [ %.02529, %._crit_edge ] - %32 = getelementptr inbounds i8, ptr %.sroa.010.0, i64 32 + %32 = getelementptr inbounds nuw i8, ptr %.sroa.010.0, i64 32 %33 = load ptr, ptr %32, align 8 - %34 = getelementptr inbounds i8, ptr %.sroa.010.0, i64 40 + %34 = getelementptr inbounds nuw i8, ptr %.sroa.010.0, i64 40 %35 = load ptr, ptr %34, align 8 %36 = load ptr, ptr %1, align 8 - %37 = getelementptr inbounds i8, ptr %1, i64 8 + %37 = getelementptr inbounds nuw i8, ptr %1, i64 8 %38 = load ptr, ptr %37, align 8 %39 = ptrtoint ptr %35 to i64 %40 = ptrtoint ptr %33 to i64 diff --git a/bench/flatbuffers/optimized/util.cpp.ll b/bench/flatbuffers/optimized/util.cpp.ll index f33c8a7aaa1..831d70300a3 100644 --- a/bench/flatbuffers/optimized/util.cpp.ll +++ b/bench/flatbuffers/optimized/util.cpp.ll @@ -103,7 +103,7 @@ entry: %file_info = alloca %struct.stat, align 8 %call = call i32 @stat(ptr noundef %name, ptr noundef nonnull %file_info) #17 %cmp.not = icmp eq i32 %call, 0 - %st_mode = getelementptr inbounds i8, ptr %file_info, i64 24 + %st_mode = getelementptr inbounds nuw i8, ptr %file_info, i64 24 %0 = load i32, ptr %st_mode, align 8 %and = and i32 %0, 16384 %cmp1 = icmp ne i32 %and, 0 @@ -134,7 +134,7 @@ entry: call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %file_info.i) %call.i = call i32 @stat(ptr noundef readonly %name, ptr noundef nonnull %file_info.i) #17 %cmp.not.i = icmp eq i32 %call.i, 0 - %st_mode.i = getelementptr inbounds i8, ptr %file_info.i, i64 24 + %st_mode.i = getelementptr inbounds nuw i8, ptr %file_info.i, i64 24 %0 = load i32, ptr %st_mode.i, align 8 %and.i = and i32 %0, 16384 %cmp1.i = icmp ne i32 %and.i, 0 @@ -642,7 +642,7 @@ if.then.i3: ; preds = %for.body.i br label %for.inc.i for.inc.i: ; preds = %if.then.i3, %for.body.i - %incdec.ptr.i.i = getelementptr inbounds i8, ptr %__first.sroa.0.05.i, i64 1 + %incdec.ptr.i.i = getelementptr inbounds nuw i8, ptr %__first.sroa.0.05.i, i64 1 %cmp.i.not.i = icmp eq ptr %incdec.ptr.i.i, %call2 br i1 %cmp.i.not.i, label %_ZSt7replaceIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEcEvT_SA_RKT0_SD_.exit, label %for.body.i, !llvm.loop !5 @@ -1435,9 +1435,9 @@ for.inc.i33: ; preds = %cond.true51.invoke. br i1 %cmp.i36, label %for.body.i25, label %return, !llvm.loop !18 sw.bb11: ; preds = %sw.epilog - %_M_manager.i.i = getelementptr inbounds i8, ptr %agg.tmp, i64 16 - %_M_invoker.i = getelementptr inbounds i8, ptr %agg.tmp, i64 24 - %25 = getelementptr inbounds i8, ptr %agg.tmp, i64 8 + %_M_manager.i.i = getelementptr inbounds nuw i8, ptr %agg.tmp, i64 16 + %_M_invoker.i = getelementptr inbounds nuw i8, ptr %agg.tmp, i64 24 + %25 = getelementptr inbounds nuw i8, ptr %agg.tmp, i64 8 store i64 0, ptr %25, align 8 store ptr @_ZN11flatbuffers11CharToUpperEc, ptr %agg.tmp, align 8 store ptr @_ZNSt17_Function_handlerIFccEPS0_E9_M_invokeERKSt9_Any_dataOc, ptr %_M_invoker.i, align 8 @@ -1480,9 +1480,9 @@ terminate.lpad.i.i51: ; preds = %if.then.i.i49 unreachable sw.bb14: ; preds = %sw.epilog - %_M_manager.i.i54 = getelementptr inbounds i8, ptr %agg.tmp15, i64 16 - %_M_invoker.i55 = getelementptr inbounds i8, ptr %agg.tmp15, i64 24 - %33 = getelementptr inbounds i8, ptr %agg.tmp15, i64 8 + %_M_manager.i.i54 = getelementptr inbounds nuw i8, ptr %agg.tmp15, i64 16 + %_M_invoker.i55 = getelementptr inbounds nuw i8, ptr %agg.tmp15, i64 24 + %33 = getelementptr inbounds nuw i8, ptr %agg.tmp15, i64 8 store i64 0, ptr %33, align 8 store ptr @_ZN11flatbuffers11CharToLowerEc, ptr %agg.tmp15, align 8 store ptr @_ZNSt17_Function_handlerIFccEPS0_E9_M_invokeERKSt9_Any_dataOc, ptr %_M_invoker.i55, align 8 @@ -1806,8 +1806,8 @@ entry: br i1 %cmp8.not, label %nrvo.skipdtor, label %for.body.lr.ph for.body.lr.ph: ; preds = %entry - %_M_manager.i.i = getelementptr inbounds i8, ptr %transform, i64 16 - %_M_invoker.i = getelementptr inbounds i8, ptr %transform, i64 24 + %_M_manager.i.i = getelementptr inbounds nuw i8, ptr %transform, i64 16 + %_M_invoker.i = getelementptr inbounds nuw i8, ptr %transform, i64 24 br label %for.body for.body: ; preds = %for.body.lr.ph, %for.inc diff --git a/bench/glog/optimized/flags.cc.ll b/bench/glog/optimized/flags.cc.ll index a0455bb0bdb..388aca4c0e0 100644 --- a/bench/glog/optimized/flags.cc.ll +++ b/bench/glog/optimized/flags.cc.ll @@ -288,7 +288,7 @@ declare void @_ZN6google14FlagRegistererC1INSt7__cxx1112basic_stringIcSt11char_t define linkonce_odr hidden void @_ZN3fLS20StringFlagDestructorD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %0) unnamed_addr #5 comdat align 2 { %2 = load ptr, ptr %0, align 8 tail call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #12 - %3 = getelementptr inbounds i8, ptr %0, i64 8 + %3 = getelementptr inbounds nuw i8, ptr %0, i64 8 %4 = load ptr, ptr %3, align 8 tail call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #12 ret void @@ -592,7 +592,7 @@ __cxx_global_var_init.47.exit: ; preds = %__cxx_global_var_in tail call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) getelementptr inbounds (i8, ptr @_ZN3fLSL16s_alsologtoemailE, i64 32), ptr noundef nonnull align 8 dereferenceable(32) %67) tail call void @_ZN6google14FlagRegistererC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEPKcS9_S9_PT_SB_(ptr noundef nonnull align 1 dereferenceable(1) @_ZN3fLSL16o_alsologtoemailE, ptr noundef nonnull @.str.57, ptr noundef nonnull @.str.58, ptr noundef nonnull @.str.7, ptr noundef nonnull %67, ptr noundef nonnull getelementptr inbounds (i8, ptr @_ZN3fLSL16s_alsologtoemailE, i64 32)) store ptr @_ZN3fLSL16s_alsologtoemailE, ptr @_ZN3fLSL16d_alsologtoemailE, align 8 - store ptr getelementptr inbounds (i8, ptr @_ZN3fLSL16s_alsologtoemailE, i64 32), ptr getelementptr inbounds (i8, ptr @_ZN3fLSL16d_alsologtoemailE, i64 8), align 8 + store ptr getelementptr inbounds (i8, ptr @_ZN3fLSL16s_alsologtoemailE, i64 32), ptr getelementptr inbounds nuw (i8, ptr @_ZN3fLSL16d_alsologtoemailE, i64 8), align 8 %68 = tail call i32 @__cxa_atexit(ptr nonnull @_ZN3fLS20StringFlagDestructorD2Ev, ptr nonnull @_ZN3fLSL16d_alsologtoemailE, ptr nonnull @__dso_handle) #12 %69 = load ptr, ptr @_ZN3fLSL22FLAGS_noalsologtoemailB5cxx11E, align 8 store ptr %69, ptr @_ZN3fLS20FLAGS_alsologtoemailB5cxx11E, align 8 @@ -725,7 +725,7 @@ __cxx_global_var_init.103.exit: ; preds = %__cxx_global_var_in tail call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) getelementptr inbounds (i8, ptr @_ZN3fLSL11s_logmailerE, i64 32), ptr noundef nonnull align 8 dereferenceable(32) %120) tail call void @_ZN6google14FlagRegistererC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEPKcS9_S9_PT_SB_(ptr noundef nonnull align 1 dereferenceable(1) @_ZN3fLSL11o_logmailerE, ptr noundef nonnull @.str.112, ptr noundef nonnull @.str.113, ptr noundef nonnull @.str.7, ptr noundef nonnull %120, ptr noundef nonnull getelementptr inbounds (i8, ptr @_ZN3fLSL11s_logmailerE, i64 32)) store ptr @_ZN3fLSL11s_logmailerE, ptr @_ZN3fLSL11d_logmailerE, align 8 - store ptr getelementptr inbounds (i8, ptr @_ZN3fLSL11s_logmailerE, i64 32), ptr getelementptr inbounds (i8, ptr @_ZN3fLSL11d_logmailerE, i64 8), align 8 + store ptr getelementptr inbounds (i8, ptr @_ZN3fLSL11s_logmailerE, i64 32), ptr getelementptr inbounds nuw (i8, ptr @_ZN3fLSL11d_logmailerE, i64 8), align 8 %121 = tail call i32 @__cxa_atexit(ptr nonnull @_ZN3fLS20StringFlagDestructorD2Ev, ptr nonnull @_ZN3fLSL11d_logmailerE, ptr nonnull @__dso_handle) #12 %122 = load ptr, ptr @_ZN3fLSL17FLAGS_nologmailerB5cxx11E, align 8 store ptr %122, ptr @_ZN3fLS15FLAGS_logmailerB5cxx11E, align 8 @@ -749,7 +749,7 @@ __cxx_global_var_init.116.exit: ; preds = %__cxx_global_var_in .preheader.i: ; preds = %__cxx_global_var_init.116.exit, %133 %.011.idx15.i.i = phi i64 [ %.011.add.i.i, %133 ], [ 0, %__cxx_global_var_init.116.exit ] - %.011.ptr.i.i = getelementptr inbounds i8, ptr @__const._ZN12_GLOBAL__N_113DefaultLogDirEv.names, i64 %.011.idx15.i.i + %.011.ptr.i.i = getelementptr inbounds nuw i8, ptr @__const._ZN12_GLOBAL__N_113DefaultLogDirEv.names, i64 %.011.idx15.i.i %129 = load ptr, ptr %.011.ptr.i.i, align 8 %130 = tail call ptr @getenv(ptr noundef %129) #12 %.not13.i.i = icmp eq ptr %130, null @@ -772,7 +772,7 @@ __cxx_global_var_init.122.exit: ; preds = %131, %133, %__cxx_g tail call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) getelementptr inbounds (i8, ptr @_ZN3fLSL9s_log_dirE, i64 32), ptr noundef nonnull align 8 dereferenceable(32) %135) tail call void @_ZN6google14FlagRegistererC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEPKcS9_S9_PT_SB_(ptr noundef nonnull align 1 dereferenceable(1) @_ZN3fLSL9o_log_dirE, ptr noundef nonnull @.str.125, ptr noundef nonnull @.str.126, ptr noundef nonnull @.str.7, ptr noundef nonnull %135, ptr noundef nonnull getelementptr inbounds (i8, ptr @_ZN3fLSL9s_log_dirE, i64 32)) store ptr @_ZN3fLSL9s_log_dirE, ptr @_ZN3fLSL9d_log_dirE, align 8 - store ptr getelementptr inbounds (i8, ptr @_ZN3fLSL9s_log_dirE, i64 32), ptr getelementptr inbounds (i8, ptr @_ZN3fLSL9d_log_dirE, i64 8), align 8 + store ptr getelementptr inbounds (i8, ptr @_ZN3fLSL9s_log_dirE, i64 32), ptr getelementptr inbounds nuw (i8, ptr @_ZN3fLSL9d_log_dirE, i64 8), align 8 %136 = tail call i32 @__cxa_atexit(ptr nonnull @_ZN3fLS20StringFlagDestructorD2Ev, ptr nonnull @_ZN3fLSL9d_log_dirE, ptr nonnull @__dso_handle) #12 %137 = load ptr, ptr @_ZN3fLSL15FLAGS_nolog_dirB5cxx11E, align 8 store ptr %137, ptr @_ZN3fLS13FLAGS_log_dirB5cxx11E, align 8 @@ -784,7 +784,7 @@ __cxx_global_var_init.122.exit: ; preds = %131, %133, %__cxx_g tail call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) getelementptr inbounds (i8, ptr @_ZN3fLSL10s_log_linkE, i64 32), ptr noundef nonnull align 8 dereferenceable(32) %139) tail call void @_ZN6google14FlagRegistererC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEPKcS9_S9_PT_SB_(ptr noundef nonnull align 1 dereferenceable(1) @_ZN3fLSL10o_log_linkE, ptr noundef nonnull @.str.132, ptr noundef nonnull @.str.133, ptr noundef nonnull @.str.7, ptr noundef nonnull %139, ptr noundef nonnull getelementptr inbounds (i8, ptr @_ZN3fLSL10s_log_linkE, i64 32)) store ptr @_ZN3fLSL10s_log_linkE, ptr @_ZN3fLSL10d_log_linkE, align 8 - store ptr getelementptr inbounds (i8, ptr @_ZN3fLSL10s_log_linkE, i64 32), ptr getelementptr inbounds (i8, ptr @_ZN3fLSL10d_log_linkE, i64 8), align 8 + store ptr getelementptr inbounds (i8, ptr @_ZN3fLSL10s_log_linkE, i64 32), ptr getelementptr inbounds nuw (i8, ptr @_ZN3fLSL10d_log_linkE, i64 8), align 8 %140 = tail call i32 @__cxa_atexit(ptr nonnull @_ZN3fLS20StringFlagDestructorD2Ev, ptr nonnull @_ZN3fLSL10d_log_linkE, ptr nonnull @__dso_handle) #12 %141 = load ptr, ptr @_ZN3fLSL16FLAGS_nolog_linkB5cxx11E, align 8 store ptr %141, ptr @_ZN3fLS14FLAGS_log_linkB5cxx11E, align 8 @@ -827,7 +827,7 @@ __cxx_global_var_init.142.exit: ; preds = %__cxx_global_var_in tail call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) getelementptr inbounds (i8, ptr @_ZN3fLSL18s_log_backtrace_atE, i64 32), ptr noundef nonnull align 8 dereferenceable(32) %156) tail call void @_ZN6google14FlagRegistererC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEPKcS9_S9_PT_SB_(ptr noundef nonnull align 1 dereferenceable(1) @_ZN3fLSL18o_log_backtrace_atE, ptr noundef nonnull @.str.151, ptr noundef nonnull @.str.152, ptr noundef nonnull @.str.7, ptr noundef nonnull %156, ptr noundef nonnull getelementptr inbounds (i8, ptr @_ZN3fLSL18s_log_backtrace_atE, i64 32)) store ptr @_ZN3fLSL18s_log_backtrace_atE, ptr @_ZN3fLSL18d_log_backtrace_atE, align 8 - store ptr getelementptr inbounds (i8, ptr @_ZN3fLSL18s_log_backtrace_atE, i64 32), ptr getelementptr inbounds (i8, ptr @_ZN3fLSL18d_log_backtrace_atE, i64 8), align 8 + store ptr getelementptr inbounds (i8, ptr @_ZN3fLSL18s_log_backtrace_atE, i64 32), ptr getelementptr inbounds nuw (i8, ptr @_ZN3fLSL18d_log_backtrace_atE, i64 8), align 8 %157 = tail call i32 @__cxa_atexit(ptr nonnull @_ZN3fLS20StringFlagDestructorD2Ev, ptr nonnull @_ZN3fLSL18d_log_backtrace_atE, ptr nonnull @__dso_handle) #12 %158 = load ptr, ptr @_ZN3fLSL24FLAGS_nolog_backtrace_atB5cxx11E, align 8 store ptr %158, ptr @_ZN3fLS22FLAGS_log_backtrace_atB5cxx11E, align 8 @@ -870,7 +870,7 @@ __cxx_global_var_init.161.exit: ; preds = %__cxx_global_var_in tail call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) getelementptr inbounds (i8, ptr @_ZN3fLSL9s_vmoduleE, i64 32), ptr noundef nonnull align 8 dereferenceable(32) %173) tail call void @_ZN6google14FlagRegistererC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEPKcS9_S9_PT_SB_(ptr noundef nonnull align 1 dereferenceable(1) @_ZN3fLSL9o_vmoduleE, ptr noundef nonnull @.str.170, ptr noundef nonnull @.str.171, ptr noundef nonnull @.str.7, ptr noundef nonnull %173, ptr noundef nonnull getelementptr inbounds (i8, ptr @_ZN3fLSL9s_vmoduleE, i64 32)) store ptr @_ZN3fLSL9s_vmoduleE, ptr @_ZN3fLSL9d_vmoduleE, align 8 - store ptr getelementptr inbounds (i8, ptr @_ZN3fLSL9s_vmoduleE, i64 32), ptr getelementptr inbounds (i8, ptr @_ZN3fLSL9d_vmoduleE, i64 8), align 8 + store ptr getelementptr inbounds (i8, ptr @_ZN3fLSL9s_vmoduleE, i64 32), ptr getelementptr inbounds nuw (i8, ptr @_ZN3fLSL9d_vmoduleE, i64 8), align 8 %174 = tail call i32 @__cxa_atexit(ptr nonnull @_ZN3fLS20StringFlagDestructorD2Ev, ptr nonnull @_ZN3fLSL9d_vmoduleE, ptr nonnull @__dso_handle) #12 %175 = load ptr, ptr @_ZN3fLSL15FLAGS_novmoduleB5cxx11E, align 8 store ptr %175, ptr @_ZN3fLS13FLAGS_vmoduleB5cxx11E, align 8 diff --git a/bench/glog/optimized/stacktrace_unittest.cc.ll b/bench/glog/optimized/stacktrace_unittest.cc.ll index ec1a2eeeffb..d3bb72b429f 100644 --- a/bench/glog/optimized/stacktrace_unittest.cc.ll +++ b/bench/glog/optimized/stacktrace_unittest.cc.ll @@ -112,17 +112,17 @@ $_ZTIN6google12base_logging12LogStreamBufE = comdat any ; Function Attrs: mustprogress uwtable define linkonce_odr hidden void @_ZN6google10LogMessage9LogStreamC2EPcil(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, i64 noundef %4) unnamed_addr #0 comdat align 2 personality ptr @__gxx_personality_v0 { - %6 = getelementptr inbounds i8, ptr %1, i64 8 + %6 = getelementptr inbounds nuw i8, ptr %1, i64 8 tail call void @_ZNSoC2EPSt15basic_streambufIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %6, ptr noundef null) %7 = load ptr, ptr %1, align 8 store ptr %7, ptr %0, align 8 - %8 = getelementptr inbounds i8, ptr %1, i64 24 + %8 = getelementptr inbounds nuw i8, ptr %1, i64 24 %9 = load ptr, ptr %8, align 8 %10 = getelementptr i8, ptr %7, i64 -24 %11 = load i64, ptr %10, align 8 %12 = getelementptr inbounds i8, ptr %0, i64 %11 store ptr %9, ptr %12, align 8 - %13 = getelementptr inbounds i8, ptr %0, i64 8 + %13 = getelementptr inbounds nuw i8, ptr %0, i64 8 invoke void @_ZNSt15basic_streambufIcSt11char_traitsIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(64) %13) to label %.noexc unwind label %27 @@ -141,9 +141,9 @@ define linkonce_odr hidden void @_ZN6google10LogMessage9LogStreamC2EPcil(ptr nou br label %.body _ZN6google12base_logging12LogStreamBufC2EPci.exit: ; preds = %.noexc - %19 = getelementptr inbounds i8, ptr %0, i64 72 + %19 = getelementptr inbounds nuw i8, ptr %0, i64 72 store i64 %4, ptr %19, align 8 - %20 = getelementptr inbounds i8, ptr %0, i64 80 + %20 = getelementptr inbounds nuw i8, ptr %0, i64 80 store ptr %0, ptr %20, align 8 %21 = load ptr, ptr %0, align 8 %22 = getelementptr i8, ptr %21, i64 -24 @@ -189,7 +189,7 @@ declare void @_ZNSoD2Ev(ptr noundef nonnull align 8 dereferenceable(8), ptr noun ; Function Attrs: mustprogress uwtable define linkonce_odr hidden void @_ZN6google10LogMessage9LogStreamC1EPcil(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef %1, i32 noundef %2, i64 noundef %3) unnamed_addr #0 comdat align 2 personality ptr @__gxx_personality_v0 { - %5 = getelementptr inbounds i8, ptr %0, i64 88 + %5 = getelementptr inbounds nuw i8, ptr %0, i64 88 tail call void @_ZNSt9basic_iosIcSt11char_traitsIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(264) %5) invoke void @_ZNSoC2EPSt15basic_streambufIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull getelementptr inbounds (i8, ptr @_ZTTN6google10LogMessage9LogStreamE, i64 8), ptr noundef null) to label %6 unwind label %21 @@ -197,7 +197,7 @@ define linkonce_odr hidden void @_ZN6google10LogMessage9LogStreamC1EPcil(ptr nou 6: ; preds = %4 store ptr getelementptr inbounds (i8, ptr @_ZTVN6google10LogMessage9LogStreamE, i64 24), ptr %0, align 8 store ptr getelementptr inbounds (i8, ptr @_ZTVN6google10LogMessage9LogStreamE, i64 64), ptr %5, align 8 - %7 = getelementptr inbounds i8, ptr %0, i64 8 + %7 = getelementptr inbounds nuw i8, ptr %0, i64 8 invoke void @_ZNSt15basic_streambufIcSt11char_traitsIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(64) %7) to label %.noexc unwind label %23 @@ -216,9 +216,9 @@ define linkonce_odr hidden void @_ZN6google10LogMessage9LogStreamC1EPcil(ptr nou br label %.body _ZN6google12base_logging12LogStreamBufC2EPci.exit: ; preds = %.noexc - %13 = getelementptr inbounds i8, ptr %0, i64 72 + %13 = getelementptr inbounds nuw i8, ptr %0, i64 72 store i64 %3, ptr %13, align 8 - %14 = getelementptr inbounds i8, ptr %0, i64 80 + %14 = getelementptr inbounds nuw i8, ptr %0, i64 80 store ptr %0, ptr %14, align 8 %15 = load ptr, ptr %0, align 8 %16 = getelementptr i8, ptr %15, i64 -24 @@ -574,11 +574,11 @@ declare void @_ZTv0_n24_NSoD0Ev(ptr noundef) unnamed_addr #3 ; Function Attrs: mustprogress nounwind uwtable define linkonce_odr hidden void @_ZN6google10LogMessage9LogStreamD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %0) unnamed_addr #2 comdat align 2 { store ptr getelementptr inbounds (i8, ptr @_ZTVN6google10LogMessage9LogStreamE, i64 24), ptr %0, align 8 - %2 = getelementptr inbounds i8, ptr %0, i64 88 + %2 = getelementptr inbounds nuw i8, ptr %0, i64 88 store ptr getelementptr inbounds (i8, ptr @_ZTVN6google10LogMessage9LogStreamE, i64 64), ptr %2, align 8 - %3 = getelementptr inbounds i8, ptr %0, i64 8 + %3 = getelementptr inbounds nuw i8, ptr %0, i64 8 tail call void @_ZNSt15basic_streambufIcSt11char_traitsIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %3) #15 - tail call void @_ZNSoD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull getelementptr inbounds (i8, ptr @_ZTTN6google10LogMessage9LogStreamE, i64 8)) #15 + tail call void @_ZNSoD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull getelementptr inbounds nuw (i8, ptr @_ZTTN6google10LogMessage9LogStreamE, i64 8)) #15 tail call void @_ZNSt9basic_iosIcSt11char_traitsIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(264) %2) #15 ret void } @@ -586,11 +586,11 @@ define linkonce_odr hidden void @_ZN6google10LogMessage9LogStreamD1Ev(ptr nounde ; Function Attrs: mustprogress nounwind uwtable define linkonce_odr hidden void @_ZN6google10LogMessage9LogStreamD0Ev(ptr noundef nonnull align 8 dereferenceable(88) %0) unnamed_addr #2 comdat align 2 { store ptr getelementptr inbounds (i8, ptr @_ZTVN6google10LogMessage9LogStreamE, i64 24), ptr %0, align 8 - %2 = getelementptr inbounds i8, ptr %0, i64 88 + %2 = getelementptr inbounds nuw i8, ptr %0, i64 88 store ptr getelementptr inbounds (i8, ptr @_ZTVN6google10LogMessage9LogStreamE, i64 64), ptr %2, align 8 - %3 = getelementptr inbounds i8, ptr %0, i64 8 + %3 = getelementptr inbounds nuw i8, ptr %0, i64 8 tail call void @_ZNSt15basic_streambufIcSt11char_traitsIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %3) #15 - tail call void @_ZNSoD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull getelementptr inbounds (i8, ptr @_ZTTN6google10LogMessage9LogStreamE, i64 8)) #15 + tail call void @_ZNSoD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull getelementptr inbounds nuw (i8, ptr @_ZTTN6google10LogMessage9LogStreamE, i64 8)) #15 tail call void @_ZNSt9basic_iosIcSt11char_traitsIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(264) %2) #15 tail call void @_ZdlPv(ptr noundef nonnull %0) #18 ret void @@ -603,11 +603,11 @@ define linkonce_odr hidden void @_ZTv0_n24_N6google10LogMessage9LogStreamD1Ev(pt %4 = load i64, ptr %3, align 8 %5 = getelementptr inbounds i8, ptr %0, i64 %4 store ptr getelementptr inbounds (i8, ptr @_ZTVN6google10LogMessage9LogStreamE, i64 24), ptr %5, align 8 - %6 = getelementptr inbounds i8, ptr %5, i64 88 + %6 = getelementptr inbounds nuw i8, ptr %5, i64 88 store ptr getelementptr inbounds (i8, ptr @_ZTVN6google10LogMessage9LogStreamE, i64 64), ptr %6, align 8 - %7 = getelementptr inbounds i8, ptr %5, i64 8 + %7 = getelementptr inbounds nuw i8, ptr %5, i64 8 tail call void @_ZNSt15basic_streambufIcSt11char_traitsIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %7) #15 - tail call void @_ZNSoD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull getelementptr inbounds (i8, ptr @_ZTTN6google10LogMessage9LogStreamE, i64 8)) #15 + tail call void @_ZNSoD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull getelementptr inbounds nuw (i8, ptr @_ZTTN6google10LogMessage9LogStreamE, i64 8)) #15 tail call void @_ZNSt9basic_iosIcSt11char_traitsIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(264) %6) #15 ret void } @@ -619,11 +619,11 @@ define linkonce_odr hidden void @_ZTv0_n24_N6google10LogMessage9LogStreamD0Ev(pt %4 = load i64, ptr %3, align 8 %5 = getelementptr inbounds i8, ptr %0, i64 %4 store ptr getelementptr inbounds (i8, ptr @_ZTVN6google10LogMessage9LogStreamE, i64 24), ptr %5, align 8 - %6 = getelementptr inbounds i8, ptr %5, i64 88 + %6 = getelementptr inbounds nuw i8, ptr %5, i64 88 store ptr getelementptr inbounds (i8, ptr @_ZTVN6google10LogMessage9LogStreamE, i64 64), ptr %6, align 8 - %7 = getelementptr inbounds i8, ptr %5, i64 8 + %7 = getelementptr inbounds nuw i8, ptr %5, i64 8 tail call void @_ZNSt15basic_streambufIcSt11char_traitsIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %7) #15 - tail call void @_ZNSoD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull getelementptr inbounds (i8, ptr @_ZTTN6google10LogMessage9LogStreamE, i64 8)) #15 + tail call void @_ZNSoD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull getelementptr inbounds nuw (i8, ptr @_ZTTN6google10LogMessage9LogStreamE, i64 8)) #15 tail call void @_ZNSt9basic_iosIcSt11char_traitsIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(264) %6) #15 tail call void @_ZdlPv(ptr noundef nonnull %5) #18 ret void @@ -1343,9 +1343,9 @@ _ZN6google7logging8internal13CheckOpStringD2Ev.exit44: ; preds = %_ZNSt10unique_ .lr.ph: ; preds = %.lr.ph.preheader, %.lr.ph %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ] - %79 = getelementptr inbounds ptr, ptr %66, i64 %indvars.iv + %79 = getelementptr inbounds nuw ptr, ptr %66, i64 %indvars.iv %80 = load ptr, ptr %79, align 8 - %81 = getelementptr inbounds [10 x ptr], ptr %11, i64 0, i64 %indvars.iv + %81 = getelementptr inbounds nuw [10 x ptr], ptr %11, i64 0, i64 %indvars.iv %82 = load ptr, ptr %81, align 8 %83 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17, ptr noundef %80, ptr noundef %82) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 @@ -1359,11 +1359,11 @@ _ZN6google7logging8internal13CheckOpStringD2Ev.exit44: ; preds = %_ZNSt10unique_ 85: ; preds = %._crit_edge, %_ZL24CheckRetAddrIsInFunctionPvRK12AddressRange.exit %indvars.iv52 = phi i64 [ 0, %._crit_edge ], [ %indvars.iv.next53, %_ZL24CheckRetAddrIsInFunctionPvRK12AddressRange.exit ] - %86 = getelementptr inbounds [6 x %struct.AddressRange], ptr @expected_range, i64 0, i64 %indvars.iv52 + %86 = getelementptr inbounds nuw [6 x %struct.AddressRange], ptr @expected_range, i64 0, i64 %indvars.iv52 %87 = load ptr, ptr %86, align 16 - %88 = getelementptr inbounds i8, ptr %86, i64 8 + %88 = getelementptr inbounds nuw i8, ptr %86, i64 8 %89 = load ptr, ptr %88, align 8 - %90 = getelementptr inbounds [10 x ptr], ptr %11, i64 0, i64 %indvars.iv52 + %90 = getelementptr inbounds nuw [10 x ptr], ptr %11, i64 0, i64 %indvars.iv52 %91 = load ptr, ptr %90, align 8 %92 = trunc nuw nsw i64 %indvars.iv52 to i32 %93 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.19, i32 noundef %92, ptr noundef %87, ptr noundef %89, ptr noundef %91) diff --git a/bench/glog/optimized/vlog_is_on.cc.ll b/bench/glog/optimized/vlog_is_on.cc.ll index d7cab58eead..ddae23c1015 100644 --- a/bench/glog/optimized/vlog_is_on.cc.ll +++ b/bench/glog/optimized/vlog_is_on.cc.ll @@ -121,7 +121,7 @@ _ZNSt10lock_guardISt5mutexEC2ERS0_.exit.preheader: ; preds = %2 br i1 %9, label %17, label %11 11: ; preds = %10 - %12 = getelementptr inbounds i8, ptr %.04654, i64 32 + %12 = getelementptr inbounds nuw i8, ptr %.04654, i64 32 %13 = load i32, ptr %12, align 8 br label %17 @@ -134,7 +134,7 @@ _ZNSt10lock_guardISt5mutexEC2ERS0_.exit.preheader: ; preds = %2 17: ; preds = %11, %10 %.141 = phi i8 [ %.04052, %10 ], [ 1, %11 ] %.1 = phi i32 [ %.053, %10 ], [ %13, %11 ] - %18 = getelementptr inbounds i8, ptr %.04654, i64 32 + %18 = getelementptr inbounds nuw i8, ptr %.04654, i64 32 store i32 %1, ptr %18, align 8 br label %_ZNSt10lock_guardISt5mutexEC2ERS0_.exit @@ -148,14 +148,14 @@ _ZNSt10lock_guardISt5mutexEC2ERS0_.exit.preheader: ; preds = %2 br i1 %23, label %24, label %_ZNSt10lock_guardISt5mutexEC2ERS0_.exit 24: ; preds = %20 - %25 = getelementptr inbounds i8, ptr %.04654, i64 32 + %25 = getelementptr inbounds nuw i8, ptr %.04654, i64 32 %26 = load i32, ptr %25, align 8 br label %_ZNSt10lock_guardISt5mutexEC2ERS0_.exit _ZNSt10lock_guardISt5mutexEC2ERS0_.exit: ; preds = %17, %24, %20, %19 %.242 = phi i8 [ %.141, %17 ], [ %.04052, %19 ], [ 1, %24 ], [ %.04052, %20 ] %.2 = phi i32 [ %.1, %17 ], [ %.053, %19 ], [ %26, %24 ], [ %.053, %20 ] - %27 = getelementptr inbounds i8, ptr %.04654, i64 40 + %27 = getelementptr inbounds nuw i8, ptr %.04654, i64 40 %.046 = load ptr, ptr %27, align 8 %.not = icmp eq ptr %.046, null br i1 %.not, label %_ZNSt10lock_guardISt5mutexEC2ERS0_.exit._crit_edge, label %.lr.ph, !llvm.loop !7 @@ -175,10 +175,10 @@ _ZNSt10lock_guardISt5mutexEC2ERS0_.exit._crit_edge.thread: ; preds = %_ZNSt10loc to label %32 unwind label %14 32: ; preds = %30 - %33 = getelementptr inbounds i8, ptr %29, i64 32 + %33 = getelementptr inbounds nuw i8, ptr %29, i64 32 store i32 %1, ptr %33, align 8 %34 = load ptr, ptr @_ZN6googleL12vmodule_listE, align 8 - %35 = getelementptr inbounds i8, ptr %29, i64 40 + %35 = getelementptr inbounds nuw i8, ptr %29, i64 40 store ptr %34, ptr %35, align 8 store ptr %29, ptr @_ZN6googleL12vmodule_listE, align 8 %.04356 = load ptr, ptr @_ZN6googleL16cached_site_listE, align 8 @@ -188,22 +188,22 @@ _ZNSt10lock_guardISt5mutexEC2ERS0_.exit._crit_edge.thread: ; preds = %_ZNSt10loc .lr.ph60: ; preds = %32, %46 %.04359 = phi ptr [ %.043, %46 ], [ %.04356, %32 ] %.04458 = phi ptr [ %.145, %46 ], [ @_ZN6googleL16cached_site_listE, %32 ] - %36 = getelementptr inbounds i8, ptr %.04359, i64 8 + %36 = getelementptr inbounds nuw i8, ptr %.04359, i64 8 %37 = load ptr, ptr %36, align 8 - %38 = getelementptr inbounds i8, ptr %.04359, i64 16 + %38 = getelementptr inbounds nuw i8, ptr %.04359, i64 16 %39 = load i64, ptr %38, align 8 %40 = tail call noundef zeroext i1 @_ZN6google24glog_internal_namespace_12SafeFNMatch_EPKcmS2_m(ptr noundef %0, i64 noundef %4, ptr noundef %37, i64 noundef %39) br i1 %40, label %41, label %44 41: ; preds = %.lr.ph60 store ptr %33, ptr %.04359, align 8 - %42 = getelementptr inbounds i8, ptr %.04359, i64 24 + %42 = getelementptr inbounds nuw i8, ptr %.04359, i64 24 %43 = load ptr, ptr %42, align 8 store ptr %43, ptr %.04458, align 8 br label %46 44: ; preds = %.lr.ph60 - %45 = getelementptr inbounds i8, ptr %.04359, i64 24 + %45 = getelementptr inbounds nuw i8, ptr %.04359, i64 24 %.043.pre = load ptr, ptr %45, align 8 br label %46 @@ -312,7 +312,7 @@ _ZNSt10lock_guardISt5mutexEC2ERS0_.exit: ; preds = %4 26: ; preds = %24 %27 = load i32, ptr %7, align 4 - %28 = getelementptr inbounds i8, ptr %23, i64 32 + %28 = getelementptr inbounds nuw i8, ptr %23, i64 32 store i32 %27, ptr %28, align 8 %.not32.i = icmp eq ptr %.025.i, null br i1 %.not32.i, label %35, label %29 @@ -339,7 +339,7 @@ _ZNSt10lock_guardISt5mutexEC2ERS0_.exit: ; preds = %4 %.2.i = phi ptr [ %.023.i, %19 ], [ %23, %29 ], [ %23, %26 ] %36 = call noundef ptr @strchr(ptr noundef nonnull dereferenceable(1) %14, i32 noundef 44) #11 %37 = icmp eq ptr %36, null - %38 = getelementptr inbounds i8, ptr %36, i64 1 + %38 = getelementptr inbounds nuw i8, ptr %36, i64 1 call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #12 br i1 %37, label %39, label %13 @@ -373,7 +373,7 @@ _ZN6googleL16VLOG2InitializerEv.exit: ; preds = %39, %40 %46 = load i32, ptr %45, align 4 %47 = call noundef ptr @strrchr(ptr noundef nonnull dereferenceable(1) %2, i32 noundef 47) #11 %.not = icmp eq ptr %47, null - %48 = getelementptr inbounds i8, ptr %47, i64 1 + %48 = getelementptr inbounds nuw i8, ptr %47, i64 1 %49 = select i1 %.not, ptr %2, ptr %48 %50 = call noundef ptr @strchr(ptr noundef nonnull dereferenceable(1) %49, i32 noundef 46) #11 %.not43 = icmp eq ptr %50, null @@ -417,11 +417,11 @@ _ZN6googleL16VLOG2InitializerEv.exit: ; preds = %39, %40 br i1 %68, label %69, label %71 69: ; preds = %.lr.ph - %70 = getelementptr inbounds i8, ptr %.050, i64 32 + %70 = getelementptr inbounds nuw i8, ptr %.050, i64 32 br label %.loopexit 71: ; preds = %.lr.ph - %72 = getelementptr inbounds i8, ptr %.050, i64 40 + %72 = getelementptr inbounds nuw i8, ptr %.050, i64 40 %.0 = load ptr, ptr %72, align 8 %.not44 = icmp eq ptr %.0, null br i1 %.not44, label %.loopexit, label %.lr.ph, !llvm.loop !9 @@ -436,17 +436,17 @@ _ZN6googleL16VLOG2InitializerEv.exit: ; preds = %39, %40 br i1 %74, label %75, label %82 75: ; preds = %73 - %76 = getelementptr inbounds i8, ptr %0, i64 8 + %76 = getelementptr inbounds nuw i8, ptr %0, i64 8 %77 = load ptr, ptr %76, align 8 %.not45 = icmp eq ptr %77, null br i1 %.not45, label %78, label %82 78: ; preds = %75 store ptr %49, ptr %76, align 8 - %79 = getelementptr inbounds i8, ptr %0, i64 16 + %79 = getelementptr inbounds nuw i8, ptr %0, i64 16 store i64 %.038, ptr %79, align 8 %80 = load ptr, ptr @_ZN6googleL16cached_site_listE, align 8 - %81 = getelementptr inbounds i8, ptr %0, i64 24 + %81 = getelementptr inbounds nuw i8, ptr %0, i64 24 store ptr %80, ptr %81, align 8 store ptr %0, ptr @_ZN6googleL16cached_site_listE, align 8 br label %82 diff --git a/bench/harfbuzz/optimized/hb-number.cc.ll b/bench/harfbuzz/optimized/hb-number.cc.ll index a6d6e54a5a1..1bd3ec78a25 100644 --- a/bench/harfbuzz/optimized/hb-number.cc.ll +++ b/bench/harfbuzz/optimized/hb-number.cc.ll @@ -26,7 +26,7 @@ entry: %.sroa.speculated.i = tail call i32 @llvm.umin.i32(i32 %conv.i, i32 31) %conv3.i = zext nneg i32 %.sroa.speculated.i to i64 %call4.i = call ptr @strncpy(ptr noundef nonnull %buf.i, ptr noundef %0, i64 noundef %conv3.i) #8 - %arrayidx.i = getelementptr inbounds [32 x i8], ptr %buf.i, i64 0, i64 %conv3.i + %arrayidx.i = getelementptr inbounds nuw [32 x i8], ptr %buf.i, i64 0, i64 %conv3.i store i8 0, ptr %arrayidx.i, align 1 store ptr %buf.i, ptr %pend.i, align 8 %call6.i = tail call ptr @__errno_location() #9 @@ -81,7 +81,7 @@ entry: %.sroa.speculated.i = tail call i32 @llvm.umin.i32(i32 %conv.i, i32 31) %conv3.i = zext nneg i32 %.sroa.speculated.i to i64 %call4.i = call ptr @strncpy(ptr noundef nonnull %buf.i, ptr noundef %0, i64 noundef %conv3.i) #8 - %arrayidx.i = getelementptr inbounds [32 x i8], ptr %buf.i, i64 0, i64 %conv3.i + %arrayidx.i = getelementptr inbounds nuw [32 x i8], ptr %buf.i, i64 0, i64 %conv3.i store i8 0, ptr %arrayidx.i, align 1 store ptr %buf.i, ptr %pend.i, align 8 %call6.i = tail call ptr @__errno_location() #9 @@ -185,7 +185,7 @@ _resume.i: ; preds = %if.end62.i, %_resum %arrayidx.i = getelementptr inbounds [9 x i8], ptr @_ZL28_double_parser_index_offsets, i64 0, i64 %idxprom.i %5 = load i8, ptr %arrayidx.i, align 1 %idx.ext5.i = zext i8 %5 to i64 - %add.ptr6.i = getelementptr inbounds i8, ptr @_ZL23_double_parser_indicies, i64 %idx.ext5.i + %add.ptr6.i = getelementptr inbounds nuw i8, ptr @_ZL23_double_parser_indicies, i64 %idx.ext5.i %arrayidx8.i = getelementptr inbounds [9 x i8], ptr @_ZL24_double_parser_key_spans, i64 0, i64 %idxprom.i %6 = load i8, ptr %arrayidx8.i, align 1 %conv9.i = sext i8 %6 to i32 @@ -197,7 +197,7 @@ _resume.i: ; preds = %if.end62.i, %_resum br i1 %cmp14.not.i, label %cond.end.i, label %land.lhs.true15.i land.lhs.true15.i: ; preds = %_resume.i - %arrayidx17.i = getelementptr inbounds i8, ptr %add.ptr.i, i64 1 + %arrayidx17.i = getelementptr inbounds nuw i8, ptr %add.ptr.i, i64 1 %9 = load i8, ptr %arrayidx17.i, align 1 %conv18.i = zext i8 %9 to i32 %cmp19.not.i = icmp ugt i32 %conv13.i, %conv18.i diff --git a/bench/hyper-rs/optimized/4lwa0ukf5hd0n1ju.ll b/bench/hyper-rs/optimized/4lwa0ukf5hd0n1ju.ll index 4e44455cd78..364caef83c0 100644 --- a/bench/hyper-rs/optimized/4lwa0ukf5hd0n1ju.ll +++ b/bench/hyper-rs/optimized/4lwa0ukf5hd0n1ju.ll @@ -16,7 +16,7 @@ target triple = "x86_64-unknown-linux-gnu" define internal fastcc void @"_ZN4core3ptr169drop_in_place$LT$std..sync..mutex..MutexGuard$LT$tokio..sync..oneshot..Receiver$LT$core..result..Result$LT$hyper..upgrade..Upgraded$C$hyper..error..Error$GT$$GT$$GT$$GT$17h2f6c31385455227aE"(ptr %.0.val, i8 %.8.val) unnamed_addr #0 { %1 = icmp ne ptr %.0.val, null tail call void @llvm.assume(i1 %1) - %2 = getelementptr inbounds i8, ptr %.0.val, i64 4 + %2 = getelementptr inbounds nuw i8, ptr %.0.val, i64 4 %3 = trunc nuw i8 %.8.val to i1 br i1 %3, label %_ZN3std4sync6poison4Flag4done17h5bffa24fa61aa5e0E.exit.i, label %4 @@ -58,9 +58,9 @@ define void @"_ZN65_$LT$hyper..upgrade..Upgraded$u20$as$u20$hyper..rt..io..Write tail call void @llvm.experimental.noalias.scope.decl(metadata !4) tail call void @llvm.experimental.noalias.scope.decl(metadata !7) %6 = load ptr, ptr %1, align 8, !alias.scope !10, !noalias !11, !nonnull !18, !align !19, !noundef !18 - %7 = getelementptr inbounds i8, ptr %1, i64 8 + %7 = getelementptr inbounds nuw i8, ptr %1, i64 8 %8 = load ptr, ptr %7, align 8, !alias.scope !10, !noalias !11, !nonnull !18, !align !20, !noundef !18 - %9 = getelementptr inbounds i8, ptr %8, i64 32 + %9 = getelementptr inbounds nuw i8, ptr %8, i64 32 %10 = load ptr, ptr %9, align 8, !invariant.load !18, !noalias !21, !nonnull !18 tail call void %10(ptr noalias nocapture noundef nonnull sret({ i64, [1 x i64] }) align 8 dereferenceable(16) %0, ptr noalias noundef nonnull align 1 %6, ptr noalias noundef nonnull align 8 dereferenceable(8) %2, ptr noalias noundef nonnull readonly align 1 %3, i64 noundef %4), !noalias !10 ret void @@ -71,9 +71,9 @@ define void @"_ZN65_$LT$hyper..upgrade..Upgraded$u20$as$u20$hyper..rt..io..Write tail call void @llvm.experimental.noalias.scope.decl(metadata !22) tail call void @llvm.experimental.noalias.scope.decl(metadata !25) %6 = load ptr, ptr %1, align 8, !alias.scope !28, !noalias !29, !nonnull !18, !align !19, !noundef !18 - %7 = getelementptr inbounds i8, ptr %1, i64 8 + %7 = getelementptr inbounds nuw i8, ptr %1, i64 8 %8 = load ptr, ptr %7, align 8, !alias.scope !28, !noalias !29, !nonnull !18, !align !20, !noundef !18 - %9 = getelementptr inbounds i8, ptr %8, i64 64 + %9 = getelementptr inbounds nuw i8, ptr %8, i64 64 %10 = load ptr, ptr %9, align 8, !invariant.load !18, !noalias !36, !nonnull !18 tail call void %10(ptr noalias nocapture noundef nonnull sret({ i64, [1 x i64] }) align 8 dereferenceable(16) %0, ptr noalias noundef nonnull align 1 %6, ptr noalias noundef nonnull align 8 dereferenceable(8) %2, ptr noalias noundef nonnull readonly align 8 %3, i64 noundef %4), !noalias !28 ret void @@ -84,9 +84,9 @@ define { i64, ptr } @"_ZN65_$LT$hyper..upgrade..Upgraded$u20$as$u20$hyper..rt..i tail call void @llvm.experimental.noalias.scope.decl(metadata !37) tail call void @llvm.experimental.noalias.scope.decl(metadata !40) %3 = load ptr, ptr %0, align 8, !alias.scope !43, !noalias !44, !nonnull !18, !align !19, !noundef !18 - %4 = getelementptr inbounds i8, ptr %0, i64 8 + %4 = getelementptr inbounds nuw i8, ptr %0, i64 8 %5 = load ptr, ptr %4, align 8, !alias.scope !43, !noalias !44, !nonnull !18, !align !20, !noundef !18 - %6 = getelementptr inbounds i8, ptr %5, i64 40 + %6 = getelementptr inbounds nuw i8, ptr %5, i64 40 %7 = load ptr, ptr %6, align 8, !invariant.load !18, !noalias !47, !nonnull !18 %8 = tail call { i64, ptr } %7(ptr noalias noundef nonnull align 1 %3, ptr noalias noundef nonnull align 8 dereferenceable(8) %1), !noalias !43 ret { i64, ptr } %8 @@ -97,9 +97,9 @@ define { i64, ptr } @"_ZN65_$LT$hyper..upgrade..Upgraded$u20$as$u20$hyper..rt..i tail call void @llvm.experimental.noalias.scope.decl(metadata !48) tail call void @llvm.experimental.noalias.scope.decl(metadata !51) %3 = load ptr, ptr %0, align 8, !alias.scope !54, !noalias !55, !nonnull !18, !align !19, !noundef !18 - %4 = getelementptr inbounds i8, ptr %0, i64 8 + %4 = getelementptr inbounds nuw i8, ptr %0, i64 8 %5 = load ptr, ptr %4, align 8, !alias.scope !54, !noalias !55, !nonnull !18, !align !20, !noundef !18 - %6 = getelementptr inbounds i8, ptr %5, i64 48 + %6 = getelementptr inbounds nuw i8, ptr %5, i64 48 %7 = load ptr, ptr %6, align 8, !invariant.load !18, !noalias !58, !nonnull !18 %8 = tail call { i64, ptr } %7(ptr noalias noundef nonnull align 1 %3, ptr noalias noundef nonnull align 8 dereferenceable(8) %1), !noalias !54 ret { i64, ptr } %8 @@ -108,9 +108,9 @@ define { i64, ptr } @"_ZN65_$LT$hyper..upgrade..Upgraded$u20$as$u20$hyper..rt..i ; Function Attrs: nonlazybind uwtable define noundef zeroext i1 @"_ZN65_$LT$hyper..upgrade..Upgraded$u20$as$u20$hyper..rt..io..Write$GT$17is_write_vectored17h08ea83c3a35a1e4cE"(ptr nocapture noundef nonnull readonly align 8 %0) unnamed_addr #0 { %2 = load ptr, ptr %0, align 8, !nonnull !18, !align !19, !noundef !18 - %3 = getelementptr inbounds i8, ptr %0, i64 8 + %3 = getelementptr inbounds nuw i8, ptr %0, i64 8 %4 = load ptr, ptr %3, align 8, !nonnull !18, !align !20, !noundef !18 - %5 = getelementptr inbounds i8, ptr %4, i64 56 + %5 = getelementptr inbounds nuw i8, ptr %4, i64 56 %6 = load ptr, ptr %5, align 8, !invariant.load !18, !nonnull !18 %7 = tail call noundef zeroext i1 %6(ptr noundef nonnull align 1 %2) ret i1 %7 @@ -143,18 +143,18 @@ define void @"_ZN74_$LT$hyper..upgrade..OnUpgrade$u20$as$u20$core..future..futur 8: ; preds = %3 %9 = tail call noundef nonnull align 8 ptr @_ZN5alloc5alloc15exchange_malloc17hbe31f2048284b3faE.llvm.15489473380671106129(i64 noundef 24, i64 noundef 8), !noalias !59 store ptr null, ptr %9, align 8 - %.sroa.41.0..sroa_idx.i.i = getelementptr inbounds i8, ptr %9, i64 16 + %.sroa.41.0..sroa_idx.i.i = getelementptr inbounds nuw i8, ptr %9, i64 16 store i8 3, ptr %.sroa.41.0..sroa_idx.i.i, align 8 - %10 = getelementptr inbounds i8, ptr %0, i64 8 + %10 = getelementptr inbounds nuw i8, ptr %0, i64 8 store ptr null, ptr %10, align 8 - %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 16 + %.sroa.4.0..sroa_idx = getelementptr inbounds nuw i8, ptr %0, i64 16 store ptr %9, ptr %.sroa.4.0..sroa_idx, align 8 store i64 0, ptr %0, align 8 br label %33 11: ; preds = %3 call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %5) - %12 = getelementptr inbounds i8, ptr %6, i64 16 + %12 = getelementptr inbounds nuw i8, ptr %6, i64 16 %13 = cmpxchg ptr %12, i32 0, i32 1 acquire monotonic, align 4 %14 = extractvalue { i32, i1 } %13, 1 br i1 %14, label %_ZN3std3sys4unix5locks11futex_mutex5Mutex4lock17h2824c483f8557e8fE.exit, label %15 @@ -177,7 +177,7 @@ _ZN3std3sys4unix5locks11futex_mutex5Mutex4lock17h2824c483f8557e8fE.exit: ; preds "_ZN3std4sync5mutex19MutexGuard$LT$T$GT$3new17he50ff36318313e8aE.exit": ; preds = %_ZN3std3sys4unix5locks11futex_mutex5Mutex4lock17h2824c483f8557e8fE.exit, %19 %.0.i.i.i = phi i8 [ %22, %19 ], [ 0, %_ZN3std3sys4unix5locks11futex_mutex5Mutex4lock17h2824c483f8557e8fE.exit ] - %23 = getelementptr inbounds i8, ptr %6, i64 20 + %23 = getelementptr inbounds nuw i8, ptr %6, i64 20 %24 = tail call noundef i8 @_ZN4core4sync6atomic11atomic_load17h19072bbcd7d03f21E.llvm.4793779776936200877(ptr noundef nonnull %23, i8 noundef 0), !noalias !62 %.not = icmp eq i8 %24, 0 br i1 %.not, label %"_ZN4core6result19Result$LT$T$C$E$GT$6unwrap17h33b222dedd73d0cdE.exit", label %25 @@ -185,7 +185,7 @@ _ZN3std3sys4unix5locks11futex_mutex5Mutex4lock17h2824c483f8557e8fE.exit: ; preds 25: ; preds = %"_ZN3std4sync5mutex19MutexGuard$LT$T$GT$3new17he50ff36318313e8aE.exit" call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4), !noalias !65 store ptr %12, ptr %4, align 8, !noalias !65 - %26 = getelementptr inbounds i8, ptr %4, i64 8 + %26 = getelementptr inbounds nuw i8, ptr %4, i64 8 store i8 %.0.i.i.i, ptr %26, align 8, !noalias !65 invoke void @_ZN4core6result13unwrap_failed17h03d8a5018196e1cdE(ptr noalias noundef nonnull readonly align 1 @anon.e3fd6697359ea4b074a4c36e76bfe89c.24, i64 noundef 43, ptr noundef nonnull align 1 %4, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.e3fd6697359ea4b074a4c36e76bfe89c.25, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.e3fd6697359ea4b074a4c36e76bfe89c.28) #10 to label %29 unwind label %27, !noalias !65 @@ -210,7 +210,7 @@ common.resume: ; preds = %34, %27 resume { ptr, i32 } %common.resume.op "_ZN4core6result19Result$LT$T$C$E$GT$6unwrap17h33b222dedd73d0cdE.exit": ; preds = %"_ZN3std4sync5mutex19MutexGuard$LT$T$GT$3new17he50ff36318313e8aE.exit" - %32 = getelementptr inbounds i8, ptr %6, i64 24 + %32 = getelementptr inbounds nuw i8, ptr %6, i64 24 invoke void @"_ZN88_$LT$tokio..sync..oneshot..Receiver$LT$T$GT$$u20$as$u20$core..future..future..Future$GT$4poll17ha1c3207cbce60fc9E"(ptr noalias nocapture noundef nonnull sret({ i64, [6 x i64] }) align 8 dereferenceable(56) %5, ptr noalias noundef nonnull align 8 dereferenceable(8) %32, ptr noalias noundef nonnull align 8 dereferenceable(8) %2) to label %36 unwind label %34 @@ -229,11 +229,11 @@ common.resume: ; preds = %34, %27 br i1 %38, label %48, label %39 39: ; preds = %36 - %.sroa.427.0..sroa_idx = getelementptr inbounds i8, ptr %5, i64 8 + %.sroa.427.0..sroa_idx = getelementptr inbounds nuw i8, ptr %5, i64 8 %.sroa.427.0.copyload = load ptr, ptr %.sroa.427.0..sroa_idx, align 8 - %.sroa.528.0..sroa_idx = getelementptr inbounds i8, ptr %5, i64 16 + %.sroa.528.0..sroa_idx = getelementptr inbounds nuw i8, ptr %5, i64 16 %.sroa.528.0.copyload = load ptr, ptr %.sroa.528.0..sroa_idx, align 8 - %.sroa.629.0..sroa_idx = getelementptr inbounds i8, ptr %5, i64 24 + %.sroa.629.0..sroa_idx = getelementptr inbounds nuw i8, ptr %5, i64 24 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %.sroa.820) %trunc.i8 = trunc nuw i64 %37 to i1 br i1 %trunc.i8, label %42, label %40 @@ -248,7 +248,7 @@ common.resume: ; preds = %34, %27 .noexc: ; preds = %42 store ptr null, ptr %43, align 8, !noalias !69 - %.sroa.41.0..sroa_idx.i.i9 = getelementptr inbounds i8, ptr %43, i64 16 + %.sroa.41.0..sroa_idx.i.i9 = getelementptr inbounds nuw i8, ptr %43, i64 16 store i8 4, ptr %.sroa.41.0..sroa_idx.i.i9, align 8, !noalias !69 %44 = invoke noundef nonnull align 8 ptr @_ZN5hyper5error5Error4with17h3cb90ed44518dbbdE(ptr noalias noundef nonnull align 8 %43) to label %"_ZN74_$LT$hyper..upgrade..OnUpgrade$u20$as$u20$core..future..future..Future$GT$4poll28_$u7b$$u7b$closure$u7d$$u7d$17h602be501d17ab61aE.exit" unwind label %34 @@ -269,11 +269,11 @@ common.resume: ; preds = %34, %27 "_ZN74_$LT$hyper..upgrade..OnUpgrade$u20$as$u20$core..future..future..Future$GT$4poll28_$u7b$$u7b$closure$u7d$$u7d$17h602be501d17ab61aE.exit": ; preds = %46, %45, %.noexc %.sroa.016.0 = phi ptr [ null, %46 ], [ %.sroa.427.0.copyload, %45 ], [ null, %.noexc ] %.sroa.6.0 = phi ptr [ %.sroa.528.0.copyload, %46 ], [ %.sroa.528.0.copyload, %45 ], [ %44, %.noexc ] - %49 = getelementptr inbounds i8, ptr %0, i64 8 + %49 = getelementptr inbounds nuw i8, ptr %0, i64 8 store ptr %.sroa.016.0, ptr %49, align 8 - %.sroa.6.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 16 + %.sroa.6.0..sroa_idx = getelementptr inbounds nuw i8, ptr %0, i64 16 store ptr %.sroa.6.0, ptr %.sroa.6.0..sroa_idx, align 8 - %.sroa.820.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 24 + %.sroa.820.0..sroa_idx = getelementptr inbounds nuw i8, ptr %0, i64 24 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %.sroa.820.0..sroa_idx, ptr noundef nonnull align 8 dereferenceable(32) %.sroa.820, i64 32, i1 false) store i64 0, ptr %0, align 8 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %.sroa.820) diff --git a/bench/hyper-rs/optimized/5drhzjx8c241ue20.ll b/bench/hyper-rs/optimized/5drhzjx8c241ue20.ll index f0a9f64173d..212296a06c8 100644 --- a/bench/hyper-rs/optimized/5drhzjx8c241ue20.ll +++ b/bench/hyper-rs/optimized/5drhzjx8c241ue20.ll @@ -24,7 +24,7 @@ target triple = "x86_64-unknown-linux-gnu" ; Function Attrs: nonlazybind uwtable define internal void @"_ZN4core3ptr118drop_in_place$LT$alloc..boxed..Box$LT$dyn$u20$core..error..Error$u2b$core..marker..Send$u2b$core..marker..Sync$GT$$GT$17h87dc17a134121ec4E"(ptr noalias nocapture noundef readonly align 8 dereferenceable(16) %0) unnamed_addr #0 personality ptr @rust_eh_personality { %2 = load ptr, ptr %0, align 8, !noundef !4 - %3 = getelementptr inbounds i8, ptr %0, i64 8 + %3 = getelementptr inbounds nuw i8, ptr %0, i64 8 %4 = load ptr, ptr %3, align 8, !nonnull !4, !align !5, !noundef !4 %5 = load ptr, ptr %4, align 8, !invariant.load !4, !nonnull !4 invoke void %5(ptr noundef nonnull align 1 %2) @@ -33,9 +33,9 @@ define internal void @"_ZN4core3ptr118drop_in_place$LT$alloc..boxed..Box$LT$dyn$ 6: ; preds = %1 %7 = landingpad { ptr, i32 } cleanup - %8 = getelementptr inbounds i8, ptr %4, i64 8 + %8 = getelementptr inbounds nuw i8, ptr %4, i64 8 %9 = load i64, ptr %8, align 8, !range !6, !invariant.load !4 - %10 = getelementptr inbounds i8, ptr %4, i64 16 + %10 = getelementptr inbounds nuw i8, ptr %4, i64 16 %11 = load i64, ptr %10, align 8, !range !7, !invariant.load !4 %12 = icmp ult i64 %11, -9223372036854775807 tail call void @llvm.assume(i1 %12) @@ -47,9 +47,9 @@ define internal void @"_ZN4core3ptr118drop_in_place$LT$alloc..boxed..Box$LT$dyn$ br label %"_ZN72_$LT$alloc..boxed..Box$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h952641b8fa9b7806E.exit" 15: ; preds = %1 - %16 = getelementptr inbounds i8, ptr %4, i64 8 + %16 = getelementptr inbounds nuw i8, ptr %4, i64 8 %17 = load i64, ptr %16, align 8, !range !6, !invariant.load !4 - %18 = getelementptr inbounds i8, ptr %4, i64 16 + %18 = getelementptr inbounds nuw i8, ptr %4, i64 16 %19 = load i64, ptr %18, align 8, !range !7, !invariant.load !4 %20 = icmp ult i64 %19, -9223372036854775807 tail call void @llvm.assume(i1 %20) @@ -150,7 +150,7 @@ _ZN5alloc5alloc15exchange_malloc17hbe31f2048284b3faE.llvm.15489473380671106129.e ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(read, inaccessiblemem: none) uwtable define noundef zeroext i1 @_ZN5hyper5error5Error8is_parse17hd2c1366ab7c61d6eE(ptr noalias nocapture noundef readonly align 8 dereferenceable(8) %0) unnamed_addr #4 { %2 = load ptr, ptr %0, align 8, !nonnull !4, !align !5, !noundef !4 - %3 = getelementptr inbounds i8, ptr %2, i64 16 + %3 = getelementptr inbounds nuw i8, ptr %2, i64 16 %4 = load i8, ptr %3, align 8, !range !8, !noundef !4 %5 = icmp ult i8 %4, 3 ret i1 %5 @@ -159,7 +159,7 @@ define noundef zeroext i1 @_ZN5hyper5error5Error8is_parse17hd2c1366ab7c61d6eE(pt ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(read, inaccessiblemem: none) uwtable define noundef zeroext i1 @_ZN5hyper5error5Error15is_parse_status17h3c21c16c065f392cE(ptr noalias nocapture noundef readonly align 8 dereferenceable(8) %0) unnamed_addr #4 { %2 = load ptr, ptr %0, align 8, !nonnull !4, !align !5, !noundef !4 - %3 = getelementptr inbounds i8, ptr %2, i64 16 + %3 = getelementptr inbounds nuw i8, ptr %2, i64 16 %4 = load i8, ptr %3, align 8, !range !8, !noundef !4 %5 = icmp eq i8 %4, 2 ret i1 %5 @@ -168,7 +168,7 @@ define noundef zeroext i1 @_ZN5hyper5error5Error15is_parse_status17h3c21c16c065f ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(read, inaccessiblemem: none) uwtable define noundef zeroext i1 @_ZN5hyper5error5Error7is_user17h47a222b104bd596dE(ptr noalias nocapture noundef readonly align 8 dereferenceable(8) %0) unnamed_addr #4 { %2 = load ptr, ptr %0, align 8, !nonnull !4, !align !5, !noundef !4 - %3 = getelementptr inbounds i8, ptr %2, i64 16 + %3 = getelementptr inbounds nuw i8, ptr %2, i64 16 %4 = load i8, ptr %3, align 8, !range !8, !noundef !4 %5 = icmp eq i8 %4, 3 ret i1 %5 @@ -177,7 +177,7 @@ define noundef zeroext i1 @_ZN5hyper5error5Error7is_user17h47a222b104bd596dE(ptr ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(read, inaccessiblemem: none) uwtable define noundef zeroext i1 @_ZN5hyper5error5Error11is_canceled17h3a95d1757eae4a46E(ptr noalias nocapture noundef readonly align 8 dereferenceable(8) %0) unnamed_addr #4 { %2 = load ptr, ptr %0, align 8, !nonnull !4, !align !5, !noundef !4 - %3 = getelementptr inbounds i8, ptr %2, i64 16 + %3 = getelementptr inbounds nuw i8, ptr %2, i64 16 %4 = load i8, ptr %3, align 8, !range !8, !noundef !4 %5 = icmp eq i8 %4, 4 ret i1 %5 @@ -208,7 +208,7 @@ define noundef zeroext i1 @_ZN5hyper5error5Error10is_timeout17h1bdf15bba89e103aE br i1 %4, label %_ZN5hyper5error5Error11find_source17ha0785acde139003fE.exit, label %.lr.ph.preheader.i .lr.ph.preheader.i: ; preds = %1 - %5 = getelementptr inbounds i8, ptr %2, i64 8 + %5 = getelementptr inbounds nuw i8, ptr %2, i64 8 %6 = load ptr, ptr %5, align 8, !noalias !15, !nonnull !4, !align !5, !noundef !4 br label %.lr.ph.i @@ -218,14 +218,14 @@ define noundef zeroext i1 @_ZN5hyper5error5Error10is_timeout17h1bdf15bba89e103aE %7 = icmp ne ptr %.sroa.4.013.i, null tail call void @llvm.assume(i1 %7) tail call void @llvm.experimental.noalias.scope.decl(metadata !16) - %8 = getelementptr inbounds i8, ptr %.sroa.4.013.i, i64 56 + %8 = getelementptr inbounds nuw i8, ptr %.sroa.4.013.i, i64 56 %9 = load ptr, ptr %8, align 8, !invariant.load !4, !alias.scope !16, !nonnull !4 %10 = tail call noundef i128 %9(ptr noundef nonnull align 1 %.sroa.0.014.i), !noalias !16 %.not11.i = icmp eq i128 %10, -3455604291313433198194752821752098272 br i1 %.not11.i, label %_ZN5hyper5error5Error11find_source17ha0785acde139003fE.exit, label %11 11: ; preds = %.lr.ph.i - %12 = getelementptr inbounds i8, ptr %.sroa.4.013.i, i64 48 + %12 = getelementptr inbounds nuw i8, ptr %.sroa.4.013.i, i64 48 %13 = load ptr, ptr %12, align 8, !invariant.load !4, !nonnull !4 %14 = tail call { ptr, ptr } %13(ptr noundef nonnull align 1 %.sroa.0.014.i) %.sroa.4.0.i = extractvalue { ptr, ptr } %14, 1 @@ -242,7 +242,7 @@ _ZN5hyper5error5Error11find_source17ha0785acde139003fE.exit: ; preds = %.lr.ph.i define hidden noalias noundef nonnull align 8 ptr @_ZN5hyper5error5Error3new17h1a0c7787d1136bedE.llvm.15489473380671106129(i8 noundef %0) unnamed_addr #0 personality ptr @rust_eh_personality { %2 = alloca { { ptr, ptr }, i8, [7 x i8] }, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) - %3 = getelementptr inbounds i8, ptr %2, i64 16 + %3 = getelementptr inbounds nuw i8, ptr %2, i64 16 store i8 %0, ptr %3, align 8 store ptr null, ptr %2, align 8 %4 = load volatile i8, ptr @__rust_no_alloc_shim_is_unstable, align 1, !noalias !19 @@ -282,7 +282,7 @@ define hidden noalias noundef nonnull align 8 ptr @_ZN5hyper5error5Error3new17h1 define hidden noalias noundef nonnull align 8 ptr @_ZN5hyper5error5Error12new_canceled17h6f0141154027c4adE() unnamed_addr #0 personality ptr @rust_eh_personality { %1 = alloca { { ptr, ptr }, i8, [7 x i8] }, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %1) - %2 = getelementptr inbounds i8, ptr %1, i64 16 + %2 = getelementptr inbounds nuw i8, ptr %1, i64 16 store i8 4, ptr %2, align 8 store ptr null, ptr %1, align 8 %3 = load volatile i8, ptr @__rust_no_alloc_shim_is_unstable, align 1, !noalias !22 @@ -322,7 +322,7 @@ _ZN5hyper5error5Error3new17h1a0c7787d1136bedE.llvm.15489473380671106129.exit: ; define hidden noalias noundef nonnull align 8 ptr @_ZN5hyper5error5Error8new_user17hbe76fa3fee32946bE.llvm.15489473380671106129() unnamed_addr #0 personality ptr @rust_eh_personality { %1 = alloca { { ptr, ptr }, i8, [7 x i8] }, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %1) - %2 = getelementptr inbounds i8, ptr %1, i64 16 + %2 = getelementptr inbounds nuw i8, ptr %1, i64 16 store i8 3, ptr %2, align 8 store ptr null, ptr %1, align 8 %3 = load volatile i8, ptr @__rust_no_alloc_shim_is_unstable, align 1, !noalias !25 @@ -362,7 +362,7 @@ _ZN5hyper5error5Error3new17h1a0c7787d1136bedE.llvm.15489473380671106129.exit: ; define hidden noalias noundef nonnull align 8 ptr @_ZN5hyper5error5Error19new_user_no_upgrade17h72ede754feca9347E() unnamed_addr #0 personality ptr @rust_eh_personality { %1 = alloca { { ptr, ptr }, i8, [7 x i8] }, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %1) - %2 = getelementptr inbounds i8, ptr %1, i64 16 + %2 = getelementptr inbounds nuw i8, ptr %1, i64 16 store i8 3, ptr %2, align 8 store ptr null, ptr %1, align 8 %3 = load volatile i8, ptr @__rust_no_alloc_shim_is_unstable, align 1, !noalias !28 @@ -404,7 +404,7 @@ define noundef zeroext i1 @"_ZN56_$LT$hyper..error..Error$u20$as$u20$core..fmt.. call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) call void @_ZN4core3fmt9Formatter11debug_tuple17hdafdf15840d214fbE(ptr noalias nocapture noundef nonnull sret({ i64, ptr, i8, i8, [6 x i8] }) align 8 dereferenceable(24) %3, ptr noalias noundef nonnull align 8 dereferenceable(64) %1, ptr noalias noundef nonnull readonly align 1 @anon.3ec2cf8333d55addd664f7f348231227.6, i64 noundef 12) %4 = load ptr, ptr %0, align 8, !nonnull !4, !align !5, !noundef !4 - %5 = getelementptr inbounds i8, ptr %4, i64 16 + %5 = getelementptr inbounds nuw i8, ptr %4, i64 16 %6 = call noundef align 8 dereferenceable(24) ptr @_ZN4core3fmt8builders10DebugTuple5field17h93f7018964b8f2e6E(ptr noalias noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 1 %5, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.3ec2cf8333d55addd664f7f348231227.7) %7 = load ptr, ptr %4, align 8, !noundef !4 %.not = icmp eq ptr %7, null @@ -423,7 +423,7 @@ define noundef zeroext i1 @"_ZN56_$LT$hyper..error..Error$u20$as$u20$core..fmt.. ; Function Attrs: nonlazybind uwtable define noundef zeroext i1 @"_ZN58_$LT$hyper..error..Error$u20$as$u20$core..fmt..Display$GT$3fmt17hc5e7a82ff744cd55E"(ptr noalias nocapture noundef readonly align 8 dereferenceable(8) %0, ptr noalias noundef align 8 dereferenceable(64) %1) unnamed_addr #0 { %.val = load ptr, ptr %0, align 8, !nonnull !4, !align !5, !noundef !4 - %3 = getelementptr inbounds i8, ptr %.val, i64 16 + %3 = getelementptr inbounds nuw i8, ptr %.val, i64 16 %4 = load i8, ptr %3, align 8, !range !8, !noundef !4 %5 = add nsw i8 %4, -3 %6 = icmp ult i8 %5, 2 @@ -444,10 +444,10 @@ define noundef zeroext i1 @"_ZN58_$LT$hyper..error..Error$u20$as$u20$core..fmt.. switch.lookup: ; preds = %2 %12 = zext nneg i8 %4 to i64 - %switch.gep = getelementptr inbounds [3 x i64], ptr @"switch.table._ZN58_$LT$hyper..error..Error$u20$as$u20$core..fmt..Display$GT$3fmt17hc5e7a82ff744cd55E", i64 0, i64 %12 + %switch.gep = getelementptr inbounds nuw [3 x i64], ptr @"switch.table._ZN58_$LT$hyper..error..Error$u20$as$u20$core..fmt..Display$GT$3fmt17hc5e7a82ff744cd55E", i64 0, i64 %12 %switch.load = load i64, ptr %switch.gep, align 8 %13 = zext nneg i8 %4 to i64 - %switch.gep1 = getelementptr inbounds [3 x ptr], ptr @"switch.table._ZN58_$LT$hyper..error..Error$u20$as$u20$core..fmt..Display$GT$3fmt17hc5e7a82ff744cd55E.5", i64 0, i64 %13 + %switch.gep1 = getelementptr inbounds nuw [3 x ptr], ptr @"switch.table._ZN58_$LT$hyper..error..Error$u20$as$u20$core..fmt..Display$GT$3fmt17hc5e7a82ff744cd55E.5", i64 0, i64 %13 %switch.load2 = load ptr, ptr %switch.gep1, align 8 br label %_ZN5hyper5error5Error11description17h6d73044e091ba8ddE.exit @@ -466,7 +466,7 @@ define { ptr, ptr } @"_ZN58_$LT$hyper..error..Error$u20$as$u20$core..error..Erro br i1 %4, label %8, label %5 5: ; preds = %1 - %6 = getelementptr inbounds i8, ptr %2, i64 8 + %6 = getelementptr inbounds nuw i8, ptr %2, i64 8 %7 = load ptr, ptr %6, align 8, !nonnull !4, !align !5, !noundef !4 br label %8 @@ -481,7 +481,7 @@ define { ptr, ptr } @"_ZN58_$LT$hyper..error..Error$u20$as$u20$core..error..Erro define noalias noundef nonnull align 8 ptr @"_ZN86_$LT$hyper..error..Error$u20$as$u20$core..convert..From$LT$hyper..error..Parse$GT$$GT$4from17h537ad657241c3f7bE"(i8 noundef %0) unnamed_addr #0 personality ptr @rust_eh_personality { %2 = alloca { { ptr, ptr }, i8, [7 x i8] }, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) - %3 = getelementptr inbounds i8, ptr %2, i64 16 + %3 = getelementptr inbounds nuw i8, ptr %2, i64 16 store i8 %0, ptr %3, align 8 store ptr null, ptr %2, align 8 %4 = load volatile i8, ptr @__rust_no_alloc_shim_is_unstable, align 1, !noalias !31 diff --git a/bench/libdeflate/optimized/crc32.c.ll b/bench/libdeflate/optimized/crc32.c.ll index 906d021b368..08249295315 100644 --- a/bench/libdeflate/optimized/crc32.c.ll +++ b/bench/libdeflate/optimized/crc32.c.ll @@ -72,7 +72,7 @@ for.body: ; preds = %entry, %for.body %conv2 = zext i8 %2 to i32 %xor = xor i32 %conv1, %conv2 %idxprom = zext nneg i32 %xor to i64 - %arrayidx = getelementptr inbounds [2048 x i32], ptr @crc32_slice8_table, i64 0, i64 %idxprom + %arrayidx = getelementptr inbounds nuw [2048 x i32], ptr @crc32_slice8_table, i64 0, i64 %idxprom %3 = load i32, ptr %arrayidx, align 4 %xor3 = xor i32 %3, %shr %incdec.ptr = getelementptr inbounds i8, ptr %p.addr.033, i64 1 @@ -110,51 +110,51 @@ for.body9: ; preds = %for.end, %for.body9 %conv15 = and i32 %xor12, 255 %add = or disjoint i32 %conv15, 1792 %idxprom16 = zext nneg i32 %add to i64 - %arrayidx17 = getelementptr inbounds [2048 x i32], ptr @crc32_slice8_table, i64 0, i64 %idxprom16 + %arrayidx17 = getelementptr inbounds nuw [2048 x i32], ptr @crc32_slice8_table, i64 0, i64 %idxprom16 %8 = load i32, ptr %arrayidx17, align 4 %shr19 = lshr i32 %xor12, 8 %conv21 = and i32 %shr19, 255 %add22 = or disjoint i32 %conv21, 1536 %idxprom23 = zext nneg i32 %add22 to i64 - %arrayidx24 = getelementptr inbounds [2048 x i32], ptr @crc32_slice8_table, i64 0, i64 %idxprom23 + %arrayidx24 = getelementptr inbounds nuw [2048 x i32], ptr @crc32_slice8_table, i64 0, i64 %idxprom23 %9 = load i32, ptr %arrayidx24, align 4 %xor25 = xor i32 %9, %8 %shr27 = lshr i32 %xor12, 16 %conv29 = and i32 %shr27, 255 %add30 = or disjoint i32 %conv29, 1280 %idxprom31 = zext nneg i32 %add30 to i64 - %arrayidx32 = getelementptr inbounds [2048 x i32], ptr @crc32_slice8_table, i64 0, i64 %idxprom31 + %arrayidx32 = getelementptr inbounds nuw [2048 x i32], ptr @crc32_slice8_table, i64 0, i64 %idxprom31 %10 = load i32, ptr %arrayidx32, align 4 %xor33 = xor i32 %xor25, %10 %shr35 = lshr i32 %xor12, 24 %add38 = or disjoint i32 %shr35, 1024 %idxprom39 = zext nneg i32 %add38 to i64 - %arrayidx40 = getelementptr inbounds [2048 x i32], ptr @crc32_slice8_table, i64 0, i64 %idxprom39 + %arrayidx40 = getelementptr inbounds nuw [2048 x i32], ptr @crc32_slice8_table, i64 0, i64 %idxprom39 %11 = load i32, ptr %arrayidx40, align 4 %xor41 = xor i32 %xor33, %11 %conv44 = and i32 %7, 255 %add45 = or disjoint i32 %conv44, 768 %idxprom46 = zext nneg i32 %add45 to i64 - %arrayidx47 = getelementptr inbounds [2048 x i32], ptr @crc32_slice8_table, i64 0, i64 %idxprom46 + %arrayidx47 = getelementptr inbounds nuw [2048 x i32], ptr @crc32_slice8_table, i64 0, i64 %idxprom46 %12 = load i32, ptr %arrayidx47, align 4 %xor48 = xor i32 %xor41, %12 %shr49 = lshr i32 %7, 8 %conv51 = and i32 %shr49, 255 %add52 = or disjoint i32 %conv51, 512 %idxprom53 = zext nneg i32 %add52 to i64 - %arrayidx54 = getelementptr inbounds [2048 x i32], ptr @crc32_slice8_table, i64 0, i64 %idxprom53 + %arrayidx54 = getelementptr inbounds nuw [2048 x i32], ptr @crc32_slice8_table, i64 0, i64 %idxprom53 %13 = load i32, ptr %arrayidx54, align 4 %xor55 = xor i32 %xor48, %13 %shr56 = lshr i32 %7, 16 %conv58 = and i32 %shr56, 255 %add59 = or disjoint i32 %conv58, 256 %idxprom60 = zext nneg i32 %add59 to i64 - %arrayidx61 = getelementptr inbounds [2048 x i32], ptr @crc32_slice8_table, i64 0, i64 %idxprom60 + %arrayidx61 = getelementptr inbounds nuw [2048 x i32], ptr @crc32_slice8_table, i64 0, i64 %idxprom60 %14 = load i32, ptr %arrayidx61, align 4 %xor62 = xor i32 %xor55, %14 %shr63 = lshr i32 %7, 24 %idxprom67 = zext nneg i32 %shr63 to i64 - %arrayidx68 = getelementptr inbounds [2048 x i32], ptr @crc32_slice8_table, i64 0, i64 %idxprom67 + %arrayidx68 = getelementptr inbounds nuw [2048 x i32], ptr @crc32_slice8_table, i64 0, i64 %idxprom67 %15 = load i32, ptr %arrayidx68, align 4 %xor69 = xor i32 %xor62, %15 %add.ptr71 = getelementptr inbounds i8, ptr %p.addr.138, i64 8 @@ -170,7 +170,7 @@ for.body76: ; preds = %for.cond73.preheade %conv80 = zext i8 %16 to i32 %xor81 = xor i32 %conv79, %conv80 %idxprom82 = zext nneg i32 %xor81 to i64 - %arrayidx83 = getelementptr inbounds [2048 x i32], ptr @crc32_slice8_table, i64 0, i64 %idxprom82 + %arrayidx83 = getelementptr inbounds nuw [2048 x i32], ptr @crc32_slice8_table, i64 0, i64 %idxprom82 %17 = load i32, ptr %arrayidx83, align 4 %xor84 = xor i32 %17, %shr77 %incdec.ptr86 = getelementptr inbounds i8, ptr %p.addr.243, i64 1 @@ -201,12 +201,12 @@ for.body.i: ; preds = %for.cond.i.preheade %i.i.0329 = phi i64 [ %inc.i, %for.body.i ], [ 0, %for.cond.i.preheader ] %shr.i = lshr i32 %crc.addr.i.0330, 8 %conv1.i = and i32 %crc.addr.i.0330, 255 - %arrayidx.i = getelementptr inbounds i8, ptr %p, i64 %i.i.0329 + %arrayidx.i = getelementptr inbounds nuw i8, ptr %p, i64 %i.i.0329 %0 = load i8, ptr %arrayidx.i, align 1 %conv2.i = zext i8 %0 to i32 %xor.i = xor i32 %conv1.i, %conv2.i %idxprom.i = zext nneg i32 %xor.i to i64 - %arrayidx3.i = getelementptr inbounds [256 x i32], ptr @crc32_slice1_table, i64 0, i64 %idxprom.i + %arrayidx3.i = getelementptr inbounds nuw [256 x i32], ptr @crc32_slice1_table, i64 0, i64 %idxprom.i %1 = load i32, ptr %arrayidx3.i, align 4 %xor4.i = xor i32 %1, %shr.i %inc.i = add nuw nsw i64 %i.i.0329, 1 @@ -218,17 +218,17 @@ if.end: ; preds = %if.then %vecinit3.i219 = insertelement <4 x i32> , i32 %crc, i64 0 %3 = bitcast <4 x i32> %vecinit3.i219 to <2 x i64> %xor.i194 = xor <2 x i64> %2, %3 - %add.ptr = getelementptr inbounds i8, ptr %p, i64 16 + %add.ptr = getelementptr inbounds nuw i8, ptr %p, i64 16 %cmp13 = icmp ugt i64 %len, 63 br i1 %cmp13, label %if.then14, label %if.else if.then14: ; preds = %if.end %4 = load <2 x i64>, ptr %add.ptr, align 1 - %add.ptr17 = getelementptr inbounds i8, ptr %p, i64 32 + %add.ptr17 = getelementptr inbounds nuw i8, ptr %p, i64 32 %5 = load <2 x i64>, ptr %add.ptr17, align 1 - %add.ptr19 = getelementptr inbounds i8, ptr %p, i64 48 + %add.ptr19 = getelementptr inbounds nuw i8, ptr %p, i64 48 %6 = load <2 x i64>, ptr %add.ptr19, align 1 - %p.addr.0313 = getelementptr inbounds i8, ptr %p, i64 64 + %p.addr.0313 = getelementptr inbounds nuw i8, ptr %p, i64 64 %cmp22314 = icmp ugt i64 %len, 127 br i1 %cmp22314, label %while.body, label %while.end @@ -334,7 +334,7 @@ if.then56: ; preds = %if.else %xor.i4.i425 = xor <2 x i64> %37, %36 %38 = tail call <2 x i64> @llvm.x86.pclmulqdq(<2 x i64> %xor.i194, <2 x i64> , i8 17) %xor.i.i426 = xor <2 x i64> %xor.i4.i425, %38 - %add.ptr59 = getelementptr inbounds i8, ptr %p, i64 32 + %add.ptr59 = getelementptr inbounds nuw i8, ptr %p, i64 32 %cmp60 = icmp ugt i64 %len, 47 br i1 %cmp60, label %if.then61, label %if.end138 @@ -344,7 +344,7 @@ if.then61: ; preds = %if.then56 %xor.i4.i416 = xor <2 x i64> %40, %39 %41 = tail call <2 x i64> @llvm.x86.pclmulqdq(<2 x i64> %xor.i.i426, <2 x i64> , i8 17) %xor.i.i417 = xor <2 x i64> %xor.i4.i416, %41 - %add.ptr64 = getelementptr inbounds i8, ptr %p, i64 48 + %add.ptr64 = getelementptr inbounds nuw i8, ptr %p, i64 48 br label %if.end138 if.else68: ; preds = %entry @@ -355,21 +355,21 @@ if.else68: ; preds = %entry %vecinit3.i213 = insertelement <4 x i32> , i32 %crc, i64 0 %44 = bitcast <4 x i32> %vecinit3.i213 to <2 x i64> %xor.i191 = xor <2 x i64> %43, %44 - %add.ptr74 = getelementptr inbounds i8, ptr %p, i64 16 + %add.ptr74 = getelementptr inbounds nuw i8, ptr %p, i64 16 %tobool75.not = icmp eq i64 %and70, 0 br i1 %tobool75.not, label %if.end80, label %if.then76 if.then76: ; preds = %if.else68 - %arrayidx.i538 = getelementptr inbounds [48 x i8], ptr @fold_partial_vec_pclmul_avx.shift_tab, i64 0, i64 %and70 + %arrayidx.i538 = getelementptr inbounds nuw [48 x i8], ptr @fold_partial_vec_pclmul_avx.shift_tab, i64 0, i64 %and70 %45 = load <16 x i8>, ptr %arrayidx.i538, align 1 %add.i539 = or disjoint i64 %and70, 16 - %arrayidx1.i540 = getelementptr inbounds [48 x i8], ptr @fold_partial_vec_pclmul_avx.shift_tab, i64 0, i64 %add.i539 + %arrayidx1.i540 = getelementptr inbounds nuw [48 x i8], ptr @fold_partial_vec_pclmul_avx.shift_tab, i64 0, i64 %add.i539 %46 = load <16 x i8>, ptr %arrayidx1.i540, align 1 %47 = bitcast <2 x i64> %xor.i191 to <16 x i8> %48 = tail call <16 x i8> @llvm.x86.ssse3.pshuf.b.128(<16 x i8> %47, <16 x i8> %45) %49 = bitcast <16 x i8> %48 to <2 x i64> %50 = tail call <16 x i8> @llvm.x86.ssse3.pshuf.b.128(<16 x i8> %47, <16 x i8> %46) - %add.ptr.i543 = getelementptr inbounds i8, ptr %add.ptr74, i64 %and70 + %add.ptr.i543 = getelementptr inbounds nuw i8, ptr %add.ptr74, i64 %and70 %add.ptr5.i544 = getelementptr inbounds i8, ptr %add.ptr.i543, i64 -16 %51 = load <16 x i8>, ptr %add.ptr5.i544, align 1 %52 = tail call <16 x i8> @llvm.x86.sse41.pblendvb(<16 x i8> %50, <16 x i8> %51, <16 x i8> %46) @@ -575,10 +575,10 @@ if.end138: ; preds = %if.end130, %if.then br i1 %tobool140.not, label %if.end143, label %if.then141 if.then141: ; preds = %if.end138 - %arrayidx.i519 = getelementptr inbounds [48 x i8], ptr @fold_partial_vec_pclmul_avx.shift_tab, i64 0, i64 %and139 + %arrayidx.i519 = getelementptr inbounds nuw [48 x i8], ptr @fold_partial_vec_pclmul_avx.shift_tab, i64 0, i64 %and139 %126 = load <16 x i8>, ptr %arrayidx.i519, align 1 %add.i = or disjoint i64 %and139, 16 - %arrayidx1.i = getelementptr inbounds [48 x i8], ptr @fold_partial_vec_pclmul_avx.shift_tab, i64 0, i64 %add.i + %arrayidx1.i = getelementptr inbounds nuw [48 x i8], ptr @fold_partial_vec_pclmul_avx.shift_tab, i64 0, i64 %add.i %127 = load <16 x i8>, ptr %arrayidx1.i, align 1 %128 = bitcast <2 x i64> %v0.2 to <16 x i8> %129 = tail call <16 x i8> @llvm.x86.ssse3.pshuf.b.128(<16 x i8> %128, <16 x i8> %126) @@ -639,12 +639,12 @@ for.body.i203: ; preds = %for.cond.i201.prehe %i.i200.0324 = phi i64 [ %inc.i213, %for.body.i203 ], [ 0, %for.cond.i201.preheader ] %shr.i204 = lshr i32 %crc.addr.i197.0325, 8 %conv1.i206 = and i32 %crc.addr.i197.0325, 255 - %arrayidx.i207 = getelementptr inbounds i8, ptr %p, i64 %i.i200.0324 + %arrayidx.i207 = getelementptr inbounds nuw i8, ptr %p, i64 %i.i200.0324 %0 = load i8, ptr %arrayidx.i207, align 1 %conv2.i208 = zext i8 %0 to i32 %xor.i209 = xor i32 %conv1.i206, %conv2.i208 %idxprom.i210 = zext nneg i32 %xor.i209 to i64 - %arrayidx3.i211 = getelementptr inbounds [256 x i32], ptr @crc32_slice1_table, i64 0, i64 %idxprom.i210 + %arrayidx3.i211 = getelementptr inbounds nuw [256 x i32], ptr @crc32_slice1_table, i64 0, i64 %idxprom.i210 %1 = load i32, ptr %arrayidx3.i211, align 4 %xor4.i212 = xor i32 %1, %shr.i204 %inc.i213 = add nuw nsw i64 %i.i200.0324, 1 @@ -656,17 +656,17 @@ if.end: ; preds = %if.then %vecinit3.i251 = insertelement <4 x i32> , i32 %crc, i64 0 %3 = bitcast <4 x i32> %vecinit3.i251 to <2 x i64> %xor.i227 = xor <2 x i64> %2, %3 - %add.ptr = getelementptr inbounds i8, ptr %p, i64 16 + %add.ptr = getelementptr inbounds nuw i8, ptr %p, i64 16 %cmp13 = icmp ugt i64 %len, 63 br i1 %cmp13, label %if.then14, label %if.else if.then14: ; preds = %if.end %4 = load <2 x i64>, ptr %add.ptr, align 1 - %add.ptr17 = getelementptr inbounds i8, ptr %p, i64 32 + %add.ptr17 = getelementptr inbounds nuw i8, ptr %p, i64 32 %5 = load <2 x i64>, ptr %add.ptr17, align 1 - %add.ptr19 = getelementptr inbounds i8, ptr %p, i64 48 + %add.ptr19 = getelementptr inbounds nuw i8, ptr %p, i64 48 %6 = load <2 x i64>, ptr %add.ptr19, align 1 - %p.addr.0304 = getelementptr inbounds i8, ptr %p, i64 64 + %p.addr.0304 = getelementptr inbounds nuw i8, ptr %p, i64 64 %cmp22305 = icmp ugt i64 %len, 127 br i1 %cmp22305, label %while.body, label %while.end @@ -772,7 +772,7 @@ if.then56: ; preds = %if.else %xor.i4.i465 = xor <2 x i64> %37, %36 %38 = tail call <2 x i64> @llvm.x86.pclmulqdq(<2 x i64> %xor.i227, <2 x i64> , i8 17) %xor.i.i466 = xor <2 x i64> %xor.i4.i465, %38 - %add.ptr59 = getelementptr inbounds i8, ptr %p, i64 32 + %add.ptr59 = getelementptr inbounds nuw i8, ptr %p, i64 32 %cmp60 = icmp ugt i64 %len, 47 br i1 %cmp60, label %if.then61, label %if.end137 @@ -782,7 +782,7 @@ if.then61: ; preds = %if.then56 %xor.i4.i456 = xor <2 x i64> %40, %39 %41 = tail call <2 x i64> @llvm.x86.pclmulqdq(<2 x i64> %xor.i.i466, <2 x i64> , i8 17) %xor.i.i457 = xor <2 x i64> %xor.i4.i456, %41 - %add.ptr64 = getelementptr inbounds i8, ptr %p, i64 48 + %add.ptr64 = getelementptr inbounds nuw i8, ptr %p, i64 48 br label %if.end137 if.else68: ; preds = %entry @@ -797,12 +797,12 @@ for.body.i185: ; preds = %if.else68, %for.bod %i.i182.0302 = phi i64 [ %inc.i195, %for.body.i185 ], [ 0, %if.else68 ] %shr.i186 = lshr i32 %crc.addr.i179.0303, 8 %conv1.i188 = and i32 %crc.addr.i179.0303, 255 - %arrayidx.i189 = getelementptr inbounds i8, ptr %p, i64 %i.i182.0302 + %arrayidx.i189 = getelementptr inbounds nuw i8, ptr %p, i64 %i.i182.0302 %43 = load i8, ptr %arrayidx.i189, align 1 %conv2.i190 = zext i8 %43 to i32 %xor.i191 = xor i32 %conv1.i188, %conv2.i190 %idxprom.i192 = zext nneg i32 %xor.i191 to i64 - %arrayidx3.i193 = getelementptr inbounds [256 x i32], ptr @crc32_slice1_table, i64 0, i64 %idxprom.i192 + %arrayidx3.i193 = getelementptr inbounds nuw [256 x i32], ptr @crc32_slice1_table, i64 0, i64 %idxprom.i192 %44 = load i32, ptr %arrayidx3.i193, align 4 %xor4.i194 = xor i32 %44, %shr.i186 %inc.i195 = add nuw nsw i64 %i.i182.0302, 1 @@ -810,7 +810,7 @@ for.body.i185: ; preds = %if.else68, %for.bod br i1 %exitcond.not, label %crc32_slice1.exit196, label %for.body.i185 crc32_slice1.exit196: ; preds = %for.body.i185 - %add.ptr74 = getelementptr inbounds i8, ptr %p, i64 %and70 + %add.ptr74 = getelementptr inbounds nuw i8, ptr %p, i64 %and70 %sub75 = sub nuw i64 %len, %and70 br label %if.end76 @@ -1038,7 +1038,7 @@ for.body.i: ; preds = %if.end137, %for.bod %conv2.i = zext i8 %122 to i32 %xor.i = xor i32 %conv1.i, %conv2.i %idxprom.i = zext nneg i32 %xor.i to i64 - %arrayidx3.i = getelementptr inbounds [256 x i32], ptr @crc32_slice1_table, i64 0, i64 %idxprom.i + %arrayidx3.i = getelementptr inbounds nuw [256 x i32], ptr @crc32_slice1_table, i64 0, i64 %idxprom.i %123 = load i32, ptr %arrayidx3.i, align 4 %xor4.i = xor i32 %123, %shr.i %inc.i = add nuw nsw i64 %i.i.0320, 1 diff --git a/bench/libjpeg-turbo/optimized/md5.c.ll b/bench/libjpeg-turbo/optimized/md5.c.ll index 6d1e49e1e0f..1972bd91f1c 100644 --- a/bench/libjpeg-turbo/optimized/md5.c.ll +++ b/bench/libjpeg-turbo/optimized/md5.c.ll @@ -6,15 +6,15 @@ target triple = "x86_64-pc-linux-gnu" ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: write) uwtable define dso_local void @MD5Init(ptr nocapture noundef writeonly %0) local_unnamed_addr #0 { store i32 1732584193, ptr %0, align 4 - %2 = getelementptr inbounds i8, ptr %0, i64 4 + %2 = getelementptr inbounds nuw i8, ptr %0, i64 4 store i32 -271733879, ptr %2, align 4 - %3 = getelementptr inbounds i8, ptr %0, i64 8 + %3 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i32 -1732584194, ptr %3, align 4 - %4 = getelementptr inbounds i8, ptr %0, i64 12 + %4 = getelementptr inbounds nuw i8, ptr %0, i64 12 store i32 271733878, ptr %4, align 4 - %5 = getelementptr inbounds i8, ptr %0, i64 16 + %5 = getelementptr inbounds nuw i8, ptr %0, i64 16 store i32 0, ptr %5, align 4 - %6 = getelementptr inbounds i8, ptr %0, i64 20 + %6 = getelementptr inbounds nuw i8, ptr %0, i64 20 store i32 0, ptr %6, align 4 ret void } @@ -22,18 +22,18 @@ define dso_local void @MD5Init(ptr nocapture noundef writeonly %0) local_unnamed ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable define dso_local void @MD5Update(ptr nocapture noundef %0, ptr nocapture noundef readonly %1, i32 noundef %2) local_unnamed_addr #1 { ._crit_edge46: - %3 = getelementptr inbounds i8, ptr %0, i64 16 + %3 = getelementptr inbounds nuw i8, ptr %0, i64 16 %4 = load i32, ptr %3, align 4 %5 = shl i32 %2, 3 %6 = add i32 %4, %5 store i32 %6, ptr %3, align 4 %7 = icmp ult i32 %6, %4 - %8 = getelementptr inbounds i8, ptr %0, i64 20 + %8 = getelementptr inbounds nuw i8, ptr %0, i64 20 %9 = load i32, ptr %8, align 4 %10 = zext i1 %7 to i32 %11 = add i32 %9, %10 %12 = lshr i32 %2, 29 - %13 = getelementptr inbounds i8, ptr %0, i64 20 + %13 = getelementptr inbounds nuw i8, ptr %0, i64 20 %14 = add i32 %11, %12 store i32 %14, ptr %13, align 4 %15 = lshr i32 %4, 3 @@ -42,9 +42,9 @@ define dso_local void @MD5Update(ptr nocapture noundef %0, ptr nocapture noundef br i1 %.not, label %29, label %17 17: ; preds = %._crit_edge46 - %18 = getelementptr inbounds i8, ptr %0, i64 24 + %18 = getelementptr inbounds nuw i8, ptr %0, i64 24 %19 = zext nneg i32 %16 to i64 - %20 = getelementptr inbounds i8, ptr %18, i64 %19 + %20 = getelementptr inbounds nuw i8, ptr %18, i64 %19 %21 = sub nuw nsw i32 64, %16 %22 = icmp ult i32 %2, %21 br i1 %22, label %23, label %25 @@ -58,7 +58,7 @@ define dso_local void @MD5Update(ptr nocapture noundef %0, ptr nocapture noundef %26 = zext nneg i32 %21 to i64 tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %20, ptr noundef nonnull align 1 dereferenceable(1) %1, i64 %26, i1 false) tail call void @MD5Transform(ptr noundef nonnull %0, ptr noundef nonnull %18) - %27 = getelementptr inbounds i8, ptr %1, i64 %26 + %27 = getelementptr inbounds nuw i8, ptr %1, i64 %26 %28 = sub nuw i32 %2, %21 br label %29 @@ -69,7 +69,7 @@ define dso_local void @MD5Update(ptr nocapture noundef %0, ptr nocapture noundef br i1 %30, label %.lr.ph, label %._crit_edge .lr.ph: ; preds = %29 - %31 = getelementptr inbounds i8, ptr %0, i64 24 + %31 = getelementptr inbounds nuw i8, ptr %0, i64 24 br label %32 32: ; preds = %.lr.ph, %32 @@ -85,7 +85,7 @@ define dso_local void @MD5Update(ptr nocapture noundef %0, ptr nocapture noundef ._crit_edge: ; preds = %32, %29 %.137.lcssa = phi i32 [ %.036, %29 ], [ %34, %32 ] %.1.lcssa = phi ptr [ %.0, %29 ], [ %33, %32 ] - %36 = getelementptr inbounds i8, ptr %0, i64 24 + %36 = getelementptr inbounds nuw i8, ptr %0, i64 24 %37 = zext nneg i32 %.137.lcssa to i64 tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 %36, ptr align 1 %.1.lcssa, i64 %37, i1 false) br label %38 @@ -100,11 +100,11 @@ declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @MD5Transform(ptr nocapture noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #3 { %3 = load i32, ptr %0, align 4 - %4 = getelementptr inbounds i8, ptr %0, i64 4 + %4 = getelementptr inbounds nuw i8, ptr %0, i64 4 %5 = load i32, ptr %4, align 4 - %6 = getelementptr inbounds i8, ptr %0, i64 8 + %6 = getelementptr inbounds nuw i8, ptr %0, i64 8 %7 = load i32, ptr %6, align 4 - %8 = getelementptr inbounds i8, ptr %0, i64 12 + %8 = getelementptr inbounds nuw i8, ptr %0, i64 12 %9 = load i32, ptr %8, align 4 %10 = xor i32 %9, %7 %11 = and i32 %10, %5 @@ -118,7 +118,7 @@ define dso_local void @MD5Transform(ptr nocapture noundef %0, ptr nocapture noun %19 = xor i32 %7, %5 %20 = and i32 %18, %19 %21 = xor i32 %20, %7 - %22 = getelementptr inbounds i8, ptr %1, i64 4 + %22 = getelementptr inbounds nuw i8, ptr %1, i64 4 %23 = load i32, ptr %22, align 4 %24 = add i32 %9, -389564586 %25 = add i32 %24, %23 @@ -128,7 +128,7 @@ define dso_local void @MD5Transform(ptr nocapture noundef %0, ptr nocapture noun %29 = xor i32 %18, %5 %30 = and i32 %28, %29 %31 = xor i32 %30, %5 - %32 = getelementptr inbounds i8, ptr %1, i64 8 + %32 = getelementptr inbounds nuw i8, ptr %1, i64 8 %33 = load i32, ptr %32, align 4 %34 = add i32 %7, 606105819 %35 = add i32 %34, %33 @@ -138,7 +138,7 @@ define dso_local void @MD5Transform(ptr nocapture noundef %0, ptr nocapture noun %39 = xor i32 %28, %18 %40 = and i32 %38, %39 %41 = xor i32 %40, %18 - %42 = getelementptr inbounds i8, ptr %1, i64 12 + %42 = getelementptr inbounds nuw i8, ptr %1, i64 12 %43 = load i32, ptr %42, align 4 %44 = add i32 %5, -1044525330 %45 = add i32 %44, %43 @@ -148,7 +148,7 @@ define dso_local void @MD5Transform(ptr nocapture noundef %0, ptr nocapture noun %49 = xor i32 %38, %28 %50 = and i32 %48, %49 %51 = xor i32 %50, %28 - %52 = getelementptr inbounds i8, ptr %1, i64 16 + %52 = getelementptr inbounds nuw i8, ptr %1, i64 16 %53 = load i32, ptr %52, align 4 %54 = add i32 %53, -176418897 %55 = add i32 %54, %18 @@ -158,7 +158,7 @@ define dso_local void @MD5Transform(ptr nocapture noundef %0, ptr nocapture noun %59 = xor i32 %48, %38 %60 = and i32 %58, %59 %61 = xor i32 %60, %38 - %62 = getelementptr inbounds i8, ptr %1, i64 20 + %62 = getelementptr inbounds nuw i8, ptr %1, i64 20 %63 = load i32, ptr %62, align 4 %64 = add i32 %63, 1200080426 %65 = add i32 %64, %28 @@ -168,7 +168,7 @@ define dso_local void @MD5Transform(ptr nocapture noundef %0, ptr nocapture noun %69 = xor i32 %58, %48 %70 = and i32 %68, %69 %71 = xor i32 %70, %48 - %72 = getelementptr inbounds i8, ptr %1, i64 24 + %72 = getelementptr inbounds nuw i8, ptr %1, i64 24 %73 = load i32, ptr %72, align 4 %74 = add i32 %73, -1473231341 %75 = add i32 %74, %38 @@ -178,7 +178,7 @@ define dso_local void @MD5Transform(ptr nocapture noundef %0, ptr nocapture noun %79 = xor i32 %68, %58 %80 = and i32 %78, %79 %81 = xor i32 %80, %58 - %82 = getelementptr inbounds i8, ptr %1, i64 28 + %82 = getelementptr inbounds nuw i8, ptr %1, i64 28 %83 = load i32, ptr %82, align 4 %84 = add i32 %83, -45705983 %85 = add i32 %84, %48 @@ -188,7 +188,7 @@ define dso_local void @MD5Transform(ptr nocapture noundef %0, ptr nocapture noun %89 = xor i32 %78, %68 %90 = and i32 %88, %89 %91 = xor i32 %90, %68 - %92 = getelementptr inbounds i8, ptr %1, i64 32 + %92 = getelementptr inbounds nuw i8, ptr %1, i64 32 %93 = load i32, ptr %92, align 4 %94 = add i32 %93, 1770035416 %95 = add i32 %94, %58 @@ -198,7 +198,7 @@ define dso_local void @MD5Transform(ptr nocapture noundef %0, ptr nocapture noun %99 = xor i32 %88, %78 %100 = and i32 %98, %99 %101 = xor i32 %100, %78 - %102 = getelementptr inbounds i8, ptr %1, i64 36 + %102 = getelementptr inbounds nuw i8, ptr %1, i64 36 %103 = load i32, ptr %102, align 4 %104 = add i32 %103, -1958414417 %105 = add i32 %104, %68 @@ -208,7 +208,7 @@ define dso_local void @MD5Transform(ptr nocapture noundef %0, ptr nocapture noun %109 = xor i32 %98, %88 %110 = and i32 %108, %109 %111 = xor i32 %110, %88 - %112 = getelementptr inbounds i8, ptr %1, i64 40 + %112 = getelementptr inbounds nuw i8, ptr %1, i64 40 %113 = load i32, ptr %112, align 4 %114 = add i32 %113, -42063 %115 = add i32 %114, %78 @@ -218,7 +218,7 @@ define dso_local void @MD5Transform(ptr nocapture noundef %0, ptr nocapture noun %119 = xor i32 %108, %98 %120 = and i32 %118, %119 %121 = xor i32 %120, %98 - %122 = getelementptr inbounds i8, ptr %1, i64 44 + %122 = getelementptr inbounds nuw i8, ptr %1, i64 44 %123 = load i32, ptr %122, align 4 %124 = add i32 %123, -1990404162 %125 = add i32 %124, %88 @@ -228,7 +228,7 @@ define dso_local void @MD5Transform(ptr nocapture noundef %0, ptr nocapture noun %129 = xor i32 %118, %108 %130 = and i32 %128, %129 %131 = xor i32 %130, %108 - %132 = getelementptr inbounds i8, ptr %1, i64 48 + %132 = getelementptr inbounds nuw i8, ptr %1, i64 48 %133 = load i32, ptr %132, align 4 %134 = add i32 %133, 1804603682 %135 = add i32 %134, %98 @@ -238,7 +238,7 @@ define dso_local void @MD5Transform(ptr nocapture noundef %0, ptr nocapture noun %139 = xor i32 %128, %118 %140 = and i32 %138, %139 %141 = xor i32 %140, %118 - %142 = getelementptr inbounds i8, ptr %1, i64 52 + %142 = getelementptr inbounds nuw i8, ptr %1, i64 52 %143 = load i32, ptr %142, align 4 %144 = add i32 %143, -40341101 %145 = add i32 %144, %108 @@ -248,7 +248,7 @@ define dso_local void @MD5Transform(ptr nocapture noundef %0, ptr nocapture noun %149 = xor i32 %138, %128 %150 = and i32 %148, %149 %151 = xor i32 %150, %128 - %152 = getelementptr inbounds i8, ptr %1, i64 56 + %152 = getelementptr inbounds nuw i8, ptr %1, i64 56 %153 = load i32, ptr %152, align 4 %154 = add i32 %153, -1502002290 %155 = add i32 %154, %118 @@ -258,7 +258,7 @@ define dso_local void @MD5Transform(ptr nocapture noundef %0, ptr nocapture noun %159 = xor i32 %148, %138 %160 = and i32 %158, %159 %161 = xor i32 %160, %138 - %162 = getelementptr inbounds i8, ptr %1, i64 60 + %162 = getelementptr inbounds nuw i8, ptr %1, i64 60 %163 = load i32, ptr %162, align 4 %164 = add i32 %163, 1236535329 %165 = add i32 %164, %128 @@ -645,14 +645,14 @@ define dso_local void @MD5Transform(ptr nocapture noundef %0, ptr nocapture noun ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @MD5Final(ptr nocapture noundef writeonly %0, ptr nocapture noundef %1) local_unnamed_addr #3 { - %3 = getelementptr inbounds i8, ptr %1, i64 24 - %4 = getelementptr inbounds i8, ptr %1, i64 16 + %3 = getelementptr inbounds nuw i8, ptr %1, i64 24 + %4 = getelementptr inbounds nuw i8, ptr %1, i64 16 %5 = load i32, ptr %4, align 4 %6 = lshr i32 %5, 3 %7 = and i32 %6, 63 %8 = zext nneg i32 %7 to i64 - %9 = getelementptr inbounds i8, ptr %3, i64 %8 - %10 = getelementptr inbounds i8, ptr %9, i64 1 + %9 = getelementptr inbounds nuw i8, ptr %3, i64 %8 + %10 = getelementptr inbounds nuw i8, ptr %9, i64 1 store i8 -128, ptr %9, align 1 %11 = xor i32 %7, 63 %12 = icmp ult i32 %11, 8 @@ -663,6 +663,7 @@ define dso_local void @MD5Final(ptr nocapture noundef writeonly %0, ptr nocaptur tail call void @llvm.memset.p0.i64(ptr nonnull align 1 %10, i8 0, i64 %14, i1 false) tail call void @MD5Transform(ptr noundef nonnull %1, ptr noundef nonnull %3) tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(56) %3, i8 0, i64 56, i1 false) + %.pre = load i32, ptr %4, align 4 br label %18 15: ; preds = %2 @@ -672,12 +673,12 @@ define dso_local void @MD5Final(ptr nocapture noundef writeonly %0, ptr nocaptur br label %18 18: ; preds = %15, %13 - %19 = load i32, ptr %4, align 4 - %20 = getelementptr inbounds i8, ptr %1, i64 80 + %19 = phi i32 [ %5, %15 ], [ %.pre, %13 ] + %20 = getelementptr inbounds nuw i8, ptr %1, i64 80 store i32 %19, ptr %20, align 4 - %21 = getelementptr inbounds i8, ptr %1, i64 20 + %21 = getelementptr inbounds nuw i8, ptr %1, i64 20 %22 = load i32, ptr %21, align 4 - %23 = getelementptr inbounds i8, ptr %1, i64 84 + %23 = getelementptr inbounds nuw i8, ptr %1, i64 84 store i32 %22, ptr %23, align 4 tail call void @MD5Transform(ptr noundef nonnull %1, ptr noundef nonnull %3) tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(16) %0, ptr noundef nonnull align 4 dereferenceable(16) %1, i64 16, i1 false) diff --git a/bench/libquic/optimized/base64_bio.c.ll b/bench/libquic/optimized/base64_bio.c.ll index 302a11f21ca..2a509ef024c 100644 --- a/bench/libquic/optimized/base64_bio.c.ll +++ b/bench/libquic/optimized/base64_bio.c.ll @@ -17,10 +17,10 @@ entry: ; Function Attrs: nounwind uwtable define internal i32 @b64_write(ptr noundef %b, ptr noundef %in, i32 noundef %inl) #1 { entry: - %ptr = getelementptr inbounds i8, ptr %b, i64 48 + %ptr = getelementptr inbounds nuw i8, ptr %b, i64 48 %0 = load ptr, ptr %ptr, align 8 tail call void @BIO_clear_retry_flags(ptr noundef %b) #10 - %encode = getelementptr inbounds i8, ptr %0, i64 16 + %encode = getelementptr inbounds nuw i8, ptr %0, i64 16 %1 = load i32, ptr %encode, align 4 %cmp.not = icmp eq i32 %1, 1 br i1 %cmp.not, label %if.end, label %if.then @@ -28,25 +28,25 @@ entry: if.then: ; preds = %entry store i32 1, ptr %encode, align 4 store i32 0, ptr %0, align 4 - %buf_off = getelementptr inbounds i8, ptr %0, i64 4 + %buf_off = getelementptr inbounds nuw i8, ptr %0, i64 4 store i32 0, ptr %buf_off, align 4 - %tmp_len = getelementptr inbounds i8, ptr %0, i64 8 + %tmp_len = getelementptr inbounds nuw i8, ptr %0, i64 8 store i32 0, ptr %tmp_len, align 4 - %base64 = getelementptr inbounds i8, ptr %0, i64 28 + %base64 = getelementptr inbounds nuw i8, ptr %0, i64 28 tail call void @EVP_EncodeInit(ptr noundef nonnull %base64) #10 br label %if.end if.end: ; preds = %if.then, %entry %2 = load i32, ptr %0, align 4 - %buf_off3 = getelementptr inbounds i8, ptr %0, i64 4 + %buf_off3 = getelementptr inbounds nuw i8, ptr %0, i64 4 %3 = load i32, ptr %buf_off3, align 4 %sub = sub nsw i32 %2, %3 %cmp495 = icmp sgt i32 %sub, 0 br i1 %cmp495, label %while.body.lr.ph, label %while.end while.body.lr.ph: ; preds = %if.end - %next_bio = getelementptr inbounds i8, ptr %b, i64 56 - %buf = getelementptr inbounds i8, ptr %0, i64 124 + %next_bio = getelementptr inbounds nuw i8, ptr %b, i64 56 + %buf = getelementptr inbounds nuw i8, ptr %0, i64 124 br label %while.body while.body: ; preds = %while.body.lr.ph, %if.end8 @@ -80,11 +80,11 @@ while.end: ; preds = %if.end8, %if.end br i1 %or.cond, label %return, label %while.cond17.preheader while.cond17.preheader: ; preds = %while.end - %tmp_len23 = getelementptr inbounds i8, ptr %0, i64 8 - %buf61 = getelementptr inbounds i8, ptr %0, i64 124 - %tmp = getelementptr inbounds i8, ptr %0, i64 1626 - %base6470 = getelementptr inbounds i8, ptr %0, i64 28 - %next_bio84 = getelementptr inbounds i8, ptr %b, i64 56 + %tmp_len23 = getelementptr inbounds nuw i8, ptr %0, i64 8 + %buf61 = getelementptr inbounds nuw i8, ptr %0, i64 124 + %tmp = getelementptr inbounds nuw i8, ptr %0, i64 1626 + %base6470 = getelementptr inbounds nuw i8, ptr %0, i64 28 + %next_bio84 = getelementptr inbounds nuw i8, ptr %b, i64 56 br label %while.body19 while.body19: ; preds = %while.cond17.preheader, %while.end103 @@ -106,11 +106,10 @@ if.then25: ; preds = %if.then22 %cmp28 = icmp sgt i32 %sub27, %inl.addr.0100 %spec.select = select i1 %cmp28, i32 1, i32 %sub27 %idxprom32 = zext nneg i32 %8 to i64 - %arrayidx33 = getelementptr inbounds [1024 x i8], ptr %tmp, i64 0, i64 %idxprom32 + %arrayidx33 = getelementptr inbounds nuw [1024 x i8], ptr %tmp, i64 0, i64 %idxprom32 %conv = sext i32 %spec.select to i64 tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %arrayidx33, ptr align 1 %in.addr.099, i64 %conv, i1 false) - %9 = load i32, ptr %tmp_len23, align 4 - %add35 = add nsw i32 %9, %spec.select + %add35 = add nsw i32 %8, %spec.select store i32 %add35, ptr %tmp_len23, align 4 %add36 = add nsw i32 %spec.select, %ret.0101 %cmp38 = icmp slt i32 %add35, 3 @@ -155,23 +154,23 @@ if.else69: ; preds = %while.body19 br label %if.end76 if.end76: ; preds = %if.end41, %if.end59, %if.else69 - %10 = phi i32 [ %conv48, %if.end41 ], [ %conv65, %if.end59 ], [ %.pre, %if.else69 ] + %9 = phi i32 [ %conv48, %if.end41 ], [ %conv65, %if.end59 ], [ %.pre, %if.else69 ] %ret.2 = phi i32 [ %add36, %if.end41 ], [ %add67, %if.end59 ], [ %add75, %if.else69 ] %n.2 = phi i32 [ %spec.select, %if.end41 ], [ %sub60, %if.end59 ], [ %7, %if.else69 ] %sub77 = sub nsw i32 %inl.addr.0100, %n.2 %idx.ext = sext i32 %n.2 to i64 %add.ptr = getelementptr inbounds i8, ptr %in.addr.099, i64 %idx.ext store i32 0, ptr %buf_off3, align 4 - %cmp8197 = icmp sgt i32 %10, 0 + %cmp8197 = icmp sgt i32 %9, 0 br i1 %cmp8197, label %while.body83, label %while.end103 while.body83: ; preds = %if.end76, %if.end99 - %11 = phi i32 [ %add102, %if.end99 ], [ 0, %if.end76 ] - %n.398 = phi i32 [ %sub100, %if.end99 ], [ %10, %if.end76 ] - %12 = load ptr, ptr %next_bio84, align 8 - %idxprom87 = sext i32 %11 to i64 + %10 = phi i32 [ %add102, %if.end99 ], [ 0, %if.end76 ] + %n.398 = phi i32 [ %sub100, %if.end99 ], [ %9, %if.end76 ] + %11 = load ptr, ptr %next_bio84, align 8 + %idxprom87 = sext i32 %10 to i64 %arrayidx88 = getelementptr inbounds [1502 x i8], ptr %buf61, i64 0, i64 %idxprom87 - %call89 = tail call i32 @BIO_write(ptr noundef %12, ptr noundef nonnull %arrayidx88, i32 noundef %n.398) #10 + %call89 = tail call i32 @BIO_write(ptr noundef %11, ptr noundef nonnull %arrayidx88, i32 noundef %n.398) #10 %cmp90 = icmp slt i32 %call89, 1 br i1 %cmp90, label %if.then92, label %if.end99 @@ -183,8 +182,8 @@ if.then92: ; preds = %while.body83 if.end99: ; preds = %while.body83 %sub100 = sub nsw i32 %n.398, %call89 - %13 = load i32, ptr %buf_off3, align 4 - %add102 = add nsw i32 %13, %call89 + %12 = load i32, ptr %buf_off3, align 4 + %add102 = add nsw i32 %12, %call89 store i32 %add102, ptr %buf_off3, align 4 %cmp81 = icmp sgt i32 %sub100, 0 br i1 %cmp81, label %while.body83, label %while.end103, !llvm.loop !9 @@ -208,20 +207,20 @@ entry: br i1 %cmp, label %return, label %if.end if.end: ; preds = %entry - %ptr = getelementptr inbounds i8, ptr %b, i64 48 + %ptr = getelementptr inbounds nuw i8, ptr %b, i64 48 %0 = load ptr, ptr %ptr, align 8 %cmp1 = icmp eq ptr %0, null br i1 %cmp1, label %return, label %lor.lhs.false lor.lhs.false: ; preds = %if.end - %next_bio = getelementptr inbounds i8, ptr %b, i64 56 + %next_bio = getelementptr inbounds nuw i8, ptr %b, i64 56 %1 = load ptr, ptr %next_bio, align 8 %cmp2 = icmp eq ptr %1, null br i1 %cmp2, label %return, label %if.end4 if.end4: ; preds = %lor.lhs.false tail call void @BIO_clear_retry_flags(ptr noundef nonnull %b) #10 - %encode = getelementptr inbounds i8, ptr %0, i64 16 + %encode = getelementptr inbounds nuw i8, ptr %0, i64 16 %2 = load i32, ptr %encode, align 4 %cmp5.not = icmp eq i32 %2, 2 br i1 %cmp5.not, label %if.end8, label %if.then6 @@ -229,11 +228,11 @@ if.end4: ; preds = %lor.lhs.false if.then6: ; preds = %if.end4 store i32 2, ptr %encode, align 4 store i32 0, ptr %0, align 4 - %buf_off = getelementptr inbounds i8, ptr %0, i64 4 + %buf_off = getelementptr inbounds nuw i8, ptr %0, i64 4 store i32 0, ptr %buf_off, align 4 - %tmp_len = getelementptr inbounds i8, ptr %0, i64 8 + %tmp_len = getelementptr inbounds nuw i8, ptr %0, i64 8 store i32 0, ptr %tmp_len, align 4 - %base64 = getelementptr inbounds i8, ptr %0, i64 28 + %base64 = getelementptr inbounds nuw i8, ptr %0, i64 28 tail call void @EVP_DecodeInit(ptr noundef nonnull %base64) #10 br label %if.end8 @@ -243,11 +242,11 @@ if.end8: ; preds = %if.then6, %if.end4 br i1 %cmp10, label %if.then11, label %if.end28 if.then11: ; preds = %if.end8 - %buf_off13 = getelementptr inbounds i8, ptr %0, i64 4 + %buf_off13 = getelementptr inbounds nuw i8, ptr %0, i64 4 %4 = load i32, ptr %buf_off13, align 4 %sub = sub nsw i32 %3, %4 %spec.select = tail call i32 @llvm.smin.i32(i32 %sub, i32 %outl) - %buf = getelementptr inbounds i8, ptr %0, i64 124 + %buf = getelementptr inbounds nuw i8, ptr %0, i64 124 %idxprom = sext i32 %4 to i64 %arrayidx = getelementptr inbounds [1502 x i8], ptr %buf, i64 0, i64 %idxprom %conv = sext i32 %spec.select to i64 @@ -274,14 +273,14 @@ if.end28: ; preds = %if.then11, %if.then br i1 %cmp29204, label %while.body.lr.ph.lr.ph, label %while.end while.body.lr.ph.lr.ph: ; preds = %if.end28 - %cont = getelementptr inbounds i8, ptr %0, i64 24 - %tmp.ptr = getelementptr inbounds i8, ptr %0, i64 1626 - %tmp_len36 = getelementptr inbounds i8, ptr %0, i64 8 - %start = getelementptr inbounds i8, ptr %0, i64 20 - %tmp_nl = getelementptr inbounds i8, ptr %0, i64 12 - %base6480 = getelementptr inbounds i8, ptr %0, i64 28 - %buf81 = getelementptr inbounds i8, ptr %0, i64 124 - %buf_off240 = getelementptr inbounds i8, ptr %0, i64 4 + %cont = getelementptr inbounds nuw i8, ptr %0, i64 24 + %tmp.ptr = getelementptr inbounds nuw i8, ptr %0, i64 1626 + %tmp_len36 = getelementptr inbounds nuw i8, ptr %0, i64 8 + %start = getelementptr inbounds nuw i8, ptr %0, i64 20 + %tmp_nl = getelementptr inbounds nuw i8, ptr %0, i64 12 + %base6480 = getelementptr inbounds nuw i8, ptr %0, i64 28 + %buf81 = getelementptr inbounds nuw i8, ptr %0, i64 124 + %buf_off240 = getelementptr inbounds nuw i8, ptr %0, i64 4 %scevgep = getelementptr i8, ptr %0, i64 1627 br label %while.body.lr.ph @@ -392,7 +391,7 @@ if.then92: ; preds = %land.lhs.true89 br label %for.inc121 if.else94: ; preds = %land.lhs.true89, %if.end79 - %incdec.ptr.ptr.le = getelementptr inbounds i8, ptr %0, i64 %q.0.add + %incdec.ptr.ptr.le = getelementptr inbounds nuw i8, ptr %0, i64 %q.0.add %cmp97.not = icmp eq i64 %p.0.idx182, 1626 br i1 %cmp97.not, label %if.end117, label %if.then99 @@ -409,9 +408,9 @@ for.body111.preheader: ; preds = %if.then99 for.body111: ; preds = %for.body111.preheader, %for.body111 %indvars.iv = phi i64 [ 0, %for.body111.preheader ], [ %indvars.iv.next, %for.body111 ] - %arrayidx113 = getelementptr inbounds i8, ptr %p.0.ptr185, i64 %indvars.iv + %arrayidx113 = getelementptr inbounds nuw i8, ptr %p.0.ptr185, i64 %indvars.iv %22 = load i8, ptr %arrayidx113, align 1 - %arrayidx116 = getelementptr inbounds [1024 x i8], ptr %tmp.ptr, i64 0, i64 %indvars.iv + %arrayidx116 = getelementptr inbounds nuw [1024 x i8], ptr %tmp.ptr, i64 0, i64 %indvars.iv store i8 %22, ptr %arrayidx116, align 1 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond228.not = icmp eq i64 %indvars.iv.next, %wide.trip.count @@ -426,7 +425,7 @@ if.end117: ; preds = %for.body111, %if.th for.inc121: ; preds = %for.body, %if.then92, %if.then77 %p.1.idx = phi i64 [ %p.0.idx182, %for.body ], [ %q.0.add, %if.then77 ], [ %q.0.add, %if.then92 ] %inc122 = add nuw nsw i32 %j.0181, 1 - %q.0.ptr = getelementptr inbounds i8, ptr %0, i64 %q.0.add + %q.0.ptr = getelementptr inbounds nuw i8, ptr %0, i64 %q.0.add %p.0.ptr = getelementptr inbounds i8, ptr %0, i64 %p.1.idx %exitcond.not = icmp eq i32 %inc122, %add57 br i1 %exitcond.not, label %for.end123, label %for.body, !llvm.loop !12 @@ -480,9 +479,9 @@ for.body152.preheader: ; preds = %if.then144 for.body152: ; preds = %for.body152.preheader, %for.body152 %indvars.iv229 = phi i64 [ 0, %for.body152.preheader ], [ %indvars.iv.next230, %for.body152 ] - %arrayidx154 = getelementptr inbounds i8, ptr %p.0.ptr159, i64 %indvars.iv229 + %arrayidx154 = getelementptr inbounds nuw i8, ptr %p.0.ptr159, i64 %indvars.iv229 %25 = load i8, ptr %arrayidx154, align 1 - %arrayidx157 = getelementptr inbounds [1024 x i8], ptr %tmp.ptr, i64 0, i64 %indvars.iv229 + %arrayidx157 = getelementptr inbounds nuw [1024 x i8], ptr %tmp.ptr, i64 0, i64 %indvars.iv229 store i8 %25, ptr %arrayidx157, align 1 %indvars.iv.next230 = add nuw nsw i64 %indvars.iv229, 1 %exitcond233.not = icmp eq i64 %indvars.iv.next230, %wide.trip.count232 @@ -528,7 +527,7 @@ if.then180: ; preds = %if.end177 if.then189: ; preds = %if.then180 %sub191 = add nsw i32 %and, -1 %idxprom192 = zext nneg i32 %sub191 to i64 - %arrayidx193 = getelementptr inbounds [1024 x i8], ptr %tmp.ptr, i64 0, i64 %idxprom192 + %arrayidx193 = getelementptr inbounds nuw [1024 x i8], ptr %tmp.ptr, i64 0, i64 %idxprom192 %28 = load i8, ptr %arrayidx193, align 1 %cmp195 = icmp eq i8 %28, 61 br i1 %cmp195, label %if.then197, label %if.end209 @@ -536,7 +535,7 @@ if.then189: ; preds = %if.then180 if.then197: ; preds = %if.then189 %sub199 = add nsw i32 %and, -2 %idxprom200 = zext nneg i32 %sub199 to i64 - %arrayidx201 = getelementptr inbounds [1024 x i8], ptr %tmp.ptr, i64 0, i64 %idxprom200 + %arrayidx201 = getelementptr inbounds nuw [1024 x i8], ptr %tmp.ptr, i64 0, i64 %idxprom200 %29 = load i8, ptr %arrayidx201, align 1 %cmp203 = icmp eq i8 %29, 61 %spec.select154.v = select i1 %cmp203, i32 -2, i32 -1 @@ -624,7 +623,7 @@ entry: ; Function Attrs: nounwind uwtable define internal i64 @b64_ctrl(ptr noundef %b, i32 noundef %cmd, i64 noundef %num, ptr noundef %ptr) #1 { entry: - %ptr1 = getelementptr inbounds i8, ptr %b, i64 48 + %ptr1 = getelementptr inbounds nuw i8, ptr %b, i64 48 %0 = load ptr, ptr %ptr1, align 8 switch i32 %cmd, label %sw.default [ i32 1, label %sw.bb @@ -636,42 +635,42 @@ entry: ] again.preheader: ; preds = %entry - %buf_off38 = getelementptr inbounds i8, ptr %0, i64 4 - %next_bio.i = getelementptr inbounds i8, ptr %b, i64 56 - %tmp_len = getelementptr inbounds i8, ptr %0, i64 8 - %buf = getelementptr inbounds i8, ptr %0, i64 124 - %tmp = getelementptr inbounds i8, ptr %0, i64 1626 - %encode62 = getelementptr inbounds i8, ptr %0, i64 16 - %base6466 = getelementptr inbounds i8, ptr %0, i64 28 + %buf_off38 = getelementptr inbounds nuw i8, ptr %0, i64 4 + %next_bio.i = getelementptr inbounds nuw i8, ptr %b, i64 56 + %tmp_len = getelementptr inbounds nuw i8, ptr %0, i64 8 + %buf = getelementptr inbounds nuw i8, ptr %0, i64 124 + %tmp = getelementptr inbounds nuw i8, ptr %0, i64 1626 + %encode62 = getelementptr inbounds nuw i8, ptr %0, i64 16 + %base6466 = getelementptr inbounds nuw i8, ptr %0, i64 28 br label %while.cond sw.bb: ; preds = %entry - %cont = getelementptr inbounds i8, ptr %0, i64 24 + %cont = getelementptr inbounds nuw i8, ptr %0, i64 24 store i32 1, ptr %cont, align 4 - %start = getelementptr inbounds i8, ptr %0, i64 20 + %start = getelementptr inbounds nuw i8, ptr %0, i64 20 store i32 1, ptr %start, align 4 - %encode = getelementptr inbounds i8, ptr %0, i64 16 + %encode = getelementptr inbounds nuw i8, ptr %0, i64 16 store i32 0, ptr %encode, align 4 - %next_bio = getelementptr inbounds i8, ptr %b, i64 56 + %next_bio = getelementptr inbounds nuw i8, ptr %b, i64 56 %1 = load ptr, ptr %next_bio, align 8 %call = tail call i64 @BIO_ctrl(ptr noundef %1, i32 noundef 1, i64 noundef %num, ptr noundef %ptr) #10 br label %return sw.bb2: ; preds = %entry - %cont3 = getelementptr inbounds i8, ptr %0, i64 24 + %cont3 = getelementptr inbounds nuw i8, ptr %0, i64 24 %2 = load i32, ptr %cont3, align 4 %cmp = icmp slt i32 %2, 1 br i1 %cmp, label %return, label %if.else if.else: ; preds = %sw.bb2 - %next_bio4 = getelementptr inbounds i8, ptr %b, i64 56 + %next_bio4 = getelementptr inbounds nuw i8, ptr %b, i64 56 %3 = load ptr, ptr %next_bio4, align 8 %call5 = tail call i64 @BIO_ctrl(ptr noundef %3, i32 noundef 2, i64 noundef %num, ptr noundef %ptr) #10 br label %return sw.bb6: ; preds = %entry %4 = load i32, ptr %0, align 4 - %buf_off = getelementptr inbounds i8, ptr %0, i64 4 + %buf_off = getelementptr inbounds nuw i8, ptr %0, i64 4 %5 = load i32, ptr %buf_off, align 4 %sub = sub nsw i32 %4, %5 %conv = zext nneg i32 %sub to i64 @@ -679,13 +678,13 @@ sw.bb6: ; preds = %entry br i1 %cmp7, label %land.lhs.true, label %if.else17 land.lhs.true: ; preds = %sw.bb6 - %encode9 = getelementptr inbounds i8, ptr %0, i64 16 + %encode9 = getelementptr inbounds nuw i8, ptr %0, i64 16 %6 = load i32, ptr %encode9, align 4 %cmp10.not = icmp eq i32 %6, 0 br i1 %cmp10.not, label %if.else17, label %land.lhs.true12 land.lhs.true12: ; preds = %land.lhs.true - %base64 = getelementptr inbounds i8, ptr %0, i64 28 + %base64 = getelementptr inbounds nuw i8, ptr %0, i64 28 %7 = load i32, ptr %base64, align 4 %cmp14.not = icmp eq i32 %7, 0 br i1 %cmp14.not, label %if.else17, label %return @@ -695,14 +694,14 @@ if.else17: ; preds = %land.lhs.true12, %l br i1 %cmp18, label %if.then20, label %return if.then20: ; preds = %if.else17 - %next_bio21 = getelementptr inbounds i8, ptr %b, i64 56 + %next_bio21 = getelementptr inbounds nuw i8, ptr %b, i64 56 %8 = load ptr, ptr %next_bio21, align 8 %call22 = tail call i64 @BIO_ctrl(ptr noundef %8, i32 noundef 13, i64 noundef %num, ptr noundef %ptr) #10 br label %return sw.bb25: ; preds = %entry %9 = load i32, ptr %0, align 4 - %buf_off27 = getelementptr inbounds i8, ptr %0, i64 4 + %buf_off27 = getelementptr inbounds nuw i8, ptr %0, i64 4 %10 = load i32, ptr %buf_off27, align 4 %sub28 = sub nsw i32 %9, %10 %conv29 = zext nneg i32 %sub28 to i64 @@ -710,7 +709,7 @@ sw.bb25: ; preds = %entry br i1 %cmp30, label %if.then32, label %return if.then32: ; preds = %sw.bb25 - %next_bio33 = getelementptr inbounds i8, ptr %b, i64 56 + %next_bio33 = getelementptr inbounds nuw i8, ptr %b, i64 56 %11 = load ptr, ptr %next_bio33, align 8 %call34 = tail call i64 @BIO_ctrl(ptr noundef %11, i32 noundef 10, i64 noundef %num, ptr noundef %ptr) #10 br label %return @@ -724,7 +723,7 @@ while.cond: ; preds = %while.cond.backedge while.body: ; preds = %while.cond %14 = load ptr, ptr %ptr1, align 8 tail call void @BIO_clear_retry_flags(ptr noundef %b) #10 - %encode.i = getelementptr inbounds i8, ptr %14, i64 16 + %encode.i = getelementptr inbounds nuw i8, ptr %14, i64 16 %15 = load i32, ptr %encode.i, align 4 %cmp.not.i = icmp eq i32 %15, 1 br i1 %cmp.not.i, label %if.end.i, label %if.then.i @@ -732,24 +731,24 @@ while.body: ; preds = %while.cond if.then.i: ; preds = %while.body store i32 1, ptr %encode.i, align 4 store i32 0, ptr %14, align 4 - %buf_off.i = getelementptr inbounds i8, ptr %14, i64 4 + %buf_off.i = getelementptr inbounds nuw i8, ptr %14, i64 4 store i32 0, ptr %buf_off.i, align 4 - %tmp_len.i = getelementptr inbounds i8, ptr %14, i64 8 + %tmp_len.i = getelementptr inbounds nuw i8, ptr %14, i64 8 store i32 0, ptr %tmp_len.i, align 4 - %base64.i = getelementptr inbounds i8, ptr %14, i64 28 + %base64.i = getelementptr inbounds nuw i8, ptr %14, i64 28 tail call void @EVP_EncodeInit(ptr noundef nonnull %base64.i) #10 br label %if.end.i if.end.i: ; preds = %if.then.i, %while.body %16 = load i32, ptr %14, align 4 - %buf_off3.i = getelementptr inbounds i8, ptr %14, i64 4 + %buf_off3.i = getelementptr inbounds nuw i8, ptr %14, i64 4 %17 = load i32, ptr %buf_off3.i, align 4 %sub.i = sub nsw i32 %16, %17 %cmp495.i = icmp sgt i32 %sub.i, 0 br i1 %cmp495.i, label %while.body.lr.ph.i, label %while.end.i while.body.lr.ph.i: ; preds = %if.end.i - %buf.i = getelementptr inbounds i8, ptr %14, i64 124 + %buf.i = getelementptr inbounds nuw i8, ptr %14, i64 124 br label %while.body.i while.body.i: ; preds = %if.end8.i, %while.body.lr.ph.i @@ -832,14 +831,14 @@ if.end77: ; preds = %if.else61, %land.lh sw.bb80: ; preds = %entry tail call void @BIO_clear_retry_flags(ptr noundef nonnull %b) #10 - %next_bio81 = getelementptr inbounds i8, ptr %b, i64 56 + %next_bio81 = getelementptr inbounds nuw i8, ptr %b, i64 56 %25 = load ptr, ptr %next_bio81, align 8 %call82 = tail call i64 @BIO_ctrl(ptr noundef %25, i32 noundef 101, i64 noundef %num, ptr noundef %ptr) #10 tail call void @BIO_copy_next_retry(ptr noundef nonnull %b) #10 br label %return sw.default: ; preds = %entry - %next_bio84 = getelementptr inbounds i8, ptr %b, i64 56 + %next_bio84 = getelementptr inbounds nuw i8, ptr %b, i64 56 %26 = load ptr, ptr %next_bio84, align 8 %call85 = tail call i64 @BIO_ctrl(ptr noundef %26, i32 noundef %cmd, i64 noundef %num, ptr noundef %ptr) #10 br label %return @@ -857,13 +856,13 @@ entry: br i1 %cmp, label %return, label %if.end if.end: ; preds = %entry - %cont = getelementptr inbounds i8, ptr %calloc, i64 24 + %cont = getelementptr inbounds nuw i8, ptr %calloc, i64 24 store i32 1, ptr %cont, align 4 - %start = getelementptr inbounds i8, ptr %calloc, i64 20 + %start = getelementptr inbounds nuw i8, ptr %calloc, i64 20 store i32 1, ptr %start, align 4 - %init = getelementptr inbounds i8, ptr %bio, i64 24 + %init = getelementptr inbounds nuw i8, ptr %bio, i64 24 store i32 1, ptr %init, align 8 - %ptr = getelementptr inbounds i8, ptr %bio, i64 48 + %ptr = getelementptr inbounds nuw i8, ptr %bio, i64 48 store ptr %calloc, ptr %ptr, align 8 br label %return @@ -879,13 +878,13 @@ entry: br i1 %cmp, label %return, label %if.end if.end: ; preds = %entry - %ptr = getelementptr inbounds i8, ptr %bio, i64 48 + %ptr = getelementptr inbounds nuw i8, ptr %bio, i64 48 %0 = load ptr, ptr %ptr, align 8 tail call void @free(ptr noundef %0) #10 store ptr null, ptr %ptr, align 8 - %init = getelementptr inbounds i8, ptr %bio, i64 24 + %init = getelementptr inbounds nuw i8, ptr %bio, i64 24 store i32 0, ptr %init, align 8 - %flags = getelementptr inbounds i8, ptr %bio, i64 32 + %flags = getelementptr inbounds nuw i8, ptr %bio, i64 32 store i32 0, ptr %flags, align 8 br label %return @@ -897,7 +896,7 @@ return: ; preds = %entry, %if.end ; Function Attrs: nounwind uwtable define internal i64 @b64_callback_ctrl(ptr nocapture noundef readonly %b, i32 noundef %cmd, ptr noundef %fp) #1 { entry: - %next_bio = getelementptr inbounds i8, ptr %b, i64 56 + %next_bio = getelementptr inbounds nuw i8, ptr %b, i64 56 %0 = load ptr, ptr %next_bio, align 8 %cmp = icmp eq ptr %0, null br i1 %cmp, label %return, label %sw.default diff --git a/bench/libquic/optimized/md5.cc.ll b/bench/libquic/optimized/md5.cc.ll index 55417d6e7c6..663257c4c82 100644 --- a/bench/libquic/optimized/md5.cc.ll +++ b/bench/libquic/optimized/md5.cc.ll @@ -15,15 +15,15 @@ target triple = "x86_64-unknown-linux-gnu" define dso_local void @_ZN4base7MD5InitEPA88_c(ptr nocapture noundef writeonly %context) local_unnamed_addr #0 { entry: store i32 1732584193, ptr %context, align 4 - %arrayidx2 = getelementptr inbounds i8, ptr %context, i64 4 + %arrayidx2 = getelementptr inbounds nuw i8, ptr %context, i64 4 store i32 -271733879, ptr %arrayidx2, align 4 - %arrayidx4 = getelementptr inbounds i8, ptr %context, i64 8 + %arrayidx4 = getelementptr inbounds nuw i8, ptr %context, i64 8 store i32 -1732584194, ptr %arrayidx4, align 4 - %arrayidx6 = getelementptr inbounds i8, ptr %context, i64 12 + %arrayidx6 = getelementptr inbounds nuw i8, ptr %context, i64 12 store i32 271733878, ptr %arrayidx6, align 4 - %bits = getelementptr inbounds i8, ptr %context, i64 16 + %bits = getelementptr inbounds nuw i8, ptr %context, i64 16 store i32 0, ptr %bits, align 4 - %arrayidx9 = getelementptr inbounds i8, ptr %context, i64 20 + %arrayidx9 = getelementptr inbounds nuw i8, ptr %context, i64 20 store i32 0, ptr %arrayidx9, align 4 ret void } @@ -33,20 +33,20 @@ define dso_local void @_ZN4base9MD5UpdateEPA88_cRKNS_16BasicStringPieceINSt7__cx entry: %call = tail call noundef ptr @_ZNK4base16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE4dataEv(ptr noundef nonnull align 8 dereferenceable(16) %data) %call1 = tail call noundef i64 @_ZNK4base16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %data) - %bits = getelementptr inbounds i8, ptr %context, i64 16 + %bits = getelementptr inbounds nuw i8, ptr %context, i64 16 %0 = load i32, ptr %bits, align 4 %conv = trunc i64 %call1 to i32 %shl = shl i32 %conv, 3 %add = add i32 %shl, %0 store i32 %add, ptr %bits, align 4 %cmp = icmp ult i32 %add, %0 - %arrayidx5 = getelementptr inbounds i8, ptr %context, i64 20 + %arrayidx5 = getelementptr inbounds nuw i8, ptr %context, i64 20 %1 = load i32, ptr %arrayidx5, align 4 %inc = zext i1 %cmp to i32 %2 = add i32 %1, %inc %shr = lshr i64 %call1, 29 %conv6 = trunc i64 %shr to i32 - %arrayidx8 = getelementptr inbounds i8, ptr %context, i64 20 + %arrayidx8 = getelementptr inbounds nuw i8, ptr %context, i64 20 %add9 = add i32 %2, %conv6 store i32 %add9, ptr %arrayidx8, align 4 %shr10 = lshr i32 %0, 3 @@ -55,9 +55,9 @@ entry: br i1 %tobool.not, label %if.end27, label %if.then11 if.then11: ; preds = %entry - %in = getelementptr inbounds i8, ptr %context, i64 24 + %in = getelementptr inbounds nuw i8, ptr %context, i64 24 %idx.ext = zext nneg i32 %and to i64 - %add.ptr = getelementptr inbounds i8, ptr %in, i64 %idx.ext + %add.ptr = getelementptr inbounds nuw i8, ptr %in, i64 %idx.ext %sub = sub nuw nsw i32 64, %and %conv12 = zext nneg i32 %sub to i64 %cmp13 = icmp ult i64 %call1, %conv12 @@ -70,7 +70,7 @@ if.then14: ; preds = %if.then11 if.end15: ; preds = %if.then11 tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %add.ptr, ptr noundef nonnull align 1 dereferenceable(1) %call, i64 %conv12, i1 false) tail call fastcc void @_ZN12_GLOBAL__N_112MD5TransformEPjPKj(ptr noundef nonnull %context, ptr noundef nonnull %in) - %add.ptr24 = getelementptr inbounds i8, ptr %call, i64 %conv12 + %add.ptr24 = getelementptr inbounds nuw i8, ptr %call, i64 %conv12 %sub26 = sub nuw i64 %call1, %conv12 br label %if.end27 @@ -81,7 +81,7 @@ if.end27: ; preds = %if.end15, %entry br i1 %cmp2844, label %while.body.lr.ph, label %while.end while.body.lr.ph: ; preds = %if.end27 - %in29 = getelementptr inbounds i8, ptr %context, i64 24 + %in29 = getelementptr inbounds nuw i8, ptr %context, i64 24 br label %while.body while.body: ; preds = %while.body.lr.ph, %while.body @@ -97,7 +97,7 @@ while.body: ; preds = %while.body.lr.ph, % while.end: ; preds = %while.body, %if.end27 %len.1.lcssa = phi i64 [ %len.0, %if.end27 ], [ %sub38, %while.body ] %buf.1.lcssa = phi ptr [ %buf.0, %if.end27 ], [ %add.ptr37, %while.body ] - %in39 = getelementptr inbounds i8, ptr %context, i64 24 + %in39 = getelementptr inbounds nuw i8, ptr %context, i64 24 tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 %in39, ptr align 1 %buf.1.lcssa, i64 %len.1.lcssa, i1 false) br label %return @@ -116,11 +116,11 @@ declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias define internal fastcc void @_ZN12_GLOBAL__N_112MD5TransformEPjPKj(ptr nocapture noundef %buf, ptr nocapture noundef readonly %in) unnamed_addr #4 { entry: %0 = load i32, ptr %buf, align 4 - %arrayidx1 = getelementptr inbounds i8, ptr %buf, i64 4 + %arrayidx1 = getelementptr inbounds nuw i8, ptr %buf, i64 4 %1 = load i32, ptr %arrayidx1, align 4 - %arrayidx2 = getelementptr inbounds i8, ptr %buf, i64 8 + %arrayidx2 = getelementptr inbounds nuw i8, ptr %buf, i64 8 %2 = load i32, ptr %arrayidx2, align 4 - %arrayidx3 = getelementptr inbounds i8, ptr %buf, i64 12 + %arrayidx3 = getelementptr inbounds nuw i8, ptr %buf, i64 12 %3 = load i32, ptr %arrayidx3, align 4 %xor = xor i32 %3, %2 %and = and i32 %xor, %1 @@ -134,7 +134,7 @@ entry: %xor9 = xor i32 %2, %1 %and10 = and i32 %add8, %xor9 %xor11 = xor i32 %and10, %2 - %arrayidx12 = getelementptr inbounds i8, ptr %in, i64 4 + %arrayidx12 = getelementptr inbounds nuw i8, ptr %in, i64 4 %5 = load i32, ptr %arrayidx12, align 4 %add13 = add i32 %3, -389564586 %add14 = add i32 %add13, %5 @@ -144,7 +144,7 @@ entry: %xor20 = xor i32 %add8, %1 %and21 = and i32 %add19, %xor20 %xor22 = xor i32 %and21, %1 - %arrayidx23 = getelementptr inbounds i8, ptr %in, i64 8 + %arrayidx23 = getelementptr inbounds nuw i8, ptr %in, i64 8 %6 = load i32, ptr %arrayidx23, align 4 %add24 = add i32 %2, 606105819 %add25 = add i32 %add24, %6 @@ -154,7 +154,7 @@ entry: %xor31 = xor i32 %add19, %add8 %and32 = and i32 %add30, %xor31 %xor33 = xor i32 %and32, %add8 - %arrayidx34 = getelementptr inbounds i8, ptr %in, i64 12 + %arrayidx34 = getelementptr inbounds nuw i8, ptr %in, i64 12 %7 = load i32, ptr %arrayidx34, align 4 %add35 = add i32 %1, -1044525330 %add36 = add i32 %add35, %7 @@ -164,7 +164,7 @@ entry: %xor42 = xor i32 %add30, %add19 %and43 = and i32 %add41, %xor42 %xor44 = xor i32 %and43, %add19 - %arrayidx45 = getelementptr inbounds i8, ptr %in, i64 16 + %arrayidx45 = getelementptr inbounds nuw i8, ptr %in, i64 16 %8 = load i32, ptr %arrayidx45, align 4 %add46 = add i32 %8, -176418897 %add47 = add i32 %add46, %add8 @@ -174,7 +174,7 @@ entry: %xor53 = xor i32 %add41, %add30 %and54 = and i32 %add52, %xor53 %xor55 = xor i32 %and54, %add30 - %arrayidx56 = getelementptr inbounds i8, ptr %in, i64 20 + %arrayidx56 = getelementptr inbounds nuw i8, ptr %in, i64 20 %9 = load i32, ptr %arrayidx56, align 4 %add57 = add i32 %9, 1200080426 %add58 = add i32 %add57, %add19 @@ -184,7 +184,7 @@ entry: %xor64 = xor i32 %add52, %add41 %and65 = and i32 %add63, %xor64 %xor66 = xor i32 %and65, %add41 - %arrayidx67 = getelementptr inbounds i8, ptr %in, i64 24 + %arrayidx67 = getelementptr inbounds nuw i8, ptr %in, i64 24 %10 = load i32, ptr %arrayidx67, align 4 %add68 = add i32 %10, -1473231341 %add69 = add i32 %add68, %add30 @@ -194,7 +194,7 @@ entry: %xor75 = xor i32 %add63, %add52 %and76 = and i32 %add74, %xor75 %xor77 = xor i32 %and76, %add52 - %arrayidx78 = getelementptr inbounds i8, ptr %in, i64 28 + %arrayidx78 = getelementptr inbounds nuw i8, ptr %in, i64 28 %11 = load i32, ptr %arrayidx78, align 4 %add79 = add i32 %11, -45705983 %add80 = add i32 %add79, %add41 @@ -204,7 +204,7 @@ entry: %xor86 = xor i32 %add74, %add63 %and87 = and i32 %add85, %xor86 %xor88 = xor i32 %and87, %add63 - %arrayidx89 = getelementptr inbounds i8, ptr %in, i64 32 + %arrayidx89 = getelementptr inbounds nuw i8, ptr %in, i64 32 %12 = load i32, ptr %arrayidx89, align 4 %add90 = add i32 %12, 1770035416 %add91 = add i32 %add90, %add52 @@ -214,7 +214,7 @@ entry: %xor97 = xor i32 %add85, %add74 %and98 = and i32 %add96, %xor97 %xor99 = xor i32 %and98, %add74 - %arrayidx100 = getelementptr inbounds i8, ptr %in, i64 36 + %arrayidx100 = getelementptr inbounds nuw i8, ptr %in, i64 36 %13 = load i32, ptr %arrayidx100, align 4 %add101 = add i32 %13, -1958414417 %add102 = add i32 %add101, %add63 @@ -224,7 +224,7 @@ entry: %xor108 = xor i32 %add96, %add85 %and109 = and i32 %add107, %xor108 %xor110 = xor i32 %and109, %add85 - %arrayidx111 = getelementptr inbounds i8, ptr %in, i64 40 + %arrayidx111 = getelementptr inbounds nuw i8, ptr %in, i64 40 %14 = load i32, ptr %arrayidx111, align 4 %add112 = add i32 %14, -42063 %add113 = add i32 %add112, %add74 @@ -234,7 +234,7 @@ entry: %xor119 = xor i32 %add107, %add96 %and120 = and i32 %add118, %xor119 %xor121 = xor i32 %and120, %add96 - %arrayidx122 = getelementptr inbounds i8, ptr %in, i64 44 + %arrayidx122 = getelementptr inbounds nuw i8, ptr %in, i64 44 %15 = load i32, ptr %arrayidx122, align 4 %add123 = add i32 %15, -1990404162 %add124 = add i32 %add123, %add85 @@ -244,7 +244,7 @@ entry: %xor130 = xor i32 %add118, %add107 %and131 = and i32 %add129, %xor130 %xor132 = xor i32 %and131, %add107 - %arrayidx133 = getelementptr inbounds i8, ptr %in, i64 48 + %arrayidx133 = getelementptr inbounds nuw i8, ptr %in, i64 48 %16 = load i32, ptr %arrayidx133, align 4 %add134 = add i32 %16, 1804603682 %add135 = add i32 %add134, %add96 @@ -254,7 +254,7 @@ entry: %xor141 = xor i32 %add129, %add118 %and142 = and i32 %add140, %xor141 %xor143 = xor i32 %and142, %add118 - %arrayidx144 = getelementptr inbounds i8, ptr %in, i64 52 + %arrayidx144 = getelementptr inbounds nuw i8, ptr %in, i64 52 %17 = load i32, ptr %arrayidx144, align 4 %add145 = add i32 %17, -40341101 %add146 = add i32 %add145, %add107 @@ -264,7 +264,7 @@ entry: %xor152 = xor i32 %add140, %add129 %and153 = and i32 %add151, %xor152 %xor154 = xor i32 %and153, %add129 - %arrayidx155 = getelementptr inbounds i8, ptr %in, i64 56 + %arrayidx155 = getelementptr inbounds nuw i8, ptr %in, i64 56 %18 = load i32, ptr %arrayidx155, align 4 %add156 = add i32 %18, -1502002290 %add157 = add i32 %add156, %add118 @@ -274,7 +274,7 @@ entry: %xor163 = xor i32 %add151, %add140 %and164 = and i32 %add162, %xor163 %xor165 = xor i32 %and164, %add140 - %arrayidx166 = getelementptr inbounds i8, ptr %in, i64 60 + %arrayidx166 = getelementptr inbounds nuw i8, ptr %in, i64 60 %19 = load i32, ptr %arrayidx166, align 4 %add167 = add i32 %19, 1236535329 %add168 = add i32 %add167, %add129 @@ -662,14 +662,14 @@ entry: ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @_ZN4base8MD5FinalEPNS_9MD5DigestEPA88_c(ptr nocapture noundef writeonly %digest, ptr nocapture noundef %context) local_unnamed_addr #4 { entry: - %bits = getelementptr inbounds i8, ptr %context, i64 16 + %bits = getelementptr inbounds nuw i8, ptr %context, i64 16 %0 = load i32, ptr %bits, align 4 %shr = lshr i32 %0, 3 %and = and i32 %shr, 63 - %in = getelementptr inbounds i8, ptr %context, i64 24 + %in = getelementptr inbounds nuw i8, ptr %context, i64 24 %idx.ext = zext nneg i32 %and to i64 - %add.ptr = getelementptr inbounds i8, ptr %in, i64 %idx.ext - %incdec.ptr = getelementptr inbounds i8, ptr %add.ptr, i64 1 + %add.ptr = getelementptr inbounds nuw i8, ptr %in, i64 %idx.ext + %incdec.ptr = getelementptr inbounds nuw i8, ptr %add.ptr, i64 1 store i8 -128, ptr %add.ptr, align 1 %sub = xor i32 %and, 63 %cmp = icmp ult i32 %sub, 8 @@ -680,6 +680,7 @@ if.then: ; preds = %entry tail call void @llvm.memset.p0.i64(ptr nonnull align 1 %incdec.ptr, i8 0, i64 %conv, i1 false) tail call fastcc void @_ZN12_GLOBAL__N_112MD5TransformEPjPKj(ptr noundef nonnull %context, ptr noundef nonnull %in) tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(56) %in, i8 0, i64 56, i1 false) + %.pre = load i32, ptr %bits, align 4 br label %if.end if.else: ; preds = %entry @@ -689,11 +690,11 @@ if.else: ; preds = %entry br label %if.end if.end: ; preds = %if.else, %if.then - %arrayidx13 = getelementptr inbounds i8, ptr %context, i64 80 - %1 = load i32, ptr %bits, align 4 + %1 = phi i32 [ %0, %if.else ], [ %.pre, %if.then ] + %arrayidx13 = getelementptr inbounds nuw i8, ptr %context, i64 80 store i32 %1, ptr %arrayidx13, align 4 - %arrayidx17 = getelementptr inbounds i8, ptr %context, i64 84 - %arrayidx19 = getelementptr inbounds i8, ptr %context, i64 20 + %arrayidx17 = getelementptr inbounds nuw i8, ptr %context, i64 84 + %arrayidx19 = getelementptr inbounds nuw i8, ptr %context, i64 20 %2 = load i32, ptr %arrayidx19, align 4 store i32 %2, ptr %arrayidx17, align 4 tail call fastcc void @_ZN12_GLOBAL__N_112MD5TransformEPjPKj(ptr noundef nonnull %context, ptr noundef nonnull %in) @@ -710,14 +711,14 @@ define dso_local void @_ZN4base20MD5IntermediateFinalEPNS_9MD5DigestEPA88_Kc(ptr entry: %context_copy = alloca [88 x i8], align 16 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(88) %context_copy, ptr noundef nonnull align 1 dereferenceable(88) %context, i64 88, i1 false) - %bits.i = getelementptr inbounds i8, ptr %context_copy, i64 16 + %bits.i = getelementptr inbounds nuw i8, ptr %context_copy, i64 16 %0 = load i32, ptr %bits.i, align 16 %shr.i = lshr i32 %0, 3 %and.i = and i32 %shr.i, 63 - %in.i = getelementptr inbounds i8, ptr %context_copy, i64 24 + %in.i = getelementptr inbounds nuw i8, ptr %context_copy, i64 24 %idx.ext.i = zext nneg i32 %and.i to i64 - %add.ptr.i = getelementptr inbounds i8, ptr %in.i, i64 %idx.ext.i - %incdec.ptr.i = getelementptr inbounds i8, ptr %add.ptr.i, i64 1 + %add.ptr.i = getelementptr inbounds nuw i8, ptr %in.i, i64 %idx.ext.i + %incdec.ptr.i = getelementptr inbounds nuw i8, ptr %add.ptr.i, i64 1 store i8 -128, ptr %add.ptr.i, align 1 %sub.i = xor i32 %and.i, 63 %cmp.i = icmp ult i32 %sub.i, 8 @@ -728,6 +729,7 @@ if.then.i: ; preds = %entry call void @llvm.memset.p0.i64(ptr nonnull align 1 %incdec.ptr.i, i8 0, i64 %conv.i, i1 false) call fastcc void @_ZN12_GLOBAL__N_112MD5TransformEPjPKj(ptr noundef nonnull %context_copy, ptr noundef nonnull %in.i) call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(56) %in.i, i8 0, i64 56, i1 false) + %.pre.i = load i32, ptr %bits.i, align 16 br label %_ZN4base8MD5FinalEPNS_9MD5DigestEPA88_c.exit if.else.i: ; preds = %entry @@ -737,11 +739,11 @@ if.else.i: ; preds = %entry br label %_ZN4base8MD5FinalEPNS_9MD5DigestEPA88_c.exit _ZN4base8MD5FinalEPNS_9MD5DigestEPA88_c.exit: ; preds = %if.then.i, %if.else.i - %arrayidx13.i = getelementptr inbounds i8, ptr %context_copy, i64 80 - %1 = load i32, ptr %bits.i, align 16 + %1 = phi i32 [ %0, %if.else.i ], [ %.pre.i, %if.then.i ] + %arrayidx13.i = getelementptr inbounds nuw i8, ptr %context_copy, i64 80 store i32 %1, ptr %arrayidx13.i, align 16 - %arrayidx17.i = getelementptr inbounds i8, ptr %context_copy, i64 84 - %arrayidx19.i = getelementptr inbounds i8, ptr %context_copy, i64 20 + %arrayidx17.i = getelementptr inbounds nuw i8, ptr %context_copy, i64 84 + %arrayidx19.i = getelementptr inbounds nuw i8, ptr %context_copy, i64 20 %2 = load i32, ptr %arrayidx19.i, align 4 store i32 %2, ptr %arrayidx17.i, align 4 call fastcc void @_ZN12_GLOBAL__N_112MD5TransformEPjPKj(ptr noundef nonnull %context_copy, ptr noundef nonnull %in.i) @@ -759,12 +761,12 @@ entry: for.body: ; preds = %entry, %invoke.cont11 %indvars.iv11 = phi i64 [ %indvars.iv.next12, %invoke.cont11 ], [ 0, %entry ] %indvars.iv = phi i64 [ %indvars.iv.next, %invoke.cont11 ], [ 0, %entry ] - %arrayidx = getelementptr inbounds [16 x i8], ptr %digest, i64 0, i64 %indvars.iv11 + %arrayidx = getelementptr inbounds nuw [16 x i8], ptr %digest, i64 0, i64 %indvars.iv11 %0 = load i8, ptr %arrayidx, align 1 %conv = zext i8 %0 to i32 %shr = lshr i32 %conv, 4 %idxprom2 = zext nneg i32 %shr to i64 - %arrayidx3 = getelementptr inbounds [17 x i8], ptr @_ZZN4base17MD5DigestToBase16B5cxx11ERKNS_9MD5DigestEE7zEncode, i64 0, i64 %idxprom2 + %arrayidx3 = getelementptr inbounds nuw [17 x i8], ptr @_ZZN4base17MD5DigestToBase16B5cxx11ERKNS_9MD5DigestEE7zEncode, i64 0, i64 %idxprom2 %1 = load i8, ptr %arrayidx3, align 1 %call = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %agg.result, i64 noundef %indvars.iv) to label %invoke.cont5 unwind label %lpad.loopexit @@ -773,7 +775,7 @@ invoke.cont5: ; preds = %for.body store i8 %1, ptr %call, align 1 %and7 = and i32 %conv, 15 %idxprom8 = zext nneg i32 %and7 to i64 - %arrayidx9 = getelementptr inbounds [17 x i8], ptr @_ZZN4base17MD5DigestToBase16B5cxx11ERKNS_9MD5DigestEE7zEncode, i64 0, i64 %idxprom8 + %arrayidx9 = getelementptr inbounds nuw [17 x i8], ptr @_ZZN4base17MD5DigestToBase16B5cxx11ERKNS_9MD5DigestEE7zEncode, i64 0, i64 %idxprom8 %2 = load i8, ptr %arrayidx9, align 1 %3 = or disjoint i64 %indvars.iv, 1 %call12 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %agg.result, i64 noundef %3) @@ -823,25 +825,25 @@ entry: %ctx = alloca [88 x i8], align 16 %ref.tmp = alloca %"class.base::BasicStringPiece", align 8 store i32 1732584193, ptr %ctx, align 16 - %arrayidx2.i = getelementptr inbounds i8, ptr %ctx, i64 4 + %arrayidx2.i = getelementptr inbounds nuw i8, ptr %ctx, i64 4 store i32 -271733879, ptr %arrayidx2.i, align 4 - %arrayidx4.i = getelementptr inbounds i8, ptr %ctx, i64 8 + %arrayidx4.i = getelementptr inbounds nuw i8, ptr %ctx, i64 8 store i32 -1732584194, ptr %arrayidx4.i, align 8 - %arrayidx6.i = getelementptr inbounds i8, ptr %ctx, i64 12 + %arrayidx6.i = getelementptr inbounds nuw i8, ptr %ctx, i64 12 store i32 271733878, ptr %arrayidx6.i, align 4 - %bits.i = getelementptr inbounds i8, ptr %ctx, i64 16 + %bits.i = getelementptr inbounds nuw i8, ptr %ctx, i64 16 store i32 0, ptr %bits.i, align 16 - %arrayidx9.i = getelementptr inbounds i8, ptr %ctx, i64 20 + %arrayidx9.i = getelementptr inbounds nuw i8, ptr %ctx, i64 20 store i32 0, ptr %arrayidx9.i, align 4 call void @_ZN4base16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC1EPKcm(ptr noundef nonnull align 8 dereferenceable(16) %ref.tmp, ptr noundef %data, i64 noundef %length) call void @_ZN4base9MD5UpdateEPA88_cRKNS_16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE(ptr noundef nonnull %ctx, ptr noundef nonnull align 8 dereferenceable(16) %ref.tmp) %0 = load i32, ptr %bits.i, align 16 %shr.i = lshr i32 %0, 3 %and.i = and i32 %shr.i, 63 - %in.i = getelementptr inbounds i8, ptr %ctx, i64 24 + %in.i = getelementptr inbounds nuw i8, ptr %ctx, i64 24 %idx.ext.i = zext nneg i32 %and.i to i64 - %add.ptr.i = getelementptr inbounds i8, ptr %in.i, i64 %idx.ext.i - %incdec.ptr.i = getelementptr inbounds i8, ptr %add.ptr.i, i64 1 + %add.ptr.i = getelementptr inbounds nuw i8, ptr %in.i, i64 %idx.ext.i + %incdec.ptr.i = getelementptr inbounds nuw i8, ptr %add.ptr.i, i64 1 store i8 -128, ptr %add.ptr.i, align 1 %sub.i = xor i32 %and.i, 63 %cmp.i = icmp ult i32 %sub.i, 8 @@ -852,6 +854,7 @@ if.then.i: ; preds = %entry call void @llvm.memset.p0.i64(ptr nonnull align 1 %incdec.ptr.i, i8 0, i64 %conv.i, i1 false) call fastcc void @_ZN12_GLOBAL__N_112MD5TransformEPjPKj(ptr noundef nonnull %ctx, ptr noundef nonnull %in.i) call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(56) %in.i, i8 0, i64 56, i1 false) + %.pre.i = load i32, ptr %bits.i, align 16 br label %_ZN4base8MD5FinalEPNS_9MD5DigestEPA88_c.exit if.else.i: ; preds = %entry @@ -861,10 +864,10 @@ if.else.i: ; preds = %entry br label %_ZN4base8MD5FinalEPNS_9MD5DigestEPA88_c.exit _ZN4base8MD5FinalEPNS_9MD5DigestEPA88_c.exit: ; preds = %if.then.i, %if.else.i - %arrayidx13.i = getelementptr inbounds i8, ptr %ctx, i64 80 - %1 = load i32, ptr %bits.i, align 16 + %1 = phi i32 [ %0, %if.else.i ], [ %.pre.i, %if.then.i ] + %arrayidx13.i = getelementptr inbounds nuw i8, ptr %ctx, i64 80 store i32 %1, ptr %arrayidx13.i, align 16 - %arrayidx17.i = getelementptr inbounds i8, ptr %ctx, i64 84 + %arrayidx17.i = getelementptr inbounds nuw i8, ptr %ctx, i64 84 %2 = load i32, ptr %arrayidx9.i, align 4 store i32 %2, ptr %arrayidx17.i, align 4 call fastcc void @_ZN12_GLOBAL__N_112MD5TransformEPjPKj(ptr noundef nonnull %ctx, ptr noundef nonnull %in.i) @@ -885,25 +888,25 @@ entry: call void @llvm.lifetime.start.p0(i64 88, ptr nonnull %ctx.i) call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %ref.tmp.i) store i32 1732584193, ptr %ctx.i, align 16 - %arrayidx2.i.i = getelementptr inbounds i8, ptr %ctx.i, i64 4 + %arrayidx2.i.i = getelementptr inbounds nuw i8, ptr %ctx.i, i64 4 store i32 -271733879, ptr %arrayidx2.i.i, align 4 - %arrayidx4.i.i = getelementptr inbounds i8, ptr %ctx.i, i64 8 + %arrayidx4.i.i = getelementptr inbounds nuw i8, ptr %ctx.i, i64 8 store i32 -1732584194, ptr %arrayidx4.i.i, align 8 - %arrayidx6.i.i = getelementptr inbounds i8, ptr %ctx.i, i64 12 + %arrayidx6.i.i = getelementptr inbounds nuw i8, ptr %ctx.i, i64 12 store i32 271733878, ptr %arrayidx6.i.i, align 4 - %bits.i.i = getelementptr inbounds i8, ptr %ctx.i, i64 16 + %bits.i.i = getelementptr inbounds nuw i8, ptr %ctx.i, i64 16 store i32 0, ptr %bits.i.i, align 16 - %arrayidx9.i.i = getelementptr inbounds i8, ptr %ctx.i, i64 20 + %arrayidx9.i.i = getelementptr inbounds nuw i8, ptr %ctx.i, i64 20 store i32 0, ptr %arrayidx9.i.i, align 4 call void @_ZN4base16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC1EPKcm(ptr noundef nonnull align 8 dereferenceable(16) %ref.tmp.i, ptr noundef %call, i64 noundef %call1) call void @_ZN4base9MD5UpdateEPA88_cRKNS_16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE(ptr noundef nonnull %ctx.i, ptr noundef nonnull align 8 dereferenceable(16) %ref.tmp.i) %0 = load i32, ptr %bits.i.i, align 16 %shr.i.i = lshr i32 %0, 3 %and.i.i = and i32 %shr.i.i, 63 - %in.i.i = getelementptr inbounds i8, ptr %ctx.i, i64 24 + %in.i.i = getelementptr inbounds nuw i8, ptr %ctx.i, i64 24 %idx.ext.i.i = zext nneg i32 %and.i.i to i64 - %add.ptr.i.i = getelementptr inbounds i8, ptr %in.i.i, i64 %idx.ext.i.i - %incdec.ptr.i.i = getelementptr inbounds i8, ptr %add.ptr.i.i, i64 1 + %add.ptr.i.i = getelementptr inbounds nuw i8, ptr %in.i.i, i64 %idx.ext.i.i + %incdec.ptr.i.i = getelementptr inbounds nuw i8, ptr %add.ptr.i.i, i64 1 store i8 -128, ptr %add.ptr.i.i, align 1 %sub.i.i = xor i32 %and.i.i, 63 %cmp.i.i = icmp ult i32 %sub.i.i, 8 @@ -914,6 +917,7 @@ if.then.i.i: ; preds = %entry call void @llvm.memset.p0.i64(ptr nonnull align 1 %incdec.ptr.i.i, i8 0, i64 %conv.i.i, i1 false) call fastcc void @_ZN12_GLOBAL__N_112MD5TransformEPjPKj(ptr noundef nonnull %ctx.i, ptr noundef nonnull %in.i.i) call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(56) %in.i.i, i8 0, i64 56, i1 false) + %.pre.i.i = load i32, ptr %bits.i.i, align 16 br label %_ZN4base6MD5SumEPKvmPNS_9MD5DigestE.exit if.else.i.i: ; preds = %entry @@ -923,10 +927,10 @@ if.else.i.i: ; preds = %entry br label %_ZN4base6MD5SumEPKvmPNS_9MD5DigestE.exit _ZN4base6MD5SumEPKvmPNS_9MD5DigestE.exit: ; preds = %if.then.i.i, %if.else.i.i - %arrayidx13.i.i = getelementptr inbounds i8, ptr %ctx.i, i64 80 - %1 = load i32, ptr %bits.i.i, align 16 + %1 = phi i32 [ %0, %if.else.i.i ], [ %.pre.i.i, %if.then.i.i ] + %arrayidx13.i.i = getelementptr inbounds nuw i8, ptr %ctx.i, i64 80 store i32 %1, ptr %arrayidx13.i.i, align 16 - %arrayidx17.i.i = getelementptr inbounds i8, ptr %ctx.i, i64 84 + %arrayidx17.i.i = getelementptr inbounds nuw i8, ptr %ctx.i, i64 84 %2 = load i32, ptr %arrayidx9.i.i, align 4 store i32 %2, ptr %arrayidx17.i.i, align 4 call fastcc void @_ZN12_GLOBAL__N_112MD5TransformEPjPKj(ptr noundef nonnull %ctx.i, ptr noundef nonnull %in.i.i) @@ -940,12 +944,12 @@ _ZN4base6MD5SumEPKvmPNS_9MD5DigestE.exit: ; preds = %if.then.i.i, %if.el for.body.i: ; preds = %_ZN4base6MD5SumEPKvmPNS_9MD5DigestE.exit, %invoke.cont11.i %indvars.iv11.i = phi i64 [ %indvars.iv.next12.i, %invoke.cont11.i ], [ 0, %_ZN4base6MD5SumEPKvmPNS_9MD5DigestE.exit ] %indvars.iv.i = phi i64 [ %indvars.iv.next.i, %invoke.cont11.i ], [ 0, %_ZN4base6MD5SumEPKvmPNS_9MD5DigestE.exit ] - %arrayidx.i = getelementptr inbounds [16 x i8], ptr %digest, i64 0, i64 %indvars.iv11.i + %arrayidx.i = getelementptr inbounds nuw [16 x i8], ptr %digest, i64 0, i64 %indvars.iv11.i %3 = load i8, ptr %arrayidx.i, align 1, !noalias !8 %conv.i = zext i8 %3 to i32 %shr.i = lshr i32 %conv.i, 4 %idxprom2.i = zext nneg i32 %shr.i to i64 - %arrayidx3.i = getelementptr inbounds [17 x i8], ptr @_ZZN4base17MD5DigestToBase16B5cxx11ERKNS_9MD5DigestEE7zEncode, i64 0, i64 %idxprom2.i + %arrayidx3.i = getelementptr inbounds nuw [17 x i8], ptr @_ZZN4base17MD5DigestToBase16B5cxx11ERKNS_9MD5DigestEE7zEncode, i64 0, i64 %idxprom2.i %4 = load i8, ptr %arrayidx3.i, align 1, !noalias !8 %call.i = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %agg.result, i64 noundef %indvars.iv.i) to label %invoke.cont5.i unwind label %lpad.loopexit.i @@ -954,7 +958,7 @@ invoke.cont5.i: ; preds = %for.body.i store i8 %4, ptr %call.i, align 1 %and7.i = and i32 %conv.i, 15 %idxprom8.i = zext nneg i32 %and7.i to i64 - %arrayidx9.i = getelementptr inbounds [17 x i8], ptr @_ZZN4base17MD5DigestToBase16B5cxx11ERKNS_9MD5DigestEE7zEncode, i64 0, i64 %idxprom8.i + %arrayidx9.i = getelementptr inbounds nuw [17 x i8], ptr @_ZZN4base17MD5DigestToBase16B5cxx11ERKNS_9MD5DigestEE7zEncode, i64 0, i64 %idxprom8.i %5 = load i8, ptr %arrayidx9.i, align 1, !noalias !8 %6 = or disjoint i64 %indvars.iv.i, 1 %call12.i = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %agg.result, i64 noundef %6) diff --git a/bench/linux/optimized/pata_amd.ll b/bench/linux/optimized/pata_amd.ll index a96eb9fe55b..82172b6e1c9 100644 --- a/bench/linux/optimized/pata_amd.ll +++ b/bench/linux/optimized/pata_amd.ll @@ -94,7 +94,7 @@ define internal i32 @amd_init_one(ptr noundef %0, ptr nocapture noundef readonly %6 = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #8 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %4, i8 0, i64 16, i1 false) - %7 = getelementptr inbounds i8, ptr %1, i64 24 + %7 = getelementptr inbounds nuw i8, ptr %1, i64 24 %8 = load i64, ptr %7, align 8 %9 = trunc i64 %8 to i32 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #8 @@ -103,8 +103,8 @@ define internal i32 @amd_init_one(ptr noundef %0, ptr nocapture noundef readonly 11: ; preds = %2 store i1 true, ptr @amd_init_one.__print_once, align 1 - %12 = getelementptr inbounds i8, ptr %0, i64 184 - tail call void @ata_print_version(ptr noundef %12, ptr noundef nonnull @.str.2) #8 + %12 = getelementptr inbounds nuw i8, ptr %0, i64 184 + tail call void @ata_print_version(ptr noundef nonnull %12, ptr noundef nonnull @.str.2) #8 br label %13 13: ; preds = %11, %2 @@ -121,7 +121,7 @@ define internal i32 @amd_init_one(ptr noundef %0, ptr nocapture noundef readonly ] .thread4: ; preds = %16 - %18 = getelementptr inbounds i8, ptr %0, i64 72 + %18 = getelementptr inbounds nuw i8, ptr %0, i64 72 %19 = load i8, ptr %18, align 8 %20 = icmp ugt i8 %19, 7 %21 = select i1 %20, i32 2, i32 1 @@ -131,13 +131,13 @@ define internal i32 @amd_init_one(ptr noundef %0, ptr nocapture noundef readonly br label %39 24: ; preds = %16 - %25 = getelementptr inbounds i8, ptr %0, i64 64 + %25 = getelementptr inbounds nuw i8, ptr %0, i64 64 %26 = load i16, ptr %25, align 8 %27 = icmp eq i16 %26, 4130 br i1 %27, label %28, label %.thread3 28: ; preds = %24 - %29 = getelementptr inbounds i8, ptr %0, i64 66 + %29 = getelementptr inbounds nuw i8, ptr %0, i64 66 %30 = load i16, ptr %29, align 2 %31 = icmp eq i16 %30, 14016 %32 = select i1 %31, i32 6, i32 5 @@ -165,7 +165,7 @@ define internal i32 @amd_init_one(ptr noundef %0, ptr nocapture noundef readonly 42: ; preds = %.thread3, %39, %35 %43 = phi i32 [ %.ph, %.thread3 ], [ %40, %39 ], [ %9, %35 ] - %44 = getelementptr inbounds i8, ptr %0, i64 60 + %44 = getelementptr inbounds nuw i8, ptr %0, i64 60 %45 = load i16, ptr %44, align 4 %46 = icmp eq i16 %45, 4130 br i1 %46, label %47, label %52 @@ -217,14 +217,14 @@ declare dso_local i32 @ata_pci_device_suspend(ptr noundef, i32) #1 ; Function Attrs: fn_ret_thunk_extern nounwind null_pointer_is_valid define internal i32 @amd_reinit_one(ptr noundef %0) #2 align 16 { %2 = alloca i8, align 1 - %3 = getelementptr inbounds i8, ptr %0, i64 304 + %3 = getelementptr inbounds nuw i8, ptr %0, i64 304 %4 = load ptr, ptr %3, align 8 %5 = tail call i32 @ata_pci_device_do_resume(ptr noundef %0) #8 %6 = icmp eq i32 %5, 0 br i1 %6, label %7, label %21 7: ; preds = %1 - %8 = getelementptr inbounds i8, ptr %0, i64 60 + %8 = getelementptr inbounds nuw i8, ptr %0, i64 60 %9 = load i16, ptr %8, align 4 %10 = icmp eq i16 %9, 4130 br i1 %10, label %11, label %20 @@ -238,7 +238,7 @@ define internal i32 @amd_reinit_one(ptr noundef %0) #2 align 16 { store i8 %14, ptr %2, align 1 %15 = call i32 @pci_write_config_byte(ptr noundef %0, i32 noundef 65, i8 noundef zeroext %14) #8 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #8 - %16 = getelementptr inbounds i8, ptr %0, i64 62 + %16 = getelementptr inbounds nuw i8, ptr %0, i64 62 %17 = load i16, ptr %16, align 2 switch i16 %17, label %20 [ i16 29705, label %18 @@ -290,7 +290,7 @@ declare dso_local i32 @ata_cable_40wire(ptr noundef) #1 ; Function Attrs: fn_ret_thunk_extern nounwind null_pointer_is_valid define internal void @amd33_set_piomode(ptr noundef %0, ptr noundef %1) #2 align 16 { tail call fastcc void @amd_fifo_setup(ptr noundef %0) - %3 = getelementptr inbounds i8, ptr %1, i64 816 + %3 = getelementptr inbounds nuw i8, ptr %1, i64 816 %4 = load i8, ptr %3, align 16 %5 = zext i8 %4 to i32 tail call fastcc void @timing_setup(ptr noundef %0, ptr noundef %1, i32 noundef 64, i32 noundef %5, i32 noundef 1) @@ -299,7 +299,7 @@ define internal void @amd33_set_piomode(ptr noundef %0, ptr noundef %1) #2 align ; Function Attrs: fn_ret_thunk_extern nounwind null_pointer_is_valid define internal void @amd33_set_dmamode(ptr nocapture noundef readonly %0, ptr noundef %1) #2 align 16 { - %3 = getelementptr inbounds i8, ptr %1, i64 817 + %3 = getelementptr inbounds nuw i8, ptr %1, i64 817 %4 = load i8, ptr %3, align 1 %5 = zext i8 %4 to i32 tail call fastcc void @timing_setup(ptr noundef %0, ptr noundef %1, i32 noundef 64, i32 noundef %5, i32 noundef 1) @@ -309,18 +309,18 @@ define internal void @amd33_set_dmamode(ptr nocapture noundef readonly %0, ptr n ; Function Attrs: fn_ret_thunk_extern nounwind null_pointer_is_valid define internal fastcc void @amd_fifo_setup(ptr noundef %0) unnamed_addr #2 align 16 { %2 = alloca i8, align 1 - %3 = getelementptr inbounds i8, ptr %0, i64 14776 + %3 = getelementptr inbounds nuw i8, ptr %0, i64 14776 %4 = load ptr, ptr %3, align 8 - %5 = getelementptr inbounds i8, ptr %4, i64 8 + %5 = getelementptr inbounds nuw i8, ptr %4, i64 8 %6 = load ptr, ptr %5, align 8 - %7 = getelementptr inbounds i8, ptr %0, i64 44 + %7 = getelementptr inbounds nuw i8, ptr %0, i64 44 %8 = load i32, ptr %7, align 4 %9 = zext i32 %8 to i64 %10 = getelementptr [2 x i8], ptr @amd_fifo_setup.fifobit, i64 0, i64 %9 %11 = load i8, ptr %10, align 1 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #8 - %12 = getelementptr inbounds i8, ptr %0, i64 8256 - %13 = tail call ptr @ata_dev_next(ptr noundef null, ptr noundef %12, i32 noundef 0) #8 + %12 = getelementptr inbounds nuw i8, ptr %0, i64 8256 + %13 = tail call ptr @ata_dev_next(ptr noundef null, ptr noundef nonnull %12, i32 noundef 0) #8 %14 = icmp eq ptr %13, null br i1 %14, label %.loopexit, label %.preheader @@ -331,7 +331,7 @@ define internal fastcc void @amd_fifo_setup(ptr noundef %0) unnamed_addr #2 alig %18 = load i32, ptr %17, align 32 %19 = icmp eq i32 %18, 3 %20 = select i1 %19, i8 0, i8 %15 - %21 = tail call ptr @ata_dev_next(ptr noundef nonnull %16, ptr noundef %12, i32 noundef 0) #8 + %21 = tail call ptr @ata_dev_next(ptr noundef nonnull %16, ptr noundef nonnull %12, i32 noundef 0) #8 %22 = icmp eq ptr %21, null br i1 %22, label %.loopexit, label %.preheader, !llvm.loop !6 @@ -363,16 +363,16 @@ define internal fastcc void @timing_setup(ptr nocapture noundef readonly %0, ptr %6 = alloca %struct.ata_timing, align 2 %7 = alloca %struct.ata_timing, align 2 %8 = alloca i8, align 1 - %9 = getelementptr inbounds i8, ptr %0, i64 14776 + %9 = getelementptr inbounds nuw i8, ptr %0, i64 14776 %10 = load ptr, ptr %9, align 8 - %11 = getelementptr inbounds i8, ptr %10, i64 8 + %11 = getelementptr inbounds nuw i8, ptr %10, i64 8 %12 = load ptr, ptr %11, align 8 %13 = getelementptr i8, ptr %12, i64 -184 %14 = tail call ptr @ata_dev_pair(ptr noundef %1) #8 - %15 = getelementptr inbounds i8, ptr %0, i64 44 + %15 = getelementptr inbounds nuw i8, ptr %0, i64 44 %16 = load i32, ptr %15, align 4 %17 = shl i32 %16, 1 - %18 = getelementptr inbounds i8, ptr %1, i64 8 + %18 = getelementptr inbounds nuw i8, ptr %1, i64 8 %19 = load i32, ptr %18, align 8 %20 = add i32 %17, %19 call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %6) #8 @@ -397,7 +397,7 @@ define internal fastcc void @timing_setup(ptr nocapture noundef readonly %0, ptr br i1 %28, label %41, label %29 29: ; preds = %27 - %30 = getelementptr inbounds i8, ptr %14, i64 817 + %30 = getelementptr inbounds nuw i8, ptr %14, i64 817 %31 = load i8, ptr %30, align 1 %32 = icmp eq i8 %31, -1 br i1 %32, label %36, label %33 @@ -409,7 +409,7 @@ define internal fastcc void @timing_setup(ptr nocapture noundef readonly %0, ptr br label %36 36: ; preds = %33, %29 - %37 = getelementptr inbounds i8, ptr %14, i64 816 + %37 = getelementptr inbounds nuw i8, ptr %14, i64 816 %38 = load i8, ptr %37, align 16 %39 = zext i8 %38 to i16 %40 = call i32 @ata_timing_compute(ptr noundef nonnull %14, i16 noundef zeroext %39, ptr noundef nonnull %7, i32 noundef 30000, i32 noundef %22) #8 @@ -428,7 +428,7 @@ define internal fastcc void @timing_setup(ptr nocapture noundef readonly %0, ptr 43: ; preds = %42, %41 %44 = phi i16 [ 15, %42 ], [ 1, %41 ] - %45 = getelementptr inbounds i8, ptr %6, i64 18 + %45 = getelementptr inbounds nuw i8, ptr %6, i64 18 store i16 %44, ptr %45, align 2 br label %46 @@ -442,7 +442,7 @@ define internal fastcc void @timing_setup(ptr nocapture noundef readonly %0, ptr %53 = shl i32 3, %52 %54 = xor i32 %53, -1 %55 = and i32 %50, %54 - %56 = getelementptr inbounds i8, ptr %6, i64 2 + %56 = getelementptr inbounds nuw i8, ptr %6, i64 2 %57 = load i16, ptr %56, align 2 %58 = icmp ugt i16 %57, 3 br i1 %58, label %63, label %59 @@ -463,7 +463,7 @@ define internal fastcc void @timing_setup(ptr nocapture noundef readonly %0, ptr %69 = ashr i32 %20, 1 %70 = add nuw nsw i32 %2, 15 %71 = sub nsw i32 %70, %69 - %72 = getelementptr inbounds i8, ptr %6, i64 4 + %72 = getelementptr inbounds nuw i8, ptr %6, i64 4 %73 = load i16, ptr %72, align 2 %74 = icmp ugt i16 %73, 15 %75 = call i16 @llvm.umax.i16(i16 %73, i16 1) @@ -471,7 +471,7 @@ define internal fastcc void @timing_setup(ptr nocapture noundef readonly %0, ptr %77 = shl i8 %76, 4 %78 = add i8 %77, -16 %79 = select i1 %74, i8 -16, i8 %78 - %80 = getelementptr inbounds i8, ptr %6, i64 6 + %80 = getelementptr inbounds nuw i8, ptr %6, i64 6 %81 = load i16, ptr %80, align 2 %82 = icmp ugt i16 %81, 15 %83 = call i16 @llvm.umax.i16(i16 %81, i16 1) @@ -482,7 +482,7 @@ define internal fastcc void @timing_setup(ptr nocapture noundef readonly %0, ptr %88 = call i32 @pci_write_config_byte(ptr noundef %13, i32 noundef %71, i8 noundef zeroext %87) #8 %89 = sub i32 %2, %20 %90 = add i32 %89, 11 - %91 = getelementptr inbounds i8, ptr %6, i64 10 + %91 = getelementptr inbounds nuw i8, ptr %6, i64 10 %92 = load i16, ptr %91, align 2 %93 = icmp ugt i16 %92, 15 %94 = call i16 @llvm.umax.i16(i16 %92, i16 1) @@ -490,7 +490,7 @@ define internal fastcc void @timing_setup(ptr nocapture noundef readonly %0, ptr %96 = shl i8 %95, 4 %97 = add i8 %96, -16 %98 = select i1 %93, i8 -16, i8 %97 - %99 = getelementptr inbounds i8, ptr %6, i64 12 + %99 = getelementptr inbounds nuw i8, ptr %6, i64 12 %100 = load i16, ptr %99, align 2 %101 = icmp ugt i16 %100, 15 br i1 %101, label %106, label %102 @@ -505,7 +505,7 @@ define internal fastcc void @timing_setup(ptr nocapture noundef readonly %0, ptr %107 = phi i8 [ %105, %102 ], [ 15, %63 ] %108 = or i8 %107, %98 %109 = call i32 @pci_write_config_byte(ptr noundef %13, i32 noundef %90, i8 noundef zeroext %108) #8 - %110 = getelementptr inbounds i8, ptr %6, i64 18 + %110 = getelementptr inbounds nuw i8, ptr %6, i64 18 %111 = load i16, ptr %110, align 2 %112 = icmp eq i16 %111, 0 switch i32 %4, label %default.unreachable5 [ @@ -611,12 +611,12 @@ declare dso_local void @ata_timing_merge(ptr noundef, ptr noundef, ptr noundef, ; Function Attrs: fn_ret_thunk_extern nounwind null_pointer_is_valid define internal i32 @amd_pre_reset(ptr noundef %0, i64 noundef %1) #2 align 16 { %3 = load ptr, ptr %0, align 64 - %4 = getelementptr inbounds i8, ptr %3, i64 14776 + %4 = getelementptr inbounds nuw i8, ptr %3, i64 14776 %5 = load ptr, ptr %4, align 8 - %6 = getelementptr inbounds i8, ptr %5, i64 8 + %6 = getelementptr inbounds nuw i8, ptr %5, i64 8 %7 = load ptr, ptr %6, align 8 %8 = getelementptr i8, ptr %7, i64 -184 - %9 = getelementptr inbounds i8, ptr %3, i64 44 + %9 = getelementptr inbounds nuw i8, ptr %3, i64 44 %10 = load i32, ptr %9, align 4 %11 = zext i32 %10 to i64 %12 = getelementptr [2 x %struct.pci_bits], ptr @amd_pre_reset.amd_enable_bits, i64 0, i64 %11 @@ -645,7 +645,7 @@ declare dso_local i32 @ata_cable_unknown(ptr noundef) #1 ; Function Attrs: fn_ret_thunk_extern nounwind null_pointer_is_valid define internal void @amd66_set_piomode(ptr noundef %0, ptr noundef %1) #2 align 16 { tail call fastcc void @amd_fifo_setup(ptr noundef %0) - %3 = getelementptr inbounds i8, ptr %1, i64 816 + %3 = getelementptr inbounds nuw i8, ptr %1, i64 816 %4 = load i8, ptr %3, align 16 %5 = zext i8 %4 to i32 tail call fastcc void @timing_setup(ptr noundef %0, ptr noundef %1, i32 noundef 64, i32 noundef %5, i32 noundef 2) @@ -654,7 +654,7 @@ define internal void @amd66_set_piomode(ptr noundef %0, ptr noundef %1) #2 align ; Function Attrs: fn_ret_thunk_extern nounwind null_pointer_is_valid define internal void @amd66_set_dmamode(ptr nocapture noundef readonly %0, ptr noundef %1) #2 align 16 { - %3 = getelementptr inbounds i8, ptr %1, i64 817 + %3 = getelementptr inbounds nuw i8, ptr %1, i64 817 %4 = load i8, ptr %3, align 1 %5 = zext i8 %4 to i32 tail call fastcc void @timing_setup(ptr noundef %0, ptr noundef %1, i32 noundef 64, i32 noundef %5, i32 noundef 2) @@ -664,7 +664,7 @@ define internal void @amd66_set_dmamode(ptr nocapture noundef readonly %0, ptr n ; Function Attrs: fn_ret_thunk_extern nounwind null_pointer_is_valid define internal void @amd100_set_piomode(ptr noundef %0, ptr noundef %1) #2 align 16 { tail call fastcc void @amd_fifo_setup(ptr noundef %0) - %3 = getelementptr inbounds i8, ptr %1, i64 816 + %3 = getelementptr inbounds nuw i8, ptr %1, i64 816 %4 = load i8, ptr %3, align 16 %5 = zext i8 %4 to i32 tail call fastcc void @timing_setup(ptr noundef %0, ptr noundef %1, i32 noundef 64, i32 noundef %5, i32 noundef 3) @@ -673,7 +673,7 @@ define internal void @amd100_set_piomode(ptr noundef %0, ptr noundef %1) #2 alig ; Function Attrs: fn_ret_thunk_extern nounwind null_pointer_is_valid define internal void @amd100_set_dmamode(ptr nocapture noundef readonly %0, ptr noundef %1) #2 align 16 { - %3 = getelementptr inbounds i8, ptr %1, i64 817 + %3 = getelementptr inbounds nuw i8, ptr %1, i64 817 %4 = load i8, ptr %3, align 1 %5 = zext i8 %4 to i32 tail call fastcc void @timing_setup(ptr noundef %0, ptr noundef %1, i32 noundef 64, i32 noundef %5, i32 noundef 3) @@ -683,9 +683,9 @@ define internal void @amd100_set_dmamode(ptr nocapture noundef readonly %0, ptr ; Function Attrs: fn_ret_thunk_extern nounwind null_pointer_is_valid define internal range(i32 1, 3) i32 @amd_cable_detect(ptr nocapture noundef readonly %0) #2 align 16 { %2 = alloca i8, align 1 - %3 = getelementptr inbounds i8, ptr %0, i64 14776 + %3 = getelementptr inbounds nuw i8, ptr %0, i64 14776 %4 = load ptr, ptr %3, align 8 - %5 = getelementptr inbounds i8, ptr %4, i64 8 + %5 = getelementptr inbounds nuw i8, ptr %4, i64 8 %6 = load ptr, ptr %5, align 8 %7 = getelementptr i8, ptr %6, i64 -184 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #8 @@ -693,7 +693,7 @@ define internal range(i32 1, 3) i32 @amd_cable_detect(ptr nocapture noundef read %8 = call i32 @pci_read_config_byte(ptr noundef %7, i32 noundef 66, ptr noundef nonnull %2) #8 %9 = load i8, ptr %2, align 1 %10 = zext i8 %9 to i32 - %11 = getelementptr inbounds i8, ptr %0, i64 44 + %11 = getelementptr inbounds nuw i8, ptr %0, i64 44 %12 = load i32, ptr %11, align 4 %13 = zext i32 %12 to i64 %14 = getelementptr [2 x i32], ptr @amd_cable_detect.bitmask, i64 0, i64 %13 @@ -708,7 +708,7 @@ define internal range(i32 1, 3) i32 @amd_cable_detect(ptr nocapture noundef read ; Function Attrs: fn_ret_thunk_extern nounwind null_pointer_is_valid define internal void @amd133_set_piomode(ptr noundef %0, ptr noundef %1) #2 align 16 { tail call fastcc void @amd_fifo_setup(ptr noundef %0) - %3 = getelementptr inbounds i8, ptr %1, i64 816 + %3 = getelementptr inbounds nuw i8, ptr %1, i64 816 %4 = load i8, ptr %3, align 16 %5 = zext i8 %4 to i32 tail call fastcc void @timing_setup(ptr noundef %0, ptr noundef %1, i32 noundef 64, i32 noundef %5, i32 noundef 4) @@ -717,7 +717,7 @@ define internal void @amd133_set_piomode(ptr noundef %0, ptr noundef %1) #2 alig ; Function Attrs: fn_ret_thunk_extern nounwind null_pointer_is_valid define internal void @amd133_set_dmamode(ptr nocapture noundef readonly %0, ptr noundef %1) #2 align 16 { - %3 = getelementptr inbounds i8, ptr %1, i64 817 + %3 = getelementptr inbounds nuw i8, ptr %1, i64 817 %4 = load i8, ptr %3, align 1 %5 = zext i8 %4 to i32 tail call fastcc void @timing_setup(ptr noundef %0, ptr noundef %1, i32 noundef 64, i32 noundef %5, i32 noundef 4) @@ -726,7 +726,7 @@ define internal void @amd133_set_dmamode(ptr nocapture noundef readonly %0, ptr ; Function Attrs: fn_ret_thunk_extern nounwind null_pointer_is_valid define internal void @nv100_set_piomode(ptr nocapture noundef readonly %0, ptr noundef %1) #2 align 16 { - %3 = getelementptr inbounds i8, ptr %1, i64 816 + %3 = getelementptr inbounds nuw i8, ptr %1, i64 816 %4 = load i8, ptr %3, align 16 %5 = zext i8 %4 to i32 tail call fastcc void @timing_setup(ptr noundef %0, ptr noundef %1, i32 noundef 80, i32 noundef %5, i32 noundef 3) @@ -735,7 +735,7 @@ define internal void @nv100_set_piomode(ptr nocapture noundef readonly %0, ptr n ; Function Attrs: fn_ret_thunk_extern nounwind null_pointer_is_valid define internal void @nv100_set_dmamode(ptr nocapture noundef readonly %0, ptr noundef %1) #2 align 16 { - %3 = getelementptr inbounds i8, ptr %1, i64 817 + %3 = getelementptr inbounds nuw i8, ptr %1, i64 817 %4 = load i8, ptr %3, align 1 %5 = zext i8 %4 to i32 tail call fastcc void @timing_setup(ptr noundef %0, ptr noundef %1, i32 noundef 80, i32 noundef %5, i32 noundef 3) @@ -751,18 +751,18 @@ define internal i32 @nv_mode_filter(ptr noundef %0, i32 noundef %1) #2 align 16 %4 = load ptr, ptr %0, align 64 %5 = load ptr, ptr %4, align 64 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #8 - %6 = getelementptr inbounds i8, ptr %5, i64 14776 + %6 = getelementptr inbounds nuw i8, ptr %5, i64 14776 %7 = load ptr, ptr %6, align 8 - %8 = getelementptr inbounds i8, ptr %7, i64 32 + %8 = getelementptr inbounds nuw i8, ptr %7, i64 32 %9 = load ptr, ptr %8, align 8 %10 = ptrtoint ptr %9 to i64 %11 = trunc i64 %10 to i32 - %12 = getelementptr inbounds i8, ptr %5, i64 44 + %12 = getelementptr inbounds nuw i8, ptr %5, i64 44 %13 = load i32, ptr %12, align 4 %14 = icmp eq i32 %13, 0 %15 = lshr i32 %11, 16 %16 = select i1 %14, i32 %15, i32 %11 - %17 = getelementptr inbounds i8, ptr %0, i64 8 + %17 = getelementptr inbounds nuw i8, ptr %0, i64 8 %18 = load i32, ptr %17, align 8 %19 = icmp eq i32 %18, 0 %20 = lshr i32 %16, 8 @@ -781,53 +781,51 @@ define internal i32 @nv_mode_filter(ptr noundef %0, i32 noundef %1) #2 align 16 30: ; preds = %24, %2 %31 = phi i32 [ %29, %24 ], [ 0, %2 ] - %32 = getelementptr inbounds i8, ptr %5, i64 32 + %32 = getelementptr inbounds nuw i8, ptr %5, i64 32 %33 = load i32, ptr %32, align 32 %34 = and i32 %33, 524288 %35 = icmp eq i32 %34, 0 - %36 = getelementptr inbounds i8, ptr %5, i64 15896 - %37 = icmp eq ptr %36, null - %38 = select i1 %35, i1 true, i1 %37 - br i1 %38, label %48, label %39 - -39: ; preds = %30 - %40 = tail call i32 @ata_acpi_gtm_xfermask(ptr noundef %0, ptr noundef nonnull %36) #8 - %41 = getelementptr inbounds i8, ptr %5, i64 15900 + br i1 %35, label %46, label %36 + +36: ; preds = %30 + %37 = getelementptr inbounds nuw i8, ptr %5, i64 15896 + %38 = tail call i32 @ata_acpi_gtm_xfermask(ptr noundef %0, ptr noundef nonnull %37) #8 + %39 = getelementptr inbounds nuw i8, ptr %5, i64 15900 + %40 = load i32, ptr %39, align 1 + %41 = getelementptr i8, ptr %5, i64 15908 %42 = load i32, ptr %41, align 1 - %43 = getelementptr i8, ptr %5, i64 15908 + %43 = getelementptr inbounds nuw i8, ptr %5, i64 15912 %44 = load i32, ptr %43, align 1 - %45 = getelementptr inbounds i8, ptr %5, i64 15912 - %46 = load i32, ptr %45, align 1 - %47 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %3, i64 noundef 32, ptr noundef nonnull @.str.4, i32 noundef %42, i32 noundef %44, i32 noundef %46) #8 - br label %48 - -48: ; preds = %39, %30 - %49 = phi i32 [ %40, %39 ], [ 0, %30 ] - %50 = or i32 %49, %31 - %51 = and i32 %50, 127 - %52 = icmp eq i32 %51, 0 - %53 = or disjoint i32 %50, 127 - %54 = select i1 %52, i32 %53, i32 %50 - %55 = and i32 %54, 1048448 - %56 = icmp eq i32 %55, 0 - %57 = or disjoint i32 %54, 1048448 - %58 = select i1 %56, i32 %57, i32 %54 - %59 = tail call i32 @ata_pack_xfermask(i32 noundef 31, i32 noundef 7, i32 noundef 7) #8 - %60 = or i32 %58, %59 - %61 = and i32 %60, %1 + %45 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %3, i64 noundef 32, ptr noundef nonnull @.str.4, i32 noundef %40, i32 noundef %42, i32 noundef %44) #8 + br label %46 + +46: ; preds = %36, %30 + %47 = phi i32 [ %38, %36 ], [ 0, %30 ] + %48 = or i32 %47, %31 + %49 = and i32 %48, 127 + %50 = icmp eq i32 %49, 0 + %51 = or disjoint i32 %48, 127 + %52 = select i1 %50, i32 %51, i32 %48 + %53 = and i32 %52, 1048448 + %54 = icmp eq i32 %53, 0 + %55 = or disjoint i32 %52, 1048448 + %56 = select i1 %54, i32 %55, i32 %52 + %57 = tail call i32 @ata_pack_xfermask(i32 noundef 31, i32 noundef 7, i32 noundef 7) #8 + %58 = or i32 %56, %57 + %59 = and i32 %58, %1 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #8 - ret i32 %61 + ret i32 %59 } ; Function Attrs: fn_ret_thunk_extern nounwind null_pointer_is_valid define internal i32 @nv_pre_reset(ptr noundef %0, i64 noundef %1) #2 align 16 { %3 = load ptr, ptr %0, align 64 - %4 = getelementptr inbounds i8, ptr %3, i64 14776 + %4 = getelementptr inbounds nuw i8, ptr %3, i64 14776 %5 = load ptr, ptr %4, align 8 - %6 = getelementptr inbounds i8, ptr %5, i64 8 + %6 = getelementptr inbounds nuw i8, ptr %5, i64 8 %7 = load ptr, ptr %6, align 8 %8 = getelementptr i8, ptr %7, i64 -184 - %9 = getelementptr inbounds i8, ptr %3, i64 44 + %9 = getelementptr inbounds nuw i8, ptr %3, i64 44 %10 = load i32, ptr %9, align 4 %11 = zext i32 %10 to i64 %12 = getelementptr [2 x %struct.pci_bits], ptr @nv_pre_reset.nv_enable_bits, i64 0, i64 %11 @@ -846,11 +844,11 @@ define internal i32 @nv_pre_reset(ptr noundef %0, i64 noundef %1) #2 align 16 { ; Function Attrs: fn_ret_thunk_extern nounwind null_pointer_is_valid define internal void @nv_host_stop(ptr nocapture noundef readonly %0) #2 align 16 { - %2 = getelementptr inbounds i8, ptr %0, i64 32 + %2 = getelementptr inbounds nuw i8, ptr %0, i64 32 %3 = load ptr, ptr %2, align 8 %4 = ptrtoint ptr %3 to i64 %5 = trunc i64 %4 to i32 - %6 = getelementptr inbounds i8, ptr %0, i64 8 + %6 = getelementptr inbounds nuw i8, ptr %0, i64 8 %7 = load ptr, ptr %6, align 8 %8 = getelementptr i8, ptr %7, i64 -184 %9 = tail call i32 @pci_write_config_dword(ptr noundef %8, i32 noundef 96, i32 noundef %5) #8 @@ -871,7 +869,7 @@ declare dso_local i32 @pci_write_config_dword(ptr noundef, i32 noundef, i32 noun ; Function Attrs: fn_ret_thunk_extern nounwind null_pointer_is_valid define internal void @nv133_set_piomode(ptr nocapture noundef readonly %0, ptr noundef %1) #2 align 16 { - %3 = getelementptr inbounds i8, ptr %1, i64 816 + %3 = getelementptr inbounds nuw i8, ptr %1, i64 816 %4 = load i8, ptr %3, align 16 %5 = zext i8 %4 to i32 tail call fastcc void @timing_setup(ptr noundef %0, ptr noundef %1, i32 noundef 80, i32 noundef %5, i32 noundef 4) @@ -880,7 +878,7 @@ define internal void @nv133_set_piomode(ptr nocapture noundef readonly %0, ptr n ; Function Attrs: fn_ret_thunk_extern nounwind null_pointer_is_valid define internal void @nv133_set_dmamode(ptr nocapture noundef readonly %0, ptr noundef %1) #2 align 16 { - %3 = getelementptr inbounds i8, ptr %1, i64 817 + %3 = getelementptr inbounds nuw i8, ptr %1, i64 817 %4 = load i8, ptr %3, align 1 %5 = zext i8 %4 to i32 tail call fastcc void @timing_setup(ptr noundef %0, ptr noundef %1, i32 noundef 80, i32 noundef %5, i32 noundef 4) diff --git a/bench/linux/optimized/pcm_misc.ll b/bench/linux/optimized/pcm_misc.ll index b754704b64c..c206d68d5c7 100644 --- a/bench/linux/optimized/pcm_misc.ll +++ b/bench/linux/optimized/pcm_misc.ll @@ -233,10 +233,10 @@ define dso_local ptr @snd_pcm_format_silence_64(i32 noundef %0) #0 align 16 { 3: ; preds = %1 %4 = zext nneg i32 %0 to i64 %5 = getelementptr [53 x %struct.pcm_format_data], ptr @pcm_formats, i64 0, i64 %4 - %6 = getelementptr inbounds i8, ptr %5, i64 1 + %6 = getelementptr inbounds nuw i8, ptr %5, i64 1 %7 = load i8, ptr %6, align 1 %8 = icmp eq i8 %7, 0 - %9 = getelementptr inbounds i8, ptr %5, i64 4 + %9 = getelementptr inbounds nuw i8, ptr %5, i64 4 %10 = select i1 %8, ptr null, ptr %9 br label %11 @@ -257,91 +257,89 @@ define dso_local noundef range(i32 -22, 1) i32 @snd_pcm_format_set_silence(i32 n 7: ; preds = %5 %8 = zext nneg i32 %0 to i64 %9 = getelementptr [53 x %struct.pcm_format_data], ptr @pcm_formats, i64 0, i64 %8 - %10 = getelementptr inbounds i8, ptr %9, i64 1 + %10 = getelementptr inbounds nuw i8, ptr %9, i64 1 %11 = load i8, ptr %10, align 1 %12 = zext i8 %11 to i32 - %13 = getelementptr inbounds i8, ptr %9, i64 4 - %14 = icmp ne i8 %11, 0 - %15 = icmp ne ptr %13, null - %16 = select i1 %14, i1 %15, i1 false - br i1 %16, label %17, label %.loopexit - -17: ; preds = %7 - %18 = getelementptr inbounds i8, ptr %9, i64 3 - %19 = load i8, ptr %18, align 1 - %20 = icmp eq i8 %19, 1 - %21 = icmp ult i8 %11, 9 - %22 = or i1 %21, %20 - br i1 %22, label %23, label %28 - -23: ; preds = %17 - %24 = mul i32 %2, %12 - %25 = lshr i32 %24, 3 - %26 = load i8, ptr %13, align 4 - %27 = zext nneg i32 %25 to i64 - tail call void @llvm.memset.p0.i64(ptr align 1 %1, i8 %26, i64 %27, i1 false) + %13 = getelementptr inbounds nuw i8, ptr %9, i64 4 + %.not = icmp eq i8 %11, 0 + br i1 %.not, label %.loopexit, label %14 + +14: ; preds = %7 + %15 = getelementptr inbounds nuw i8, ptr %9, i64 3 + %16 = load i8, ptr %15, align 1 + %17 = icmp eq i8 %16, 1 + %18 = icmp ult i8 %11, 9 + %19 = or i1 %18, %17 + br i1 %19, label %20, label %25 + +20: ; preds = %14 + %21 = mul i32 %2, %12 + %22 = lshr i32 %21, 3 + %23 = load i8, ptr %13, align 4 + %24 = zext nneg i32 %22 to i64 + tail call void @llvm.memset.p0.i64(ptr align 1 %1, i8 %23, i64 %24, i1 false) br label %.loopexit -28: ; preds = %17 - %29 = lshr i32 %12, 3 - switch i32 %29, label %.loopexit [ - i32 2, label %34 +25: ; preds = %14 + %26 = lshr i32 %12, 3 + switch i32 %26, label %.loopexit [ + i32 2, label %31 i32 3, label %.preheader - i32 4, label %32 - i32 8, label %30 + i32 4, label %29 + i32 8, label %27 ] -30: ; preds = %28 - %31 = load i64, ptr %13, align 4 - br label %53 - -32: ; preds = %28 - %33 = load i32, ptr %13, align 4 - br label %47 - -34: ; preds = %28 - %35 = load i16, ptr %13, align 4 - br label %36 - -36: ; preds = %36, %34 - %37 = phi ptr [ %1, %34 ], [ %40, %36 ] - %38 = phi i32 [ %2, %34 ], [ %39, %36 ] - %39 = add i32 %38, -1 - store i16 %35, ptr %37, align 1 - %40 = getelementptr i8, ptr %37, i64 2 - %41 = icmp eq i32 %39, 0 - br i1 %41, label %.loopexit, label %36, !llvm.loop !5 - -.preheader: ; preds = %28, %.preheader - %42 = phi ptr [ %45, %.preheader ], [ %1, %28 ] - %43 = phi i32 [ %44, %.preheader ], [ %2, %28 ] - %44 = add i32 %43, -1 - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef align 1 dereferenceable(3) %42, ptr noundef nonnull align 4 dereferenceable(3) %13, i64 3, i1 false) - %45 = getelementptr i8, ptr %42, i64 3 - %46 = icmp eq i32 %44, 0 - br i1 %46, label %.loopexit, label %.preheader, !llvm.loop !8 - -47: ; preds = %47, %32 - %48 = phi ptr [ %1, %32 ], [ %51, %47 ] - %49 = phi i32 [ %2, %32 ], [ %50, %47 ] - %50 = add i32 %49, -1 - store i32 %33, ptr %48, align 1 - %51 = getelementptr i8, ptr %48, i64 4 - %52 = icmp eq i32 %50, 0 - br i1 %52, label %.loopexit, label %47, !llvm.loop !9 - -53: ; preds = %53, %30 - %54 = phi ptr [ %1, %30 ], [ %57, %53 ] - %55 = phi i32 [ %2, %30 ], [ %56, %53 ] - %56 = add i32 %55, -1 - store i64 %31, ptr %54, align 1 - %57 = getelementptr i8, ptr %54, i64 8 - %58 = icmp eq i32 %56, 0 - br i1 %58, label %.loopexit, label %53, !llvm.loop !10 - -.loopexit: ; preds = %53, %47, %.preheader, %36, %28, %23, %7, %5, %3 - %59 = phi i32 [ 0, %23 ], [ -22, %3 ], [ 0, %5 ], [ -22, %7 ], [ 0, %28 ], [ 0, %36 ], [ 0, %.preheader ], [ 0, %47 ], [ 0, %53 ] - ret i32 %59 +27: ; preds = %25 + %28 = load i64, ptr %13, align 4 + br label %50 + +29: ; preds = %25 + %30 = load i32, ptr %13, align 4 + br label %44 + +31: ; preds = %25 + %32 = load i16, ptr %13, align 4 + br label %33 + +33: ; preds = %33, %31 + %34 = phi ptr [ %1, %31 ], [ %37, %33 ] + %35 = phi i32 [ %2, %31 ], [ %36, %33 ] + %36 = add i32 %35, -1 + store i16 %32, ptr %34, align 1 + %37 = getelementptr i8, ptr %34, i64 2 + %38 = icmp eq i32 %36, 0 + br i1 %38, label %.loopexit, label %33, !llvm.loop !5 + +.preheader: ; preds = %25, %.preheader + %39 = phi ptr [ %42, %.preheader ], [ %1, %25 ] + %40 = phi i32 [ %41, %.preheader ], [ %2, %25 ] + %41 = add i32 %40, -1 + tail call void @llvm.memcpy.p0.p0.i64(ptr noundef align 1 dereferenceable(3) %39, ptr noundef nonnull align 4 dereferenceable(3) %13, i64 3, i1 false) + %42 = getelementptr i8, ptr %39, i64 3 + %43 = icmp eq i32 %41, 0 + br i1 %43, label %.loopexit, label %.preheader, !llvm.loop !8 + +44: ; preds = %44, %29 + %45 = phi ptr [ %1, %29 ], [ %48, %44 ] + %46 = phi i32 [ %2, %29 ], [ %47, %44 ] + %47 = add i32 %46, -1 + store i32 %30, ptr %45, align 1 + %48 = getelementptr i8, ptr %45, i64 4 + %49 = icmp eq i32 %47, 0 + br i1 %49, label %.loopexit, label %44, !llvm.loop !9 + +50: ; preds = %50, %27 + %51 = phi ptr [ %1, %27 ], [ %54, %50 ] + %52 = phi i32 [ %2, %27 ], [ %53, %50 ] + %53 = add i32 %52, -1 + store i64 %28, ptr %51, align 1 + %54 = getelementptr i8, ptr %51, i64 8 + %55 = icmp eq i32 %53, 0 + br i1 %55, label %.loopexit, label %50, !llvm.loop !10 + +.loopexit: ; preds = %50, %44, %.preheader, %33, %25, %20, %7, %5, %3 + %56 = phi i32 [ 0, %20 ], [ -22, %3 ], [ 0, %5 ], [ -22, %7 ], [ 0, %25 ], [ 0, %33 ], [ 0, %.preheader ], [ 0, %44 ], [ 0, %50 ] + ret i32 %56 } ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) @@ -357,7 +355,7 @@ define dso_local noundef i32 @snd_pcm_hw_limit_rates(ptr nocapture noundef %0) # br i1 %3, label %4, label %.loopexit3 4: ; preds = %1 - %5 = getelementptr inbounds i8, ptr %0, i64 20 + %5 = getelementptr inbounds nuw i8, ptr %0, i64 20 %6 = load i32, ptr %5, align 4 br label %7 @@ -373,7 +371,7 @@ define dso_local noundef i32 @snd_pcm_hw_limit_rates(ptr nocapture noundef %0) # %14 = zext nneg i32 %8 to i64 %15 = getelementptr i32, ptr %13, i64 %14 %16 = load i32, ptr %15, align 4 - %17 = getelementptr inbounds i8, ptr %0, i64 24 + %17 = getelementptr inbounds nuw i8, ptr %0, i64 24 store i32 %16, ptr %17, align 8 br label %.loopexit3 @@ -383,7 +381,7 @@ define dso_local noundef i32 @snd_pcm_hw_limit_rates(ptr nocapture noundef %0) # br i1 %20, label %.loopexit3, label %7, !llvm.loop !11 .loopexit3: ; preds = %18, %12, %1 - %21 = getelementptr inbounds i8, ptr %0, i64 20 + %21 = getelementptr inbounds nuw i8, ptr %0, i64 20 br label %22 22: ; preds = %26, %.loopexit3 @@ -404,7 +402,7 @@ define dso_local noundef i32 @snd_pcm_hw_limit_rates(ptr nocapture noundef %0) # %33 = zext nneg i32 %24 to i64 %34 = getelementptr i32, ptr %32, i64 %33 %35 = load i32, ptr %34, align 4 - %36 = getelementptr inbounds i8, ptr %0, i64 28 + %36 = getelementptr inbounds nuw i8, ptr %0, i64 28 store i32 %35, ptr %36, align 4 br label %.loopexit diff --git a/bench/linux/optimized/pps.ll b/bench/linux/optimized/pps.ll index 741717ae9ca..2cd2f66c82d 100644 --- a/bench/linux/optimized/pps.ll +++ b/bench/linux/optimized/pps.ll @@ -78,20 +78,20 @@ define dso_local i32 @pps_register_cdev(ptr noundef %0) local_unnamed_addr #0 al br label %43 8: ; preds = %1 - %9 = getelementptr inbounds i8, ptr %0, i64 208 + %9 = getelementptr inbounds nuw i8, ptr %0, i64 208 store i32 %2, ptr %9, align 8 tail call void @mutex_unlock(ptr noundef nonnull @pps_idr_lock) #9 %10 = load i32, ptr @pps_devt, align 4 %11 = and i32 %10, -1048576 %12 = load i32, ptr %9, align 8 %13 = or i32 %11, %12 - %14 = getelementptr inbounds i8, ptr %0, i64 224 - tail call void @cdev_init(ptr noundef %14, ptr noundef nonnull @pps_cdev_fops) #9 - %15 = getelementptr inbounds i8, ptr %0, i64 80 + %14 = getelementptr inbounds nuw i8, ptr %0, i64 224 + tail call void @cdev_init(ptr noundef nonnull %14, ptr noundef nonnull @pps_cdev_fops) #9 + %15 = getelementptr inbounds nuw i8, ptr %0, i64 80 %16 = load ptr, ptr %15, align 8 - %17 = getelementptr inbounds i8, ptr %0, i64 288 + %17 = getelementptr inbounds nuw i8, ptr %0, i64 288 store ptr %16, ptr %17, align 8 - %18 = tail call i32 @cdev_add(ptr noundef %14, i32 noundef %13, i32 noundef 1) #9 + %18 = tail call i32 @cdev_add(ptr noundef nonnull %14, i32 noundef %13, i32 noundef 1) #9 %19 = icmp eq i32 %18, 0 br i1 %19, label %25, label %20 @@ -104,11 +104,11 @@ define dso_local i32 @pps_register_cdev(ptr noundef %0) local_unnamed_addr #0 al 25: ; preds = %8 %26 = load ptr, ptr @pps_class, align 8 - %27 = getelementptr inbounds i8, ptr %0, i64 88 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 88 %28 = load ptr, ptr %27, align 8 %29 = load i32, ptr %9, align 8 %30 = tail call ptr (ptr, ptr, i32, ptr, ptr, ...) @device_create(ptr noundef %26, ptr noundef %28, i32 noundef %13, ptr noundef %0, ptr noundef nonnull @.str.2, i32 noundef %29) #9 - %31 = getelementptr inbounds i8, ptr %0, i64 328 + %31 = getelementptr inbounds nuw i8, ptr %0, i64 328 store ptr %30, ptr %31, align 8 %32 = icmp ugt ptr %30, inttoptr (i64 -4096 to ptr) br i1 %32, label %33, label %36 @@ -116,11 +116,11 @@ define dso_local i32 @pps_register_cdev(ptr noundef %0) local_unnamed_addr #0 al 33: ; preds = %25 %34 = ptrtoint ptr %30 to i64 %35 = trunc i64 %34 to i32 - tail call void @cdev_del(ptr noundef %14) #9 + tail call void @cdev_del(ptr noundef nonnull %14) #9 br label %38 36: ; preds = %25 - %37 = getelementptr inbounds i8, ptr %30, i64 688 + %37 = getelementptr inbounds nuw i8, ptr %30, i64 688 store ptr @pps_device_destruct, ptr %37, align 8 br label %45 @@ -168,12 +168,12 @@ declare dso_local ptr @device_create(ptr noundef, ptr noundef, i32 noundef, ptr ; Function Attrs: fn_ret_thunk_extern nounwind null_pointer_is_valid define internal void @pps_device_destruct(ptr noundef %0) #0 align 16 { - %2 = getelementptr inbounds i8, ptr %0, i64 120 + %2 = getelementptr inbounds nuw i8, ptr %0, i64 120 %3 = load ptr, ptr %2, align 8 - %4 = getelementptr inbounds i8, ptr %3, i64 224 - tail call void @cdev_del(ptr noundef %4) #9 + %4 = getelementptr inbounds nuw i8, ptr %3, i64 224 + tail call void @cdev_del(ptr noundef nonnull %4) #9 tail call void @mutex_lock(ptr noundef nonnull @pps_idr_lock) #9 - %5 = getelementptr inbounds i8, ptr %3, i64 208 + %5 = getelementptr inbounds nuw i8, ptr %3, i64 208 %6 = load i32, ptr %5, align 8 %7 = zext i32 %6 to i64 %8 = tail call ptr @idr_remove(ptr noundef nonnull @pps_idr, i64 noundef %7) #9 @@ -194,12 +194,12 @@ declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: fn_ret_thunk_extern nounwind null_pointer_is_valid define dso_local void @pps_unregister_cdev(ptr nocapture noundef %0) local_unnamed_addr #0 align 16 { - %2 = getelementptr inbounds i8, ptr %0, i64 216 + %2 = getelementptr inbounds nuw i8, ptr %0, i64 216 store ptr null, ptr %2, align 8 %3 = load ptr, ptr @pps_class, align 8 - %4 = getelementptr inbounds i8, ptr %0, i64 328 + %4 = getelementptr inbounds nuw i8, ptr %0, i64 328 %5 = load ptr, ptr %4, align 8 - %6 = getelementptr inbounds i8, ptr %5, i64 644 + %6 = getelementptr inbounds nuw i8, ptr %5, i64 644 %7 = load i32, ptr %6, align 4 tail call void @device_destroy(ptr noundef %3, i32 noundef %7) #9 ret void @@ -273,7 +273,7 @@ define internal i32 @pps_init() #4 section ".init.text" align 16 { br label %18 8: ; preds = %0 - %9 = getelementptr inbounds i8, ptr %1, i64 16 + %9 = getelementptr inbounds nuw i8, ptr %1, i64 16 store ptr @pps_groups, ptr %9, align 8 %10 = tail call i32 @alloc_chrdev_region(ptr noundef nonnull @pps_devt, i32 noundef 0, i32 noundef 16, ptr noundef nonnull @.str.6) #9 %11 = icmp slt i32 %10, 0 @@ -297,24 +297,22 @@ define internal i32 @pps_init() #4 section ".init.text" align 16 { ; Function Attrs: fn_ret_thunk_extern nounwind null_pointer_is_valid define internal noundef i32 @pps_cdev_poll(ptr noundef %0, ptr noundef %1) #0 align 16 { - %3 = getelementptr inbounds i8, ptr %0, i64 200 + %3 = getelementptr inbounds nuw i8, ptr %0, i64 200 %4 = load ptr, ptr %3, align 8 - %5 = getelementptr inbounds i8, ptr %4, i64 184 + %5 = getelementptr inbounds nuw i8, ptr %4, i64 184 %6 = icmp eq ptr %1, null - br i1 %6, label %13, label %7 + br i1 %6, label %10, label %7 7: ; preds = %2 %8 = load ptr, ptr %1, align 8 - %9 = icmp ne ptr %8, null - %10 = icmp ne ptr %5, null - %11 = and i1 %10, %9 - br i1 %11, label %12, label %13 + %.not = icmp eq ptr %8, null + br i1 %.not, label %10, label %9 -12: ; preds = %7 +9: ; preds = %7 tail call void %8(ptr noundef %0, ptr noundef nonnull %5, ptr noundef nonnull %1) #9 - br label %13 + br label %10 -13: ; preds = %12, %7, %2 +10: ; preds = %9, %7, %2 ret i32 65 } @@ -323,7 +321,7 @@ define internal range(i64 -110, 1) i64 @pps_cdev_ioctl(ptr nocapture noundef rea %4 = alloca %struct.pps_kparams, align 8 %5 = alloca %struct.pps_fdata, align 8 %6 = alloca %struct.pps_bind_args, align 4 - %7 = getelementptr inbounds i8, ptr %0, i64 200 + %7 = getelementptr inbounds nuw i8, ptr %0, i64 200 %8 = load ptr, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #9 call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %4, i8 0, i64 40, i1 false), !annotation !9 @@ -337,11 +335,11 @@ define internal range(i64 -110, 1) i64 @pps_cdev_ioctl(ptr nocapture noundef rea ] 10: ; preds = %3 - %11 = getelementptr inbounds i8, ptr %8, i64 344 - tail call void @_raw_spin_lock_irq(ptr noundef %11) #9 - %12 = getelementptr inbounds i8, ptr %8, i64 96 - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %4, ptr noundef align 8 dereferenceable(40) %12, i64 40, i1 false) - tail call void @_raw_spin_unlock_irq(ptr noundef %11) #9 + %11 = getelementptr inbounds nuw i8, ptr %8, i64 344 + tail call void @_raw_spin_lock_irq(ptr noundef nonnull %11) #9 + %12 = getelementptr inbounds nuw i8, ptr %8, i64 96 + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %4, ptr noundef nonnull align 8 dereferenceable(40) %12, i64 40, i1 false) + tail call void @_raw_spin_unlock_irq(ptr noundef nonnull %11) #9 %13 = call i64 @_copy_to_user(ptr noundef %9, ptr noundef nonnull %4, i64 noundef 40) #9 %14 = and i64 %13, 4294967295 %15 = icmp eq i64 %14, 0 @@ -358,14 +356,14 @@ define internal range(i64 -110, 1) i64 @pps_cdev_ioctl(ptr nocapture noundef rea br i1 %21, label %22, label %119 22: ; preds = %18 - %23 = getelementptr inbounds i8, ptr %4, i64 4 + %23 = getelementptr inbounds nuw i8, ptr %4, i64 4 %24 = load i32, ptr %23, align 4 %25 = and i32 %24, 3 %26 = icmp eq i32 %25, 0 br i1 %26, label %119, label %27 27: ; preds = %22 - %28 = getelementptr inbounds i8, ptr %8, i64 64 + %28 = getelementptr inbounds nuw i8, ptr %8, i64 64 %29 = load i32, ptr %28, align 8 %30 = xor i32 %29, -1 %31 = and i32 %24, %30 @@ -373,17 +371,17 @@ define internal range(i64 -110, 1) i64 @pps_cdev_ioctl(ptr nocapture noundef rea br i1 %32, label %33, label %119 33: ; preds = %27 - %34 = getelementptr inbounds i8, ptr %8, i64 344 - call void @_raw_spin_lock_irq(ptr noundef %34) #9 - %35 = getelementptr inbounds i8, ptr %8, i64 96 - call void @llvm.memcpy.p0.p0.i64(ptr noundef align 8 dereferenceable(40) %35, ptr noundef nonnull align 8 dereferenceable(40) %4, i64 40, i1 false) + %34 = getelementptr inbounds nuw i8, ptr %8, i64 344 + call void @_raw_spin_lock_irq(ptr noundef nonnull %34) #9 + %35 = getelementptr inbounds nuw i8, ptr %8, i64 96 + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %35, ptr noundef nonnull align 8 dereferenceable(40) %4, i64 40, i1 false) %36 = load i32, ptr %23, align 4 %37 = and i32 %36, 12288 %38 = icmp eq i32 %37, 0 br i1 %38, label %39, label %43 39: ; preds = %33 - %40 = getelementptr inbounds i8, ptr %8, i64 100 + %40 = getelementptr inbounds nuw i8, ptr %8, i64 100 %41 = load i32, ptr %40, align 4 %42 = or i32 %41, 4096 store i32 %42, ptr %40, align 4 @@ -396,7 +394,7 @@ define internal range(i64 -110, 1) i64 @pps_cdev_ioctl(ptr nocapture noundef rea br i1 %46, label %51, label %47 47: ; preds = %43 - %48 = getelementptr inbounds i8, ptr %8, i64 100 + %48 = getelementptr inbounds nuw i8, ptr %8, i64 100 %49 = load i32, ptr %48, align 4 %50 = or i32 %49, 256 store i32 %50, ptr %48, align 4 @@ -404,15 +402,15 @@ define internal range(i64 -110, 1) i64 @pps_cdev_ioctl(ptr nocapture noundef rea 51: ; preds = %47, %43 store i32 1, ptr %35, align 8 - %52 = getelementptr inbounds i8, ptr %8, i64 116 + %52 = getelementptr inbounds nuw i8, ptr %8, i64 116 store i32 0, ptr %52, align 4 - %53 = getelementptr inbounds i8, ptr %8, i64 132 + %53 = getelementptr inbounds nuw i8, ptr %8, i64 132 store i32 0, ptr %53, align 4 - call void @_raw_spin_unlock_irq(ptr noundef %34) #9 + call void @_raw_spin_unlock_irq(ptr noundef nonnull %34) #9 br label %118 54: ; preds = %3 - %55 = getelementptr inbounds i8, ptr %8, i64 64 + %55 = getelementptr inbounds nuw i8, ptr %8, i64 64 %56 = load i32, ptr %55, align 8 %57 = tail call i64 @llvm.read_register.i64(metadata !0) %58 = tail call { ptr, i64 } asm sideeffect "call __put_user_${4:P}", "={cx},={rsp},0,{rax},i,{rsp},~{ebx},~{dirflag},~{fpsr},~{flags}"(ptr %9, i32 %56, i64 4, i64 %57) #9, !srcloc !10 @@ -447,26 +445,26 @@ define internal range(i64 -110, 1) i64 @pps_cdev_ioctl(ptr nocapture noundef rea br label %119 73: ; preds = %68 - %74 = getelementptr inbounds i8, ptr %8, i64 344 - call void @_raw_spin_lock_irq(ptr noundef %74) #9 - %75 = getelementptr inbounds i8, ptr %8, i64 136 + %74 = getelementptr inbounds nuw i8, ptr %8, i64 344 + call void @_raw_spin_lock_irq(ptr noundef nonnull %74) #9 + %75 = getelementptr inbounds nuw i8, ptr %8, i64 136 %76 = load i32, ptr %75, align 8 store i32 %76, ptr %5, align 8 - %77 = getelementptr inbounds i8, ptr %8, i64 140 + %77 = getelementptr inbounds nuw i8, ptr %8, i64 140 %78 = load i32, ptr %77, align 4 - %79 = getelementptr inbounds i8, ptr %5, i64 4 + %79 = getelementptr inbounds nuw i8, ptr %5, i64 4 store i32 %78, ptr %79, align 4 - %80 = getelementptr inbounds i8, ptr %5, i64 8 - %81 = getelementptr inbounds i8, ptr %8, i64 144 - call void @llvm.memcpy.p0.p0.i64(ptr noundef align 8 dereferenceable(16) %80, ptr noundef align 8 dereferenceable(16) %81, i64 16, i1 false) - %82 = getelementptr inbounds i8, ptr %5, i64 24 - %83 = getelementptr inbounds i8, ptr %8, i64 160 - call void @llvm.memcpy.p0.p0.i64(ptr noundef align 8 dereferenceable(16) %82, ptr noundef align 8 dereferenceable(16) %83, i64 16, i1 false) - %84 = getelementptr inbounds i8, ptr %8, i64 176 + %80 = getelementptr inbounds nuw i8, ptr %5, i64 8 + %81 = getelementptr inbounds nuw i8, ptr %8, i64 144 + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %80, ptr noundef nonnull align 8 dereferenceable(16) %81, i64 16, i1 false) + %82 = getelementptr inbounds nuw i8, ptr %5, i64 24 + %83 = getelementptr inbounds nuw i8, ptr %8, i64 160 + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %82, ptr noundef nonnull align 8 dereferenceable(16) %83, i64 16, i1 false) + %84 = getelementptr inbounds nuw i8, ptr %8, i64 176 %85 = load i32, ptr %84, align 8 - %86 = getelementptr inbounds i8, ptr %5, i64 40 + %86 = getelementptr inbounds nuw i8, ptr %5, i64 40 store i32 %85, ptr %86, align 8 - call void @_raw_spin_unlock_irq(ptr noundef %74) #9 + call void @_raw_spin_unlock_irq(ptr noundef nonnull %74) #9 %87 = call i64 @_copy_to_user(ptr noundef %9, ptr noundef nonnull %5, i64 noundef 64) #9 %88 = and i64 %87, 4294967295 %89 = icmp eq i64 %88, 0 @@ -485,9 +483,9 @@ define internal range(i64 -110, 1) i64 @pps_cdev_ioctl(ptr nocapture noundef rea br i1 %94, label %95, label %116 95: ; preds = %92 - %96 = getelementptr inbounds i8, ptr %6, i64 4 + %96 = getelementptr inbounds nuw i8, ptr %6, i64 4 %97 = load i32, ptr %96, align 4 - %98 = getelementptr inbounds i8, ptr %8, i64 64 + %98 = getelementptr inbounds nuw i8, ptr %8, i64 64 %99 = load i32, ptr %98, align 8 %100 = xor i32 %99, -1 %101 = and i32 %97, %100 @@ -501,7 +499,7 @@ define internal range(i64 -110, 1) i64 @pps_cdev_ioctl(ptr nocapture noundef rea 106: ; preds = %103 %107 = icmp ugt i32 %97, 3 - %108 = getelementptr inbounds i8, ptr %6, i64 8 + %108 = getelementptr inbounds nuw i8, ptr %6, i64 8 %109 = load i32, ptr %108, align 4 %110 = icmp ne i32 %109, 0 %111 = select i1 %107, i1 true, i1 %110 @@ -509,7 +507,7 @@ define internal range(i64 -110, 1) i64 @pps_cdev_ioctl(ptr nocapture noundef rea 112: ; preds = %106, %103, %95 %113 = phi ptr [ @.str.3, %95 ], [ @.str.4, %103 ], [ @.str.4, %106 ] - %114 = getelementptr inbounds i8, ptr %8, i64 328 + %114 = getelementptr inbounds nuw i8, ptr %8, i64 328 %115 = load ptr, ptr %114, align 8 call void (ptr, ptr, ...) @_dev_err(ptr noundef %115, ptr noundef nonnull %113, i32 noundef %97) #10 br label %116 @@ -532,7 +530,7 @@ define internal range(i64 -110, 1) i64 @pps_cdev_ioctl(ptr nocapture noundef rea define internal range(i64 -110, 1) i64 @pps_cdev_compat_ioctl(ptr nocapture noundef readonly %0, i32 noundef %1, i64 noundef %2) #0 align 16 { %4 = alloca %struct.pps_fdata_compat, align 4 %5 = alloca %struct.pps_fdata, align 8 - %6 = getelementptr inbounds i8, ptr %0, i64 200 + %6 = getelementptr inbounds nuw i8, ptr %0, i64 200 %7 = load ptr, ptr %6, align 8 %8 = inttoptr i64 %2 to ptr %9 = and i32 %1, -1073676289 @@ -550,9 +548,9 @@ define internal range(i64 -110, 1) i64 @pps_cdev_compat_ioctl(ptr nocapture noun br i1 %14, label %15, label %39 15: ; preds = %11 - %16 = getelementptr inbounds i8, ptr %5, i64 48 - %17 = getelementptr inbounds i8, ptr %4, i64 44 - call void @llvm.memcpy.p0.p0.i64(ptr noundef align 8 dereferenceable(16) %16, ptr noundef align 4 dereferenceable(16) %17, i64 16, i1 false) + %16 = getelementptr inbounds nuw i8, ptr %5, i64 48 + %17 = getelementptr inbounds nuw i8, ptr %4, i64 44 + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 4 dereferenceable(16) %17, i64 16, i1 false) %18 = call fastcc i32 @pps_cdev_pps_fetch(ptr noundef %7, ptr noundef nonnull %5), !range !11 %19 = icmp eq i32 %18, 0 br i1 %19, label %22, label %20 @@ -562,26 +560,26 @@ define internal range(i64 -110, 1) i64 @pps_cdev_compat_ioctl(ptr nocapture noun br label %39 22: ; preds = %15 - %23 = getelementptr inbounds i8, ptr %7, i64 344 - call void @_raw_spin_lock_irq(ptr noundef %23) #9 - %24 = getelementptr inbounds i8, ptr %7, i64 136 + %23 = getelementptr inbounds nuw i8, ptr %7, i64 344 + call void @_raw_spin_lock_irq(ptr noundef nonnull %23) #9 + %24 = getelementptr inbounds nuw i8, ptr %7, i64 136 %25 = load i32, ptr %24, align 8 store i32 %25, ptr %4, align 4 - %26 = getelementptr inbounds i8, ptr %7, i64 140 + %26 = getelementptr inbounds nuw i8, ptr %7, i64 140 %27 = load i32, ptr %26, align 4 - %28 = getelementptr inbounds i8, ptr %4, i64 4 + %28 = getelementptr inbounds nuw i8, ptr %4, i64 4 store i32 %27, ptr %28, align 4 - %29 = getelementptr inbounds i8, ptr %7, i64 176 + %29 = getelementptr inbounds nuw i8, ptr %7, i64 176 %30 = load i32, ptr %29, align 8 - %31 = getelementptr inbounds i8, ptr %4, i64 40 + %31 = getelementptr inbounds nuw i8, ptr %4, i64 40 store i32 %30, ptr %31, align 4 - %32 = getelementptr inbounds i8, ptr %4, i64 8 - %33 = getelementptr inbounds i8, ptr %7, i64 144 - call void @llvm.memcpy.p0.p0.i64(ptr noundef align 4 dereferenceable(16) %32, ptr noundef align 8 dereferenceable(16) %33, i64 16, i1 false) - %34 = getelementptr inbounds i8, ptr %4, i64 24 - %35 = getelementptr inbounds i8, ptr %7, i64 160 - call void @llvm.memcpy.p0.p0.i64(ptr noundef align 4 dereferenceable(16) %34, ptr noundef align 8 dereferenceable(16) %35, i64 16, i1 false) - call void @_raw_spin_unlock_irq(ptr noundef %23) #9 + %32 = getelementptr inbounds nuw i8, ptr %4, i64 8 + %33 = getelementptr inbounds nuw i8, ptr %7, i64 144 + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %32, ptr noundef nonnull align 8 dereferenceable(16) %33, i64 16, i1 false) + %34 = getelementptr inbounds nuw i8, ptr %4, i64 24 + %35 = getelementptr inbounds nuw i8, ptr %7, i64 160 + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %34, ptr noundef nonnull align 8 dereferenceable(16) %35, i64 16, i1 false) + call void @_raw_spin_unlock_irq(ptr noundef nonnull %23) #9 %36 = call i64 @_copy_to_user(ptr noundef %8, ptr noundef nonnull %4, i64 noundef 60) #9 %37 = icmp eq i64 %36, 0 %38 = select i1 %37, i64 0, i64 -14 @@ -605,10 +603,10 @@ define internal range(i64 -110, 1) i64 @pps_cdev_compat_ioctl(ptr nocapture noun ; Function Attrs: fn_ret_thunk_extern nounwind null_pointer_is_valid define internal noundef i32 @pps_cdev_open(ptr nocapture noundef readonly %0, ptr nocapture noundef writeonly %1) #0 align 16 { - %3 = getelementptr inbounds i8, ptr %0, i64 568 + %3 = getelementptr inbounds nuw i8, ptr %0, i64 568 %4 = load ptr, ptr %3, align 8 %5 = getelementptr i8, ptr %4, i64 -224 - %6 = getelementptr inbounds i8, ptr %1, i64 200 + %6 = getelementptr inbounds nuw i8, ptr %1, i64 200 store ptr %5, ptr %6, align 8 %7 = getelementptr i8, ptr %4, i64 104 %8 = load ptr, ptr %7, align 8 @@ -618,7 +616,7 @@ define internal noundef i32 @pps_cdev_open(ptr nocapture noundef readonly %0, pt ; Function Attrs: fn_ret_thunk_extern nounwind null_pointer_is_valid define internal noundef i32 @pps_cdev_release(ptr nocapture noundef readonly %0, ptr nocapture readnone %1) #0 align 16 { - %3 = getelementptr inbounds i8, ptr %0, i64 568 + %3 = getelementptr inbounds nuw i8, ptr %0, i64 568 %4 = load ptr, ptr %3, align 8 %5 = getelementptr i8, ptr %4, i64 104 %6 = load ptr, ptr %5, align 8 @@ -628,10 +626,10 @@ define internal noundef i32 @pps_cdev_release(ptr nocapture noundef readonly %0, ; Function Attrs: fn_ret_thunk_extern nounwind null_pointer_is_valid define internal i32 @pps_cdev_fasync(i32 noundef %0, ptr noundef %1, i32 noundef %2) #0 align 16 { - %4 = getelementptr inbounds i8, ptr %1, i64 200 + %4 = getelementptr inbounds nuw i8, ptr %1, i64 200 %5 = load ptr, ptr %4, align 8 - %6 = getelementptr inbounds i8, ptr %5, i64 336 - %7 = tail call i32 @fasync_helper(i32 noundef %0, ptr noundef %1, i32 noundef %2, ptr noundef %6) #9 + %6 = getelementptr inbounds nuw i8, ptr %5, i64 336 + %7 = tail call i32 @fasync_helper(i32 noundef %0, ptr noundef %1, i32 noundef %2, ptr noundef nonnull %6) #9 ret i32 %7 } @@ -654,9 +652,9 @@ declare void @llvm.write_register.i64(metadata, i64) #8 define internal fastcc range(i32 -110, 1) i32 @pps_cdev_pps_fetch(ptr noundef %0, ptr nocapture noundef readonly %1) unnamed_addr #0 align 16 { %3 = alloca %struct.wait_queue_entry, align 8 %4 = alloca %struct.wait_queue_entry, align 8 - %5 = getelementptr inbounds i8, ptr %0, i64 180 + %5 = getelementptr inbounds nuw i8, ptr %0, i64 180 %6 = load i32, ptr %5, align 4 - %7 = getelementptr inbounds i8, ptr %1, i64 60 + %7 = getelementptr inbounds nuw i8, ptr %1, i64 60 %8 = load i32, ptr %7, align 4 %9 = and i32 %8, 1 %10 = icmp eq i32 %9, 0 @@ -672,8 +670,8 @@ define internal fastcc range(i32 -110, 1) i32 @pps_cdev_pps_fetch(ptr noundef %0 call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %3) #9 call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %3, i8 0, i64 40, i1 false), !annotation !9 call void @init_wait_entry(ptr noundef nonnull %3, i32 noundef 0) #9 - %16 = getelementptr inbounds i8, ptr %0, i64 184 - %17 = call i64 @prepare_to_wait_event(ptr noundef %16, ptr noundef nonnull %3, i32 noundef 1) #9 + %16 = getelementptr inbounds nuw i8, ptr %0, i64 184 + %17 = call i64 @prepare_to_wait_event(ptr noundef nonnull %16, ptr noundef nonnull %3, i32 noundef 1) #9 %18 = load i32, ptr %5, align 4 %19 = icmp eq i32 %6, %18 br i1 %19, label %.lr.ph, label %._crit_edge @@ -685,13 +683,13 @@ define internal fastcc range(i32 -110, 1) i32 @pps_cdev_pps_fetch(ptr noundef %0 22: ; preds = %.lr.ph call void @schedule() #9 - %23 = call i64 @prepare_to_wait_event(ptr noundef %16, ptr noundef nonnull %3, i32 noundef 1) #9 + %23 = call i64 @prepare_to_wait_event(ptr noundef nonnull %16, ptr noundef nonnull %3, i32 noundef 1) #9 %24 = load i32, ptr %5, align 4 %25 = icmp eq i32 %6, %24 br i1 %25, label %.lr.ph, label %._crit_edge ._crit_edge: ; preds = %22, %15 - call void @finish_wait(ptr noundef %16, ptr noundef nonnull %3) #9 + call void @finish_wait(ptr noundef nonnull %16, ptr noundef nonnull %3) #9 br label %.thread5 .thread5.loopexit: ; preds = %.lr.ph @@ -704,10 +702,10 @@ define internal fastcc range(i32 -110, 1) i32 @pps_cdev_pps_fetch(ptr noundef %0 br label %63 28: ; preds = %2 - %29 = getelementptr inbounds i8, ptr %1, i64 48 + %29 = getelementptr inbounds nuw i8, ptr %1, i64 48 %30 = load i64, ptr %29, align 8 %31 = mul i64 %30, 1000 - %32 = getelementptr inbounds i8, ptr %1, i64 56 + %32 = getelementptr inbounds nuw i8, ptr %1, i64 56 %33 = load i32, ptr %32, align 8 %34 = sdiv i32 %33, 1000000 %35 = sext i32 %34 to i64 @@ -725,8 +723,8 @@ define internal fastcc range(i32 -110, 1) i32 @pps_cdev_pps_fetch(ptr noundef %0 call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #9 call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %4, i8 0, i64 40, i1 false), !annotation !9 call void @init_wait_entry(ptr noundef nonnull %4, i32 noundef 0) #9 - %43 = getelementptr inbounds i8, ptr %0, i64 184 - %44 = call i64 @prepare_to_wait_event(ptr noundef %43, ptr noundef nonnull %4, i32 noundef 1) #9 + %43 = getelementptr inbounds nuw i8, ptr %0, i64 184 + %44 = call i64 @prepare_to_wait_event(ptr noundef nonnull %43, ptr noundef nonnull %4, i32 noundef 1) #9 %45 = load i32, ptr %5, align 4 %.not19 = icmp eq i32 %6, %45 br i1 %.not19, label %.lr.ph17, label %._crit_edge18 @@ -739,7 +737,7 @@ define internal fastcc range(i32 -110, 1) i32 @pps_cdev_pps_fetch(ptr noundef %0 49: ; preds = %.lr.ph17 %50 = call i64 @schedule_timeout(i64 noundef %46) #9 - %51 = call i64 @prepare_to_wait_event(ptr noundef %43, ptr noundef nonnull %4, i32 noundef 1) #9 + %51 = call i64 @prepare_to_wait_event(ptr noundef nonnull %43, ptr noundef nonnull %4, i32 noundef 1) #9 %52 = load i32, ptr %5, align 4 %53 = icmp ne i32 %6, %52 %54 = icmp eq i64 %50, 0 @@ -751,7 +749,7 @@ define internal fastcc range(i32 -110, 1) i32 @pps_cdev_pps_fetch(ptr noundef %0 ._crit_edge18: ; preds = %49, %42 %.lcssa = phi i64 [ %36, %42 ], [ %56, %49 ] - call void @finish_wait(ptr noundef %43, ptr noundef nonnull %4) #9 + call void @finish_wait(ptr noundef nonnull %43, ptr noundef nonnull %4) #9 br label %.thread7 .thread7: ; preds = %.lr.ph17, %._crit_edge18 diff --git a/bench/llvm/optimized/MD5.cpp.ll b/bench/llvm/optimized/MD5.cpp.ll index 63bf5d72e86..da82dd5057d 100644 --- a/bench/llvm/optimized/MD5.cpp.ll +++ b/bench/llvm/optimized/MD5.cpp.ll @@ -33,21 +33,21 @@ define dso_local noundef nonnull ptr @_ZN4llvm3MD54bodyENS_8ArrayRefIhEE(ptr noc %9 = getelementptr inbounds nuw i8, ptr %0, i64 12 %10 = load i32, ptr %9, align 4 %11 = getelementptr inbounds nuw i8, ptr %0, i64 88 - %12 = getelementptr inbounds i8, ptr %0, i64 92 - %13 = getelementptr inbounds i8, ptr %0, i64 96 - %14 = getelementptr inbounds i8, ptr %0, i64 100 - %15 = getelementptr inbounds i8, ptr %0, i64 104 - %16 = getelementptr inbounds i8, ptr %0, i64 108 - %17 = getelementptr inbounds i8, ptr %0, i64 112 - %18 = getelementptr inbounds i8, ptr %0, i64 116 - %19 = getelementptr inbounds i8, ptr %0, i64 120 - %20 = getelementptr inbounds i8, ptr %0, i64 124 - %21 = getelementptr inbounds i8, ptr %0, i64 128 - %22 = getelementptr inbounds i8, ptr %0, i64 132 - %23 = getelementptr inbounds i8, ptr %0, i64 136 - %24 = getelementptr inbounds i8, ptr %0, i64 140 - %25 = getelementptr inbounds i8, ptr %0, i64 144 - %26 = getelementptr inbounds i8, ptr %0, i64 148 + %12 = getelementptr inbounds nuw i8, ptr %0, i64 92 + %13 = getelementptr inbounds nuw i8, ptr %0, i64 96 + %14 = getelementptr inbounds nuw i8, ptr %0, i64 100 + %15 = getelementptr inbounds nuw i8, ptr %0, i64 104 + %16 = getelementptr inbounds nuw i8, ptr %0, i64 108 + %17 = getelementptr inbounds nuw i8, ptr %0, i64 112 + %18 = getelementptr inbounds nuw i8, ptr %0, i64 116 + %19 = getelementptr inbounds nuw i8, ptr %0, i64 120 + %20 = getelementptr inbounds nuw i8, ptr %0, i64 124 + %21 = getelementptr inbounds nuw i8, ptr %0, i64 128 + %22 = getelementptr inbounds nuw i8, ptr %0, i64 132 + %23 = getelementptr inbounds nuw i8, ptr %0, i64 136 + %24 = getelementptr inbounds nuw i8, ptr %0, i64 140 + %25 = getelementptr inbounds nuw i8, ptr %0, i64 144 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 148 br label %27 27: ; preds = %27, %3 @@ -836,7 +836,7 @@ define dso_local void @_ZN4llvm3MD56updateENS_8ArrayRefIhEE(ptr noundef nonnull %20 = sub nuw nsw i64 64, %19 %21 = icmp ult i64 %2, %20 %22 = getelementptr inbounds nuw i8, ptr %0, i64 24 - %23 = getelementptr inbounds [64 x i8], ptr %22, i64 0, i64 %19 + %23 = getelementptr inbounds nuw [64 x i8], ptr %22, i64 0, i64 %19 br i1 %21, label %24, label %25 24: ; preds = %18 @@ -845,7 +845,7 @@ define dso_local void @_ZN4llvm3MD56updateENS_8ArrayRefIhEE(ptr noundef nonnull 25: ; preds = %18 tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %23, ptr noundef nonnull align 1 dereferenceable(1) %1, i64 %20, i1 false) - %26 = getelementptr inbounds i8, ptr %1, i64 %20 + %26 = getelementptr inbounds nuw i8, ptr %1, i64 %20 %27 = sub nuw i64 %2, %20 %28 = tail call noundef ptr @_ZN4llvm3MD54bodyENS_8ArrayRefIhEE(ptr noundef nonnull align 4 dereferenceable(152) %0, ptr nonnull %22, i64 64) br label %29 @@ -902,7 +902,7 @@ define dso_local void @_ZN4llvm3MD56updateENS_9StringRefE(ptr noundef nonnull al %20 = sub nuw nsw i64 64, %19 %21 = icmp ult i64 %2, %20 %22 = getelementptr inbounds nuw i8, ptr %0, i64 24 - %23 = getelementptr inbounds [64 x i8], ptr %22, i64 0, i64 %19 + %23 = getelementptr inbounds nuw [64 x i8], ptr %22, i64 0, i64 %19 br i1 %21, label %24, label %25 24: ; preds = %18 @@ -911,7 +911,7 @@ define dso_local void @_ZN4llvm3MD56updateENS_9StringRefE(ptr noundef nonnull al 25: ; preds = %18 tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %23, ptr noundef nonnull align 1 dereferenceable(1) %1, i64 %20, i1 false) - %26 = getelementptr inbounds i8, ptr %1, i64 %20 + %26 = getelementptr inbounds nuw i8, ptr %1, i64 %20 %27 = sub nuw i64 %2, %20 %28 = tail call noundef ptr @_ZN4llvm3MD54bodyENS_8ArrayRefIhEE(ptr noundef nonnull align 4 dereferenceable(152) %0, ptr nonnull %22, i64 64) br label %29 @@ -947,14 +947,14 @@ define dso_local void @_ZN4llvm3MD55finalERNS0_9MD5ResultE(ptr noundef nonnull a %6 = zext nneg i32 %5 to i64 %7 = getelementptr inbounds nuw i8, ptr %0, i64 24 %8 = add nuw nsw i64 %6, 1 - %9 = getelementptr inbounds [64 x i8], ptr %7, i64 0, i64 %6 + %9 = getelementptr inbounds nuw [64 x i8], ptr %7, i64 0, i64 %6 store i8 -128, ptr %9, align 1 %10 = xor i64 %6, 63 %11 = icmp ult i64 %10, 8 br i1 %11, label %12, label %15 12: ; preds = %2 - %13 = getelementptr inbounds [64 x i8], ptr %7, i64 0, i64 %8 + %13 = getelementptr inbounds nuw [64 x i8], ptr %7, i64 0, i64 %8 tail call void @llvm.memset.p0.i64(ptr nonnull align 1 %13, i8 0, i64 %10, i1 false) %14 = tail call noundef ptr @_ZN4llvm3MD54bodyENS_8ArrayRefIhEE(ptr noundef nonnull align 4 dereferenceable(152) %0, ptr nonnull %7, i64 64) br label %15 @@ -968,10 +968,10 @@ define dso_local void @_ZN4llvm3MD55finalERNS0_9MD5ResultE(ptr noundef nonnull a %18 = load i32, ptr %3, align 4 %19 = shl i32 %18, 3 store i32 %19, ptr %3, align 4 - %20 = getelementptr inbounds i8, ptr %0, i64 80 + %20 = getelementptr inbounds nuw i8, ptr %0, i64 80 call void @llvm.assume(i1 true) [ "align"(ptr %20, i64 1) ] store i32 %19, ptr %20, align 4 - %21 = getelementptr inbounds i8, ptr %0, i64 84 + %21 = getelementptr inbounds nuw i8, ptr %0, i64 84 %22 = getelementptr inbounds nuw i8, ptr %0, i64 16 %23 = load i32, ptr %22, align 4 call void @llvm.assume(i1 true) [ "align"(ptr %21, i64 1) ] @@ -980,17 +980,17 @@ define dso_local void @_ZN4llvm3MD55finalERNS0_9MD5ResultE(ptr noundef nonnull a %25 = load i32, ptr %0, align 4 call void @llvm.assume(i1 true) [ "align"(ptr %1, i64 1) ] store i32 %25, ptr %1, align 1 - %26 = getelementptr inbounds i8, ptr %1, i64 4 + %26 = getelementptr inbounds nuw i8, ptr %1, i64 4 %27 = getelementptr inbounds nuw i8, ptr %0, i64 4 %28 = load i32, ptr %27, align 4 call void @llvm.assume(i1 true) [ "align"(ptr %26, i64 1) ] store i32 %28, ptr %26, align 1 - %29 = getelementptr inbounds i8, ptr %1, i64 8 + %29 = getelementptr inbounds nuw i8, ptr %1, i64 8 %30 = getelementptr inbounds nuw i8, ptr %0, i64 8 %31 = load i32, ptr %30, align 4 call void @llvm.assume(i1 true) [ "align"(ptr %29, i64 1) ] store i32 %31, ptr %29, align 1 - %32 = getelementptr inbounds i8, ptr %1, i64 12 + %32 = getelementptr inbounds nuw i8, ptr %1, i64 12 %33 = getelementptr inbounds nuw i8, ptr %0, i64 12 %34 = load i32, ptr %33, align 4 call void @llvm.assume(i1 true) [ "align"(ptr %32, i64 1) ] @@ -1009,14 +1009,14 @@ define dso_local { i64, i64 } @_ZN4llvm3MD55finalEv(ptr noundef nonnull align 4 %5 = zext nneg i32 %4 to i64 %6 = getelementptr inbounds nuw i8, ptr %0, i64 24 %7 = add nuw nsw i64 %5, 1 - %8 = getelementptr inbounds [64 x i8], ptr %6, i64 0, i64 %5 + %8 = getelementptr inbounds nuw [64 x i8], ptr %6, i64 0, i64 %5 store i8 -128, ptr %8, align 1 %9 = xor i64 %5, 63 %10 = icmp ult i64 %9, 8 br i1 %10, label %11, label %_ZN4llvm3MD55finalERNS0_9MD5ResultE.exit 11: ; preds = %1 - %12 = getelementptr inbounds [64 x i8], ptr %6, i64 0, i64 %7 + %12 = getelementptr inbounds nuw [64 x i8], ptr %6, i64 0, i64 %7 tail call void @llvm.memset.p0.i64(ptr nonnull align 1 %12, i8 0, i64 %9, i1 false) %13 = tail call noundef ptr @_ZN4llvm3MD54bodyENS_8ArrayRefIhEE(ptr noundef nonnull align 4 dereferenceable(152) %0, ptr nonnull %6, i64 64) br label %_ZN4llvm3MD55finalERNS0_9MD5ResultE.exit @@ -1030,10 +1030,10 @@ _ZN4llvm3MD55finalERNS0_9MD5ResultE.exit: ; preds = %1, %11 %16 = load i32, ptr %2, align 4 %17 = shl i32 %16, 3 store i32 %17, ptr %2, align 4 - %18 = getelementptr inbounds i8, ptr %0, i64 80 + %18 = getelementptr inbounds nuw i8, ptr %0, i64 80 call void @llvm.assume(i1 true) [ "align"(ptr %18, i64 1) ] store i32 %17, ptr %18, align 4 - %19 = getelementptr inbounds i8, ptr %0, i64 84 + %19 = getelementptr inbounds nuw i8, ptr %0, i64 84 %20 = getelementptr inbounds nuw i8, ptr %0, i64 16 %21 = load i32, ptr %20, align 4 call void @llvm.assume(i1 true) [ "align"(ptr %19, i64 1) ] @@ -1057,14 +1057,14 @@ define dso_local { i64, i64 } @_ZN4llvm3MD56resultEv(ptr noundef nonnull align 4 %6 = zext nneg i32 %5 to i64 %7 = getelementptr inbounds nuw i8, ptr %0, i64 24 %8 = add nuw nsw i64 %6, 1 - %9 = getelementptr inbounds [64 x i8], ptr %7, i64 0, i64 %6 + %9 = getelementptr inbounds nuw [64 x i8], ptr %7, i64 0, i64 %6 store i8 -128, ptr %9, align 1 %10 = xor i64 %6, 63 %11 = icmp ult i64 %10, 8 br i1 %11, label %12, label %_ZN4llvm3MD55finalEv.exit 12: ; preds = %1 - %13 = getelementptr inbounds [64 x i8], ptr %7, i64 0, i64 %8 + %13 = getelementptr inbounds nuw [64 x i8], ptr %7, i64 0, i64 %8 tail call void @llvm.memset.p0.i64(ptr nonnull align 1 %13, i8 0, i64 %10, i1 false) %14 = tail call noundef ptr @_ZN4llvm3MD54bodyENS_8ArrayRefIhEE(ptr noundef nonnull align 4 dereferenceable(152) %0, ptr nonnull %7, i64 64) br label %_ZN4llvm3MD55finalEv.exit @@ -1078,10 +1078,10 @@ _ZN4llvm3MD55finalEv.exit: ; preds = %1, %12 %17 = load i32, ptr %3, align 4 %18 = shl i32 %17, 3 store i32 %18, ptr %3, align 4 - %19 = getelementptr inbounds i8, ptr %0, i64 80 + %19 = getelementptr inbounds nuw i8, ptr %0, i64 80 call void @llvm.assume(i1 true) [ "align"(ptr %19, i64 1) ] store i32 %18, ptr %19, align 4 - %20 = getelementptr inbounds i8, ptr %0, i64 84 + %20 = getelementptr inbounds nuw i8, ptr %0, i64 84 %21 = getelementptr inbounds nuw i8, ptr %0, i64 16 %22 = load i32, ptr %21, align 4 call void @llvm.assume(i1 true) [ "align"(ptr %20, i64 1) ] @@ -1098,7 +1098,7 @@ _ZN4llvm3MD55finalEv.exit: ; preds = %1, %12 ; Function Attrs: mustprogress nounwind uwtable define dso_local void @_ZNK4llvm3MD59MD5Result6digestEv(ptr dead_on_unwind noalias nonnull writable sret(%"class.llvm::SmallString") align 8 %0, ptr noundef nonnull align 1 dereferenceable(16) %1) local_unnamed_addr #6 align 2 { - %3 = getelementptr inbounds i8, ptr %0, i64 24 + %3 = getelementptr inbounds nuw i8, ptr %0, i64 24 tail call void @_ZN4llvm15SmallVectorBaseImEC2EPvm(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull %3, i64 noundef 32) #10 tail call void @_ZN4llvm5toHexENS_8ArrayRefIhEEbRNS_15SmallVectorImplIcEE(ptr nonnull %1, i64 16, i1 noundef zeroext true, ptr noundef nonnull align 8 dereferenceable(24) %0) ret void @@ -1122,7 +1122,7 @@ define linkonce_odr hidden void @_ZN4llvm5toHexENS_8ArrayRefIhEEbRNS_15SmallVect br i1 %13, label %14, label %.sink.split.i.i 14: ; preds = %11 - %15 = getelementptr inbounds i8, ptr %3, i64 24 + %15 = getelementptr inbounds nuw i8, ptr %3, i64 24 tail call void @_ZN4llvm15SmallVectorBaseImE8grow_podEPvmm(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull %15, i64 noundef %5, i64 noundef 1) #10 br label %.sink.split.i.i @@ -1146,7 +1146,7 @@ _ZN4llvm15SmallVectorImplIcE20resize_for_overwriteEm.exit: ; preds = %4, %.sink. %21 = zext i8 %20 to i32 %22 = lshr i32 %21, 4 %23 = zext nneg i32 %22 to i64 - %24 = getelementptr inbounds [17 x i8], ptr @_ZZN4llvm8hexdigitEjbE3LUT, i64 0, i64 %23 + %24 = getelementptr inbounds nuw [17 x i8], ptr @_ZZN4llvm8hexdigitEjbE3LUT, i64 0, i64 %23 %25 = load i8, ptr %24, align 1 %26 = or i8 %25, %17 %27 = shl i64 %.013, 1 @@ -1155,7 +1155,7 @@ _ZN4llvm15SmallVectorImplIcE20resize_for_overwriteEm.exit: ; preds = %4, %.sink. store i8 %26, ptr %29, align 1 %30 = and i32 %21, 15 %31 = zext nneg i32 %30 to i64 - %32 = getelementptr inbounds [17 x i8], ptr @_ZZN4llvm8hexdigitEjbE3LUT, i64 0, i64 %31 + %32 = getelementptr inbounds nuw [17 x i8], ptr @_ZZN4llvm8hexdigitEjbE3LUT, i64 0, i64 %31 %33 = load i8, ptr %32, align 1 %34 = or i8 %33, %17 %35 = or disjoint i64 %27, 1 @@ -1204,7 +1204,7 @@ define dso_local { i64, i64 } @_ZN4llvm3MD54hashENS_8ArrayRefIhEE(ptr %0, i64 %1 %20 = sub nuw nsw i64 64, %19 %21 = icmp ult i64 %1, %20 %22 = getelementptr inbounds nuw i8, ptr %3, i64 24 - %23 = getelementptr inbounds [64 x i8], ptr %22, i64 0, i64 %19 + %23 = getelementptr inbounds nuw [64 x i8], ptr %22, i64 0, i64 %19 br i1 %21, label %24, label %25 24: ; preds = %18 @@ -1213,7 +1213,7 @@ define dso_local { i64, i64 } @_ZN4llvm3MD54hashENS_8ArrayRefIhEE(ptr %0, i64 %1 25: ; preds = %18 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %23, ptr noundef nonnull align 1 dereferenceable(1) %0, i64 %20, i1 false) - %26 = getelementptr inbounds i8, ptr %0, i64 %20 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 %20 %27 = sub nuw i64 %1, %20 %28 = call noundef ptr @_ZN4llvm3MD54bodyENS_8ArrayRefIhEE(ptr noundef nonnull align 4 dereferenceable(152) %3, ptr nonnull %22, i64 64) br label %29 @@ -1235,22 +1235,23 @@ define dso_local { i64, i64 } @_ZN4llvm3MD54hashENS_8ArrayRefIhEE(ptr %0, i64 %1 %.1.i = phi i64 [ %34, %31 ], [ %.0.i, %29 ] %36 = getelementptr inbounds nuw i8, ptr %3, i64 24 call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 %36, ptr align 1 %.126.i, i64 %.1.i, i1 false) + %.pre = load i32, ptr %4, align 4 br label %_ZN4llvm3MD56updateENS_8ArrayRefIhEE.exit _ZN4llvm3MD56updateENS_8ArrayRefIhEE.exit: ; preds = %24, %35 - %37 = load i32, ptr %4, align 4 + %37 = phi i32 [ %8, %24 ], [ %.pre, %35 ] %38 = and i32 %37, 63 %39 = zext nneg i32 %38 to i64 %40 = getelementptr inbounds nuw i8, ptr %3, i64 24 %41 = add nuw nsw i64 %39, 1 - %42 = getelementptr inbounds [64 x i8], ptr %40, i64 0, i64 %39 + %42 = getelementptr inbounds nuw [64 x i8], ptr %40, i64 0, i64 %39 store i8 -128, ptr %42, align 1 %43 = xor i64 %39, 63 %44 = icmp ult i64 %43, 8 br i1 %44, label %45, label %_ZN4llvm3MD55finalERNS0_9MD5ResultE.exit 45: ; preds = %_ZN4llvm3MD56updateENS_8ArrayRefIhEE.exit - %46 = getelementptr inbounds [64 x i8], ptr %40, i64 0, i64 %41 + %46 = getelementptr inbounds nuw [64 x i8], ptr %40, i64 0, i64 %41 call void @llvm.memset.p0.i64(ptr nonnull align 1 %46, i8 0, i64 %43, i1 false) %47 = call noundef ptr @_ZN4llvm3MD54bodyENS_8ArrayRefIhEE(ptr noundef nonnull align 4 dereferenceable(152) %3, ptr nonnull %40, i64 64) br label %_ZN4llvm3MD55finalERNS0_9MD5ResultE.exit @@ -1264,10 +1265,10 @@ _ZN4llvm3MD55finalERNS0_9MD5ResultE.exit: ; preds = %_ZN4llvm3MD56update %50 = load i32, ptr %4, align 4 %51 = shl i32 %50, 3 store i32 %51, ptr %4, align 4 - %52 = getelementptr inbounds i8, ptr %3, i64 80 + %52 = getelementptr inbounds nuw i8, ptr %3, i64 80 call void @llvm.assume(i1 true) [ "align"(ptr %52, i64 1) ] store i32 %51, ptr %52, align 8 - %53 = getelementptr inbounds i8, ptr %3, i64 84 + %53 = getelementptr inbounds nuw i8, ptr %3, i64 84 %54 = load i32, ptr %10, align 8 call void @llvm.assume(i1 true) [ "align"(ptr %53, i64 1) ] store i32 %54, ptr %53, align 4 diff --git a/bench/log-rs/optimized/315q9zx0681m0yr5.ll b/bench/log-rs/optimized/315q9zx0681m0yr5.ll index 6c7aa0fe81f..dee6482ad44 100644 --- a/bench/log-rs/optimized/315q9zx0681m0yr5.ll +++ b/bench/log-rs/optimized/315q9zx0681m0yr5.ll @@ -72,13 +72,13 @@ define hidden noundef i64 @_ZN4core4sync6atomic11atomic_load17h317b95d2c790a928E 8: ; preds = %2 call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) store ptr @anon.282e2e7c46ac4708fb019700c78d9e7f.6, ptr %4, align 8 - %9 = getelementptr inbounds i8, ptr %4, i64 8 + %9 = getelementptr inbounds nuw i8, ptr %4, i64 8 store i64 1, ptr %9, align 8 - %10 = getelementptr inbounds i8, ptr %4, i64 32 + %10 = getelementptr inbounds nuw i8, ptr %4, i64 32 store ptr null, ptr %10, align 8 - %11 = getelementptr inbounds i8, ptr %4, i64 16 + %11 = getelementptr inbounds nuw i8, ptr %4, i64 16 store ptr @anon.282e2e7c46ac4708fb019700c78d9e7f.0, ptr %11, align 8 - %12 = getelementptr inbounds i8, ptr %4, i64 24 + %12 = getelementptr inbounds nuw i8, ptr %4, i64 24 store i64 0, ptr %12, align 8 call void @_ZN4core9panicking9panic_fmt17h784f20a50eaab275E(ptr noalias nocapture noundef nonnull align 8 dereferenceable(48) %4, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.282e2e7c46ac4708fb019700c78d9e7f.8) #10 unreachable @@ -90,13 +90,13 @@ define hidden noundef i64 @_ZN4core4sync6atomic11atomic_load17h317b95d2c790a928E 15: ; preds = %2 call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) store ptr @anon.282e2e7c46ac4708fb019700c78d9e7f.10, ptr %3, align 8 - %16 = getelementptr inbounds i8, ptr %3, i64 8 + %16 = getelementptr inbounds nuw i8, ptr %3, i64 8 store i64 1, ptr %16, align 8 - %17 = getelementptr inbounds i8, ptr %3, i64 32 + %17 = getelementptr inbounds nuw i8, ptr %3, i64 32 store ptr null, ptr %17, align 8 - %18 = getelementptr inbounds i8, ptr %3, i64 16 + %18 = getelementptr inbounds nuw i8, ptr %3, i64 16 store ptr @anon.282e2e7c46ac4708fb019700c78d9e7f.0, ptr %18, align 8 - %19 = getelementptr inbounds i8, ptr %3, i64 24 + %19 = getelementptr inbounds nuw i8, ptr %3, i64 24 store i64 0, ptr %19, align 8 call void @_ZN4core9panicking9panic_fmt17h784f20a50eaab275E(ptr noalias nocapture noundef nonnull align 8 dereferenceable(48) %3, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.282e2e7c46ac4708fb019700c78d9e7f.11) #10 unreachable @@ -136,13 +136,13 @@ define hidden void @_ZN4core4sync6atomic12atomic_store17h265a075e39f617f6E.llvm. 9: ; preds = %3 call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) store ptr @anon.282e2e7c46ac4708fb019700c78d9e7f.13, ptr %5, align 8 - %10 = getelementptr inbounds i8, ptr %5, i64 8 + %10 = getelementptr inbounds nuw i8, ptr %5, i64 8 store i64 1, ptr %10, align 8 - %11 = getelementptr inbounds i8, ptr %5, i64 32 + %11 = getelementptr inbounds nuw i8, ptr %5, i64 32 store ptr null, ptr %11, align 8 - %12 = getelementptr inbounds i8, ptr %5, i64 16 + %12 = getelementptr inbounds nuw i8, ptr %5, i64 16 store ptr @anon.282e2e7c46ac4708fb019700c78d9e7f.0, ptr %12, align 8 - %13 = getelementptr inbounds i8, ptr %5, i64 24 + %13 = getelementptr inbounds nuw i8, ptr %5, i64 24 store i64 0, ptr %13, align 8 call void @_ZN4core9panicking9panic_fmt17h784f20a50eaab275E(ptr noalias nocapture noundef nonnull align 8 dereferenceable(48) %5, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.282e2e7c46ac4708fb019700c78d9e7f.14) #10 unreachable @@ -150,13 +150,13 @@ define hidden void @_ZN4core4sync6atomic12atomic_store17h265a075e39f617f6E.llvm. 14: ; preds = %3 call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) store ptr @anon.282e2e7c46ac4708fb019700c78d9e7f.16, ptr %4, align 8 - %15 = getelementptr inbounds i8, ptr %4, i64 8 + %15 = getelementptr inbounds nuw i8, ptr %4, i64 8 store i64 1, ptr %15, align 8 - %16 = getelementptr inbounds i8, ptr %4, i64 32 + %16 = getelementptr inbounds nuw i8, ptr %4, i64 32 store ptr null, ptr %16, align 8 - %17 = getelementptr inbounds i8, ptr %4, i64 16 + %17 = getelementptr inbounds nuw i8, ptr %4, i64 16 store ptr @anon.282e2e7c46ac4708fb019700c78d9e7f.0, ptr %17, align 8 - %18 = getelementptr inbounds i8, ptr %4, i64 24 + %18 = getelementptr inbounds nuw i8, ptr %4, i64 24 store i64 0, ptr %18, align 8 call void @_ZN4core9panicking9panic_fmt17h784f20a50eaab275E(ptr noalias nocapture noundef nonnull align 8 dereferenceable(48) %4, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.282e2e7c46ac4708fb019700c78d9e7f.17) #10 unreachable @@ -302,13 +302,13 @@ define hidden { i64, i64 } @_ZN4core4sync6atomic23atomic_compare_exchange17hdc15 47: ; preds = %13, %12, %11, %10, %9 call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %6) store ptr @anon.282e2e7c46ac4708fb019700c78d9e7f.19, ptr %6, align 8 - %48 = getelementptr inbounds i8, ptr %6, i64 8 + %48 = getelementptr inbounds nuw i8, ptr %6, i64 8 store i64 1, ptr %48, align 8 - %49 = getelementptr inbounds i8, ptr %6, i64 32 + %49 = getelementptr inbounds nuw i8, ptr %6, i64 32 store ptr null, ptr %49, align 8 - %50 = getelementptr inbounds i8, ptr %6, i64 16 + %50 = getelementptr inbounds nuw i8, ptr %6, i64 16 store ptr @anon.282e2e7c46ac4708fb019700c78d9e7f.0, ptr %50, align 8 - %51 = getelementptr inbounds i8, ptr %6, i64 24 + %51 = getelementptr inbounds nuw i8, ptr %6, i64 24 store i64 0, ptr %51, align 8 call void @_ZN4core9panicking9panic_fmt17h784f20a50eaab275E(ptr noalias nocapture noundef nonnull align 8 dereferenceable(48) %6, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.282e2e7c46ac4708fb019700c78d9e7f.20) #10 unreachable @@ -316,13 +316,13 @@ define hidden { i64, i64 } @_ZN4core4sync6atomic23atomic_compare_exchange17hdc15 52: ; preds = %13, %12, %11, %10, %9 call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %7) store ptr @anon.282e2e7c46ac4708fb019700c78d9e7f.22, ptr %7, align 8 - %53 = getelementptr inbounds i8, ptr %7, i64 8 + %53 = getelementptr inbounds nuw i8, ptr %7, i64 8 store i64 1, ptr %53, align 8 - %54 = getelementptr inbounds i8, ptr %7, i64 32 + %54 = getelementptr inbounds nuw i8, ptr %7, i64 32 store ptr null, ptr %54, align 8 - %55 = getelementptr inbounds i8, ptr %7, i64 16 + %55 = getelementptr inbounds nuw i8, ptr %7, i64 16 store ptr @anon.282e2e7c46ac4708fb019700c78d9e7f.0, ptr %55, align 8 - %56 = getelementptr inbounds i8, ptr %7, i64 24 + %56 = getelementptr inbounds nuw i8, ptr %7, i64 24 store i64 0, ptr %56, align 8 call void @_ZN4core9panicking9panic_fmt17h784f20a50eaab275E(ptr noalias nocapture noundef nonnull align 8 dereferenceable(48) %7, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.282e2e7c46ac4708fb019700c78d9e7f.23) #10 unreachable diff --git a/bench/meilisearch-rs/optimized/1bqqlm3jtb9rf3cv.ll b/bench/meilisearch-rs/optimized/1bqqlm3jtb9rf3cv.ll index e90ad34dac9..735a68f525a 100644 --- a/bench/meilisearch-rs/optimized/1bqqlm3jtb9rf3cv.ll +++ b/bench/meilisearch-rs/optimized/1bqqlm3jtb9rf3cv.ll @@ -38,8 +38,8 @@ define hidden void @"_ZN158_$LT$uuid..external..serde_support..$LT$impl$u20$serd br i1 %7, label %8, label %11 8: ; preds = %3 - %9 = getelementptr inbounds i8, ptr %5, i64 4 - %10 = getelementptr inbounds i8, ptr %0, i64 1 + %9 = getelementptr inbounds nuw i8, ptr %5, i64 4 + %10 = getelementptr inbounds nuw i8, ptr %0, i64 1 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(16) %10, ptr noundef nonnull align 4 dereferenceable(16) %9, i64 16, i1 false) br label %14 @@ -48,7 +48,7 @@ define hidden void @"_ZN158_$LT$uuid..external..serde_support..$LT$impl$u20$serd call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %5, i64 32, i1 false) %12 = call noundef nonnull align 8 ptr @"_ZN4uuid8external13serde_support63_$LT$impl$u20$serde..de..Deserialize$u20$for$u20$uuid..Uuid$GT$11deserialize8de_error17h3373034a61e51829E.llvm.12360588736508307020"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %4), !noalias !6 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) - %13 = getelementptr inbounds i8, ptr %0, i64 8 + %13 = getelementptr inbounds nuw i8, ptr %0, i64 8 store ptr %12, ptr %13, align 8 br label %14 @@ -70,8 +70,8 @@ define hidden void @"_ZN163_$LT$uuid..external..serde_support..$LT$impl$u20$serd br i1 %7, label %8, label %11 8: ; preds = %3 - %9 = getelementptr inbounds i8, ptr %5, i64 4 - %10 = getelementptr inbounds i8, ptr %0, i64 1 + %9 = getelementptr inbounds nuw i8, ptr %5, i64 4 + %10 = getelementptr inbounds nuw i8, ptr %0, i64 1 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(16) %10, ptr noundef nonnull align 4 dereferenceable(16) %9, i64 16, i1 false) br label %14 @@ -80,7 +80,7 @@ define hidden void @"_ZN163_$LT$uuid..external..serde_support..$LT$impl$u20$serd call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %5, i64 32, i1 false) %12 = call noundef nonnull align 8 ptr @"_ZN4uuid8external13serde_support63_$LT$impl$u20$serde..de..Deserialize$u20$for$u20$uuid..Uuid$GT$11deserialize8de_error17h3373034a61e51829E.llvm.12360588736508307020"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %4), !noalias !9 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) - %13 = getelementptr inbounds i8, ptr %0, i64 8 + %13 = getelementptr inbounds nuw i8, ptr %0, i64 8 store ptr %12, ptr %13, align 8 br label %14 @@ -184,10 +184,10 @@ define internal fastcc noundef zeroext i1 @_ZN4core5slice4sort22partial_insertio %9 = alloca [16 x i8], align 4 %10 = alloca [16 x i8], align 4 %11 = icmp ult i64 %1, 50 - %12 = getelementptr inbounds i8, ptr %7, i64 96 - %13 = getelementptr inbounds i8, ptr %0, i64 256 - %14 = getelementptr inbounds i8, ptr %0, i64 96 - %15 = getelementptr inbounds i8, ptr %0, i64 160 + %12 = getelementptr inbounds nuw i8, ptr %7, i64 96 + %13 = getelementptr inbounds nuw i8, ptr %0, i64 256 + %14 = getelementptr inbounds nuw i8, ptr %0, i64 96 + %15 = getelementptr inbounds nuw i8, ptr %0, i64 160 br i1 %11, label %.lr.ph.us, label %.split 16: ; preds = %.lr.ph17 @@ -329,7 +329,7 @@ define internal fastcc noundef zeroext i1 @_ZN4core5slice4sort22partial_insertio %49 = add nuw i64 %.sroa.03.05.i.i, 1 %50 = getelementptr inbounds { { { i64, ptr, {} }, i64 }, { { i64, ptr, {} }, i64 }, { i64, [2 x i64] }, { i64, [2 x i64] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { [11 x i8], i8, [4 x i8] }, { [16 x i8] } }, ptr %0, i64 %.sroa.03.05.i.i call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4), !noalias !64 - %51 = getelementptr inbounds i8, ptr %50, i64 96 + %51 = getelementptr inbounds nuw i8, ptr %50, i64 96 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %4, ptr noundef nonnull readonly align 8 dereferenceable(16) %51, i64 16, i1 false), !alias.scope !68, !noalias !72 call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3), !noalias !64 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %3, ptr noundef nonnull readonly align 8 dereferenceable(16) %12, i64 16, i1 false), !alias.scope !73, !noalias !77 @@ -376,7 +376,7 @@ define internal fastcc void @_ZN4core5slice4sort25insertion_sort_shift_left17h41 br i1 %10, label %"_ZN115_$LT$core..ops..range..RangeInclusive$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$9index_mut17ha787b75e8470182fE.exit.lr.ph", label %._crit_edge "_ZN115_$LT$core..ops..range..RangeInclusive$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$9index_mut17ha787b75e8470182fE.exit.lr.ph": ; preds = %.preheader - %11 = getelementptr inbounds i8, ptr %8, i64 96 + %11 = getelementptr inbounds nuw i8, ptr %8, i64 96 br label %"_ZN115_$LT$core..ops..range..RangeInclusive$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$9index_mut17ha787b75e8470182fE.exit" 12: ; preds = %3 @@ -427,7 +427,7 @@ define internal fastcc void @_ZN4core5slice4sort25insertion_sort_shift_left17h41 call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5), !noalias !105 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %5, ptr noundef nonnull readonly align 8 dereferenceable(16) %11, i64 16, i1 false), !alias.scope !109, !noalias !113 call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4), !noalias !105 - %25 = getelementptr inbounds i8, ptr %24, i64 96 + %25 = getelementptr inbounds nuw i8, ptr %24, i64 96 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %4, ptr noundef nonnull readonly align 8 dereferenceable(16) %25, i64 16, i1 false), !alias.scope !114, !noalias !118 %26 = invoke noundef i8 @"_ZN80_$LT$time..offset_date_time..OffsetDateTime$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17h793b689048cd26d1E"(ptr noalias noundef nonnull readonly align 4 dereferenceable(16) %4, ptr noalias noundef nonnull readonly align 4 dereferenceable(16) %5) to label %27 unwind label %30, !noalias !83 @@ -495,7 +495,7 @@ define hidden void @_ZN4core5slice4sort7recurse17h86a04bfa1b35a3e1E.llvm.1236058 br i1 %41, label %.outer._crit_edge, label %.lr.ph.lr.ph .lr.ph.lr.ph: ; preds = %5 - %42 = getelementptr inbounds i8, ptr %12, i64 96 + %42 = getelementptr inbounds nuw i8, ptr %12, i64 96 br label %.lr.ph .lr.ph: ; preds = %.lr.ph.lr.ph, %.outer @@ -507,7 +507,7 @@ define hidden void @_ZN4core5slice4sort7recurse17h86a04bfa1b35a3e1E.llvm.1236058 %.sroa.030.0.ph86 = phi i1 [ true, %.lr.ph.lr.ph ], [ %165, %.outer ] %43 = select i1 %.sroa.028.0.ph87, i1 %.sroa.030.0.ph86, i1 false %44 = icmp eq ptr %.sroa.021.0.ph89, null - %45 = getelementptr inbounds i8, ptr %.sroa.021.0.ph89, i64 96 + %45 = getelementptr inbounds nuw i8, ptr %.sroa.021.0.ph89, i64 96 br label %46 46: ; preds = %.lr.ph, %"_ZN110_$LT$core..ops..range..RangeFrom$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$9index_mut17h454e5910cbfdbcedE.exit" @@ -607,7 +607,7 @@ define hidden void @_ZN4core5slice4sort7recurse17h86a04bfa1b35a3e1E.llvm.1236058 %79 = icmp ult i64 %77, %.sroa.14.081 call void @llvm.assume(i1 %79) call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %32), !noalias !185 - %80 = getelementptr inbounds { { { i64, ptr, {} }, i64 }, { { i64, ptr, {} }, i64 }, { i64, [2 x i64] }, { i64, [2 x i64] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { [11 x i8], i8, [4 x i8] }, { [16 x i8] } }, ptr %.sroa.0.082, i64 %54, i32 4 + %80 = getelementptr inbounds nuw { { { i64, ptr, {} }, i64 }, { { i64, ptr, {} }, i64 }, { i64, [2 x i64] }, { i64, [2 x i64] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { [11 x i8], i8, [4 x i8] }, { [16 x i8] } }, ptr %.sroa.0.082, i64 %54, i32 4 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %32, ptr noundef nonnull readonly align 8 dereferenceable(16) %80, i64 16, i1 false), !alias.scope !197, !noalias !201 call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %31), !noalias !185 %81 = getelementptr inbounds { { { i64, ptr, {} }, i64 }, { { i64, ptr, {} }, i64 }, { i64, [2 x i64] }, { i64, [2 x i64] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { [11 x i8], i8, [4 x i8] }, { [16 x i8] } }, ptr %.sroa.0.082, i64 %77, i32 4 @@ -622,7 +622,7 @@ define hidden void @_ZN4core5slice4sort7recurse17h86a04bfa1b35a3e1E.llvm.1236058 %85 = icmp ult i64 %78, %.sroa.14.081 call void @llvm.assume(i1 %85) call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %30), !noalias !207 - %86 = getelementptr inbounds { { { i64, ptr, {} }, i64 }, { { i64, ptr, {} }, i64 }, { i64, [2 x i64] }, { i64, [2 x i64] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { [11 x i8], i8, [4 x i8] }, { [16 x i8] } }, ptr %.sroa.0.082, i64 %78, i32 4 + %86 = getelementptr inbounds nuw { { { i64, ptr, {} }, i64 }, { { i64, ptr, {} }, i64 }, { i64, [2 x i64] }, { i64, [2 x i64] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { [11 x i8], i8, [4 x i8] }, { [16 x i8] } }, ptr %.sroa.0.082, i64 %78, i32 4 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %30, ptr noundef nonnull readonly align 8 dereferenceable(16) %86, i64 16, i1 false), !alias.scope !215, !noalias !219 call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %29), !noalias !207 %87 = getelementptr inbounds { { { i64, ptr, {} }, i64 }, { { i64, ptr, {} }, i64 }, { i64, [2 x i64] }, { i64, [2 x i64] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { [11 x i8], i8, [4 x i8] }, { [16 x i8] } }, ptr %.sroa.0.082, i64 %.sroa.0.1.i, i32 4 @@ -654,7 +654,7 @@ define hidden void @_ZN4core5slice4sort7recurse17h86a04bfa1b35a3e1E.llvm.1236058 %99 = icmp ult i64 %96, %.sroa.14.081 call void @llvm.assume(i1 %99) call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %26), !noalias !243 - %100 = getelementptr inbounds { { { i64, ptr, {} }, i64 }, { { i64, ptr, {} }, i64 }, { i64, [2 x i64] }, { i64, [2 x i64] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { [11 x i8], i8, [4 x i8] }, { [16 x i8] } }, ptr %.sroa.0.082, i64 %55, i32 4 + %100 = getelementptr inbounds nuw { { { i64, ptr, {} }, i64 }, { { i64, ptr, {} }, i64 }, { i64, [2 x i64] }, { i64, [2 x i64] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { [11 x i8], i8, [4 x i8] }, { [16 x i8] } }, ptr %.sroa.0.082, i64 %55, i32 4 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %26, ptr noundef nonnull readonly align 8 dereferenceable(16) %100, i64 16, i1 false), !alias.scope !255, !noalias !259 call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %25), !noalias !243 %101 = getelementptr inbounds { { { i64, ptr, {} }, i64 }, { { i64, ptr, {} }, i64 }, { i64, [2 x i64] }, { i64, [2 x i64] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { [11 x i8], i8, [4 x i8] }, { [16 x i8] } }, ptr %.sroa.0.082, i64 %96, i32 4 @@ -670,7 +670,7 @@ define hidden void @_ZN4core5slice4sort7recurse17h86a04bfa1b35a3e1E.llvm.1236058 %106 = icmp ult i64 %97, %.sroa.14.081 call void @llvm.assume(i1 %106) call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %24), !noalias !265 - %107 = getelementptr inbounds { { { i64, ptr, {} }, i64 }, { { i64, ptr, {} }, i64 }, { i64, [2 x i64] }, { i64, [2 x i64] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { [11 x i8], i8, [4 x i8] }, { [16 x i8] } }, ptr %.sroa.0.082, i64 %97, i32 4 + %107 = getelementptr inbounds nuw { { { i64, ptr, {} }, i64 }, { { i64, ptr, {} }, i64 }, { i64, [2 x i64] }, { i64, [2 x i64] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { [11 x i8], i8, [4 x i8] }, { [16 x i8] } }, ptr %.sroa.0.082, i64 %97, i32 4 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %24, ptr noundef nonnull readonly align 8 dereferenceable(16) %107, i64 16, i1 false), !alias.scope !273, !noalias !277 call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %23), !noalias !265 %108 = getelementptr inbounds { { { i64, ptr, {} }, i64 }, { { i64, ptr, {} }, i64 }, { i64, [2 x i64] }, { i64, [2 x i64] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { [11 x i8], i8, [4 x i8] }, { [16 x i8] } }, ptr %.sroa.0.082, i64 %.sroa.026.4.i, i32 4 @@ -758,14 +758,14 @@ define hidden void @_ZN4core5slice4sort7recurse17h86a04bfa1b35a3e1E.llvm.1236058 %.sroa.0.011.i.i.i = phi i64 [ %153, %_ZN4core10intrinsics10typed_swap17h316bf3f8f319d235E.exit.i.i.i ], [ 0, %138 ] %143 = xor i64 %.sroa.0.011.i.i.i, -1 %144 = add nsw i64 %139, %143 - %145 = getelementptr inbounds [0 x { { { i64, ptr, {} }, i64 }, { { i64, ptr, {} }, i64 }, { i64, [2 x i64] }, { i64, [2 x i64] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { [11 x i8], i8, [4 x i8] }, { [16 x i8] } }], ptr %.sroa.0.082, i64 0, i64 %.sroa.0.011.i.i.i + %145 = getelementptr inbounds nuw [0 x { { { i64, ptr, {} }, i64 }, { { i64, ptr, {} }, i64 }, { i64, [2 x i64] }, { i64, [2 x i64] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { [11 x i8], i8, [4 x i8] }, { [16 x i8] } }], ptr %.sroa.0.082, i64 0, i64 %.sroa.0.011.i.i.i %146 = getelementptr inbounds [0 x { { { i64, ptr, {} }, i64 }, { { i64, ptr, {} }, i64 }, { i64, [2 x i64] }, { i64, [2 x i64] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { [11 x i8], i8, [4 x i8] }, { [16 x i8] } }], ptr %142, i64 0, i64 %144 br label %147 147: ; preds = %147, %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$9index_mut17h0471177f342c7879E.exit10.preheader.preheader.i.i.i" %.sroa.0.05.i.i.i.i.i = phi i64 [ 0, %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$9index_mut17h0471177f342c7879E.exit10.preheader.preheader.i.i.i" ], [ %152, %147 ] - %148 = getelementptr inbounds i64, ptr %145, i64 %.sroa.0.05.i.i.i.i.i - %149 = getelementptr inbounds i64, ptr %146, i64 %.sroa.0.05.i.i.i.i.i + %148 = getelementptr inbounds nuw i64, ptr %145, i64 %.sroa.0.05.i.i.i.i.i + %149 = getelementptr inbounds nuw i64, ptr %146, i64 %.sroa.0.05.i.i.i.i.i %150 = load i64, ptr %148, align 8, !alias.scope !364, !noalias !362 %151 = load i64, ptr %149, align 8, !alias.scope !367, !noalias !359 store i64 %151, ptr %148, align 8, !alias.scope !364, !noalias !362 @@ -825,7 +825,7 @@ _ZN4core5slice4sort12choose_pivot17h0913dd8363d2763cE.exit: ; preds = %"_ZN4core call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14), !noalias !368 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %14, ptr noundef nonnull readonly align 8 dereferenceable(16) %45, i64 16, i1 false), !alias.scope !372, !noalias !376 call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13), !noalias !368 - %171 = getelementptr inbounds i8, ptr %170, i64 96 + %171 = getelementptr inbounds nuw i8, ptr %170, i64 96 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %13, ptr noundef nonnull readonly align 8 dereferenceable(16) %171, i64 16, i1 false), !alias.scope !377, !noalias !381 %172 = call noundef i8 @"_ZN80_$LT$time..offset_date_time..OffsetDateTime$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17h793b689048cd26d1E"(ptr noalias noundef nonnull readonly align 4 dereferenceable(16) %13, ptr noalias noundef nonnull readonly align 4 dereferenceable(16) %14), !range !32, !noalias !368 %173 = icmp eq i8 %172, -1 @@ -844,7 +844,7 @@ _ZN4core5slice4sort12choose_pivot17h0913dd8363d2763cE.exit: ; preds = %"_ZN4core call void @llvm.memmove.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(160) %.sroa.0.082, ptr noundef nonnull align 8 dereferenceable(160) %170, i64 160, i1 false), !alias.scope !388, !noalias !385 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(160) %170, ptr noundef nonnull align 8 dereferenceable(160) %11, i64 160, i1 false), !noalias !385 call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %11) - %176 = getelementptr inbounds i8, ptr %.sroa.0.082, i64 160 + %176 = getelementptr inbounds nuw i8, ptr %.sroa.0.082, i64 160 %177 = add i64 %.sroa.14.081, -1 call void @llvm.lifetime.start.p0(i64 160, ptr nonnull %12) call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(160) %12, ptr noundef nonnull align 8 dereferenceable(160) %.sroa.0.082, i64 160, i1 false) @@ -896,7 +896,7 @@ _ZN4core5slice4sort12choose_pivot17h0913dd8363d2763cE.exit: ; preds = %"_ZN4core call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8), !noalias !404 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %8, ptr noundef nonnull readonly align 8 dereferenceable(16) %42, i64 16, i1 false), !alias.scope !408, !noalias !412 call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7), !noalias !404 - %191 = getelementptr inbounds i8, ptr %190, i64 96 + %191 = getelementptr inbounds nuw i8, ptr %190, i64 96 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %7, ptr noundef nonnull readonly align 8 dereferenceable(16) %191, i64 16, i1 false), !alias.scope !413, !noalias !417 %192 = invoke noundef i8 @"_ZN80_$LT$time..offset_date_time..OffsetDateTime$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17h793b689048cd26d1E"(ptr noalias noundef nonnull readonly align 4 dereferenceable(16) %7, ptr noalias noundef nonnull readonly align 4 dereferenceable(16) %8) to label %193 unwind label %.loopexit.i, !noalias !382 @@ -952,13 +952,13 @@ _ZN4core5slice4sort15partition_equal17hc310f3400e8f1c96E.exit: ; preds = %186 205: ; preds = %162 call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %40) store ptr @anon.bed9f170711aa8c005b93c2e80cfe6b4.13, ptr %40, align 8 - %206 = getelementptr inbounds i8, ptr %40, i64 8 + %206 = getelementptr inbounds nuw i8, ptr %40, i64 8 store i64 1, ptr %206, align 8 - %207 = getelementptr inbounds i8, ptr %40, i64 32 + %207 = getelementptr inbounds nuw i8, ptr %40, i64 32 store ptr null, ptr %207, align 8 - %208 = getelementptr inbounds i8, ptr %40, i64 16 + %208 = getelementptr inbounds nuw i8, ptr %40, i64 16 store ptr inttoptr (i64 8 to ptr), ptr %208, align 8 - %209 = getelementptr inbounds i8, ptr %40, i64 24 + %209 = getelementptr inbounds nuw i8, ptr %40, i64 24 store i64 0, ptr %209, align 8 call void @_ZN4core9panicking9panic_fmt17hdc63834ffaaefae5E(ptr noalias nocapture noundef nonnull align 8 dereferenceable(48) %40, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.bed9f170711aa8c005b93c2e80cfe6b4.30) #15 unreachable @@ -971,19 +971,19 @@ _ZN4core5slice4sort15partition_equal17hc310f3400e8f1c96E.exit: ; preds = %186 212: ; preds = %210 call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %39) store ptr @anon.bed9f170711aa8c005b93c2e80cfe6b4.13, ptr %39, align 8 - %213 = getelementptr inbounds i8, ptr %39, i64 8 + %213 = getelementptr inbounds nuw i8, ptr %39, i64 8 store i64 1, ptr %213, align 8 - %214 = getelementptr inbounds i8, ptr %39, i64 32 + %214 = getelementptr inbounds nuw i8, ptr %39, i64 32 store ptr null, ptr %214, align 8 - %215 = getelementptr inbounds i8, ptr %39, i64 16 + %215 = getelementptr inbounds nuw i8, ptr %39, i64 16 store ptr inttoptr (i64 8 to ptr), ptr %215, align 8 - %216 = getelementptr inbounds i8, ptr %39, i64 24 + %216 = getelementptr inbounds nuw i8, ptr %39, i64 24 store i64 0, ptr %216, align 8 call void @_ZN4core9panicking9panic_fmt17hdc63834ffaaefae5E(ptr noalias nocapture noundef nonnull align 8 dereferenceable(48) %39, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.bed9f170711aa8c005b93c2e80cfe6b4.31) #15 unreachable 217: ; preds = %210 - %218 = getelementptr inbounds i8, ptr %211, i64 160 + %218 = getelementptr inbounds nuw i8, ptr %211, i64 160 %219 = add i64 %166, -1 %220 = icmp ult i64 %164, %219 br i1 %220, label %222, label %221 @@ -1074,10 +1074,10 @@ define internal fastcc void @_ZN4core5slice4sort8heapsort17h2bd3aa9703a929abE(pt %34 = getelementptr inbounds [0 x { { { i64, ptr, {} }, i64 }, { { i64, ptr, {} }, i64 }, { i64, [2 x i64] }, { i64, [2 x i64] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { [11 x i8], i8, [4 x i8] }, { [16 x i8] } }], ptr %0, i64 0, i64 %.sroa.0.05.i %35 = getelementptr inbounds [0 x { { { i64, ptr, {} }, i64 }, { { i64, ptr, {} }, i64 }, { i64, [2 x i64] }, { i64, [2 x i64] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { [11 x i8], i8, [4 x i8] }, { [16 x i8] } }], ptr %0, i64 0, i64 %.sroa.03.0.i call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10), !noalias !451 - %36 = getelementptr inbounds i8, ptr %34, i64 96 + %36 = getelementptr inbounds nuw i8, ptr %34, i64 96 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %10, ptr noundef nonnull readonly align 8 dereferenceable(16) %36, i64 16, i1 false), !alias.scope !458, !noalias !462 call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9), !noalias !451 - %37 = getelementptr inbounds i8, ptr %35, i64 96 + %37 = getelementptr inbounds nuw i8, ptr %35, i64 96 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %9, ptr noundef nonnull readonly align 8 dereferenceable(16) %37, i64 16, i1 false), !alias.scope !463, !noalias !467 %38 = call noundef i8 @"_ZN80_$LT$time..offset_date_time..OffsetDateTime$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17h793b689048cd26d1E"(ptr noalias noundef nonnull readonly align 4 dereferenceable(16) %9, ptr noalias noundef nonnull readonly align 4 dereferenceable(16) %10), !range !32, !noalias !451 %39 = icmp eq i8 %38, -1 @@ -1163,10 +1163,10 @@ define internal fastcc void @_ZN4core5slice4sort8heapsort17h2bd3aa9703a929abE(pt %63 = getelementptr inbounds [0 x { { { i64, ptr, {} }, i64 }, { { i64, ptr, {} }, i64 }, { i64, [2 x i64] }, { i64, [2 x i64] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { [11 x i8], i8, [4 x i8] }, { [16 x i8] } }], ptr %0, i64 0, i64 %.sroa.0.05.i27 %64 = getelementptr inbounds [0 x { { { i64, ptr, {} }, i64 }, { { i64, ptr, {} }, i64 }, { i64, [2 x i64] }, { i64, [2 x i64] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { [11 x i8], i8, [4 x i8] }, { [16 x i8] } }], ptr %0, i64 0, i64 %.sroa.03.0.i28 call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4), !noalias !498 - %65 = getelementptr inbounds i8, ptr %63, i64 96 + %65 = getelementptr inbounds nuw i8, ptr %63, i64 96 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %4, ptr noundef nonnull readonly align 8 dereferenceable(16) %65, i64 16, i1 false), !alias.scope !505, !noalias !509 call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3), !noalias !498 - %66 = getelementptr inbounds i8, ptr %64, i64 96 + %66 = getelementptr inbounds nuw i8, ptr %64, i64 96 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %3, ptr noundef nonnull readonly align 8 dereferenceable(16) %66, i64 16, i1 false), !alias.scope !510, !noalias !514 %67 = call noundef i8 @"_ZN80_$LT$time..offset_date_time..OffsetDateTime$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17h793b689048cd26d1E"(ptr noalias noundef nonnull readonly align 4 dereferenceable(16) %3, ptr noalias noundef nonnull readonly align 4 dereferenceable(16) %4), !range !32, !noalias !498 %68 = icmp eq i8 %67, -1 @@ -1234,11 +1234,11 @@ define internal fastcc { i64, i1 } @_ZN4core5slice4sort9partition17h7e00584d6344 tail call void @llvm.memmove.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(160) %0, ptr noundef nonnull align 8 dereferenceable(160) %22, i64 160, i1 false), !alias.scope !520, !noalias !523 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(160) %22, ptr noundef nonnull align 8 dereferenceable(160) %18, i64 160, i1 false), !noalias !523 call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %18) - %23 = getelementptr inbounds i8, ptr %0, i64 160 + %23 = getelementptr inbounds nuw i8, ptr %0, i64 160 %24 = add i64 %1, -1 call void @llvm.lifetime.start.p0(i64 160, ptr nonnull %19) call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(160) %19, ptr noundef nonnull align 8 dereferenceable(160) %0, i64 160, i1 false) - %25 = getelementptr inbounds i8, ptr %0, i64 96 + %25 = getelementptr inbounds nuw i8, ptr %0, i64 96 br label %26 26: ; preds = %.lr.ph, %33 @@ -1253,8 +1253,8 @@ define internal fastcc { i64, i1 } @_ZN4core5slice4sort9partition17h7e00584d6344 ._crit_edge: ; preds = %33, %31 %.sroa.01.0.lcssa.ph = phi i64 [ %24, %33 ], [ %.sroa.01.022, %31 ] - %29 = getelementptr inbounds i8, ptr %19, i64 96 - %30 = getelementptr inbounds i8, ptr %0, i64 96 + %29 = getelementptr inbounds nuw i8, ptr %19, i64 96 + %30 = getelementptr inbounds nuw i8, ptr %0, i64 96 br label %35 31: ; preds = %26 @@ -1370,7 +1370,7 @@ define internal fastcc { i64, i1 } @_ZN4core5slice4sort9partition17h7e00584d6344 %66 = trunc i64 %.sroa.092.05.i to i8 store i8 %66, ptr %.sroa.032.27.i, align 1, !noalias !546 call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10), !noalias !548 - %67 = getelementptr inbounds i8, ptr %.sroa.089.06.i, i64 96 + %67 = getelementptr inbounds nuw i8, ptr %.sroa.089.06.i, i64 96 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %10, ptr noundef nonnull readonly align 8 dereferenceable(16) %67, i64 16, i1 false), !alias.scope !552, !noalias !556 call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9), !noalias !548 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %9, ptr noundef nonnull readonly align 8 dereferenceable(16) %29, i64 16, i1 false), !alias.scope !557, !noalias !561 @@ -1497,7 +1497,7 @@ define internal fastcc { i64, i1 } @_ZN4core5slice4sort9partition17h7e00584d6344 %117 = getelementptr inbounds i8, ptr %.sroa.032.322.i, i64 -1 %118 = load i8, ptr %117, align 1, !noalias !546, !noundef !5 %119 = zext i8 %118 to i64 - %120 = getelementptr inbounds { { { i64, ptr, {} }, i64 }, { { i64, ptr, {} }, i64 }, { i64, [2 x i64] }, { i64, [2 x i64] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { [11 x i8], i8, [4 x i8] }, { [16 x i8] } }, ptr %spec.select.i, i64 %119 + %120 = getelementptr inbounds nuw { { { i64, ptr, {} }, i64 }, { { i64, ptr, {} }, i64 }, { i64, [2 x i64] }, { i64, [2 x i64] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { { i32, { i32, i8, i8, i8, i8 } }, { i8, i8, i8 }, [1 x i8] }, { [11 x i8], i8, [4 x i8] }, { [16 x i8] } }, ptr %spec.select.i, i64 %119 %121 = getelementptr inbounds i8, ptr %.sroa.044.221.i, i64 -160 call void @llvm.lifetime.start.p0(i64 160, ptr nonnull %5) call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(160) %5, ptr noundef nonnull align 8 dereferenceable(160) %120, i64 160, i1 false), !noalias !576 @@ -1610,16 +1610,16 @@ define hidden noundef nonnull align 8 ptr @"_ZN4uuid8external13serde_support63_$ call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) store ptr %0, ptr %2, align 8 - %.sroa.42.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 8 + %.sroa.42.0..sroa_idx = getelementptr inbounds nuw i8, ptr %2, i64 8 store ptr @"_ZN57_$LT$uuid..error..Error$u20$as$u20$core..fmt..Display$GT$3fmt17hb92b2f1f3a3aa69bE", ptr %.sroa.42.0..sroa_idx, align 8 store ptr @anon.bed9f170711aa8c005b93c2e80cfe6b4.51.llvm.12360588736508307020, ptr %3, align 8 - %4 = getelementptr inbounds i8, ptr %3, i64 8 + %4 = getelementptr inbounds nuw i8, ptr %3, i64 8 store i64 1, ptr %4, align 8 - %5 = getelementptr inbounds i8, ptr %3, i64 32 + %5 = getelementptr inbounds nuw i8, ptr %3, i64 32 store ptr null, ptr %5, align 8 - %6 = getelementptr inbounds i8, ptr %3, i64 16 + %6 = getelementptr inbounds nuw i8, ptr %3, i64 16 store ptr %2, ptr %6, align 8 - %7 = getelementptr inbounds i8, ptr %3, i64 24 + %7 = getelementptr inbounds nuw i8, ptr %3, i64 24 store i64 1, ptr %7, align 8 %8 = call noundef nonnull align 8 ptr @"_ZN61_$LT$serde_json..error..Error$u20$as$u20$serde..de..Error$GT$6custom17hb1ee203a797b09a4E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(48) %3) call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) @@ -1635,7 +1635,7 @@ define hidden void @_ZN5serde2de7Visitor9visit_seq17hcd53b18b1cc8f532E(ptr dead_ store i8 10, ptr %5, align 8 %6 = call noundef nonnull align 8 ptr @"_ZN61_$LT$serde_json..error..Error$u20$as$u20$serde..de..Error$GT$12invalid_type17h20c8245b62722194E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 1 %4, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.bed9f170711aa8c005b93c2e80cfe6b4.52.llvm.12360588736508307020) call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) - %7 = getelementptr inbounds i8, ptr %0, i64 8 + %7 = getelementptr inbounds nuw i8, ptr %0, i64 8 store ptr %6, ptr %7, align 8 store i8 1, ptr %0, align 8 ret void @@ -1664,15 +1664,15 @@ define hidden void @"_ZN92_$LT$block_buffer..BlockBuffer$LT$BlockSize$C$Kind$GT$ %5 = alloca [72 x i8], align 8 call void @llvm.lifetime.start.p0(i64 0, ptr nonnull %2) call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %5), !noalias !592 - %6 = getelementptr inbounds i8, ptr %5, i64 64 + %6 = getelementptr inbounds nuw i8, ptr %5, i64 64 store i64 0, ptr %6, align 8, !noalias !592 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4), !noalias !592 store ptr %6, ptr %4, align 8, !noalias !592 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3), !noalias !592 store ptr %2, ptr %3, align 8, !noalias !592 - %7 = getelementptr inbounds i8, ptr %3, i64 8 + %7 = getelementptr inbounds nuw i8, ptr %3, i64 8 store ptr %4, ptr %7, align 8, !noalias !592 - %8 = getelementptr inbounds i8, ptr %3, i64 16 + %8 = getelementptr inbounds nuw i8, ptr %3, i64 16 store i64 0, ptr %8, align 8, !noalias !592 invoke void @"_ZN94_$LT$core..slice..iter..IterMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4fold17h99752a439f8480a1E.llvm.3664009631495176724"(ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %3) to label %"_ZN110_$LT$generic_array..GenericArray$LT$T$C$N$GT$$u20$as$u20$generic_array..sequence..GenericSequence$LT$T$GT$$GT$8generate17hdf215efb17b0ac86E.exit" unwind label %9, !noalias !592 @@ -1698,7 +1698,7 @@ define hidden void @"_ZN92_$LT$block_buffer..BlockBuffer$LT$BlockSize$C$Kind$GT$ call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(64) %0, ptr noundef nonnull align 8 dereferenceable(64) %5, i64 64, i1 false) call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %5), !noalias !592 call void @llvm.lifetime.end.p0(i64 0, ptr nonnull %2) - %13 = getelementptr inbounds i8, ptr %0, i64 64 + %13 = getelementptr inbounds nuw i8, ptr %0, i64 64 store i8 0, ptr %13, align 1 ret void } @@ -1706,13 +1706,13 @@ define hidden void @"_ZN92_$LT$block_buffer..BlockBuffer$LT$BlockSize$C$Kind$GT$ ; Function Attrs: nonlazybind uwtable define hidden noundef nonnull align 8 dereferenceable(56) ptr @"_ZN9hashbrown11rustc_entry33RustcVacantEntry$LT$K$C$V$C$A$GT$6insert17hf3f25074d365b81dE"(ptr noalias nocapture noundef readonly align 8 dereferenceable(40) %0, ptr noalias nocapture noundef readonly align 8 dereferenceable(56) %1) unnamed_addr #0 personality ptr @rust_eh_personality { %3 = alloca [80 x i8], align 8 - %4 = getelementptr inbounds i8, ptr %0, i64 24 + %4 = getelementptr inbounds nuw i8, ptr %0, i64 24 %5 = load ptr, ptr %4, align 8, !nonnull !5, !align !595, !noundef !5 - %6 = getelementptr inbounds i8, ptr %0, i64 32 + %6 = getelementptr inbounds nuw i8, ptr %0, i64 32 %7 = load i64, ptr %6, align 8, !noundef !5 call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %3) call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %0, i64 24, i1 false) - %8 = getelementptr inbounds i8, ptr %3, i64 24 + %8 = getelementptr inbounds nuw i8, ptr %3, i64 24 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(56) %8, ptr noundef nonnull align 8 dereferenceable(56) %1, i64 56, i1 false) %9 = invoke noundef i64 @_ZN9hashbrown3raw13RawTableInner16find_insert_slot17h2cc45d5e345b63c4E.llvm.13625133489657380139(ptr noalias noundef nonnull readonly align 8 dereferenceable(32) %5, i64 noundef %7) to label %"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14insert_no_grow17h7602a4bb6db41df6E.exit" unwind label %10, !noalias !596 @@ -1739,7 +1739,7 @@ define hidden noundef nonnull align 8 dereferenceable(56) ptr @"_ZN9hashbrown11r %18 = lshr i64 %7, 57 %19 = trunc nuw nsw i64 %18 to i8 %20 = add i64 %9, -16 - %21 = getelementptr inbounds i8, ptr %5, i64 8 + %21 = getelementptr inbounds nuw i8, ptr %5, i64 8 %22 = load i64, ptr %21, align 8, !alias.scope !599, !noalias !596, !noundef !5 %23 = and i64 %22, %20 store i8 %19, ptr %16, align 1, !noalias !596 @@ -1752,13 +1752,13 @@ define hidden noundef nonnull align 8 dereferenceable(56) ptr @"_ZN9hashbrown11r %29 = getelementptr inbounds { { { { { { i64, ptr, {} }, i64 } } } }, { { { i64, [1 x i64] }, { i32, [1 x i32] }, { i32, [1 x i32] }, i32, [1 x i32] }, ptr, ptr } }, ptr %27, i64 %28 %30 = and i8 %17, 1 %31 = zext nneg i8 %30 to i64 - %32 = getelementptr inbounds i8, ptr %5, i64 16 + %32 = getelementptr inbounds nuw i8, ptr %5, i64 16 %33 = load i64, ptr %32, align 8, !alias.scope !603, !noalias !596, !noundef !5 %34 = sub i64 %33, %31 store i64 %34, ptr %32, align 8, !alias.scope !603, !noalias !596 %35 = getelementptr inbounds i8, ptr %29, i64 -80 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %35, ptr noundef nonnull align 8 dereferenceable(80) %3, i64 80, i1 false) - %36 = getelementptr inbounds i8, ptr %5, i64 24 + %36 = getelementptr inbounds nuw i8, ptr %5, i64 24 %37 = load i64, ptr %36, align 8, !alias.scope !603, !noalias !596, !noundef !5 %38 = add i64 %37, 1 store i64 %38, ptr %36, align 8, !alias.scope !603, !noalias !596 diff --git a/bench/mio-rs/optimized/2tcmneiv71cgky1q.ll b/bench/mio-rs/optimized/2tcmneiv71cgky1q.ll index 61999f45019..79d9bae8937 100644 --- a/bench/mio-rs/optimized/2tcmneiv71cgky1q.ll +++ b/bench/mio-rs/optimized/2tcmneiv71cgky1q.ll @@ -76,13 +76,13 @@ define noundef zeroext i1 @"_ZN60_$LT$mio..interest..Interest$u20$as$u20$core..f 10: ; preds = %2 call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %7) store ptr @anon.6b4dc23c7395d1f1cc15e09a0889240a.1, ptr %7, align 8 - %11 = getelementptr inbounds i8, ptr %7, i64 8 + %11 = getelementptr inbounds nuw i8, ptr %7, i64 8 store i64 1, ptr %11, align 8 - %12 = getelementptr inbounds i8, ptr %7, i64 32 + %12 = getelementptr inbounds nuw i8, ptr %7, i64 32 store ptr null, ptr %12, align 8 - %13 = getelementptr inbounds i8, ptr %7, i64 16 + %13 = getelementptr inbounds nuw i8, ptr %7, i64 16 store ptr @anon.6b4dc23c7395d1f1cc15e09a0889240a.2, ptr %13, align 8 - %14 = getelementptr inbounds i8, ptr %7, i64 24 + %14 = getelementptr inbounds nuw i8, ptr %7, i64 24 store i64 0, ptr %14, align 8 %15 = call noundef zeroext i1 @_ZN4core3fmt9Formatter9write_fmt17heacf5dba8c40948fE(ptr noalias noundef nonnull align 8 dereferenceable(64) %1, ptr noalias nocapture noundef nonnull align 8 dereferenceable(48) %7) call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %7) @@ -107,13 +107,13 @@ define noundef zeroext i1 @"_ZN60_$LT$mio..interest..Interest$u20$as$u20$core..f 22: ; preds = %28, %18 call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) store ptr @anon.6b4dc23c7395d1f1cc15e09a0889240a.6, ptr %5, align 8 - %23 = getelementptr inbounds i8, ptr %5, i64 8 + %23 = getelementptr inbounds nuw i8, ptr %5, i64 8 store i64 1, ptr %23, align 8 - %24 = getelementptr inbounds i8, ptr %5, i64 32 + %24 = getelementptr inbounds nuw i8, ptr %5, i64 32 store ptr null, ptr %24, align 8 - %25 = getelementptr inbounds i8, ptr %5, i64 16 + %25 = getelementptr inbounds nuw i8, ptr %5, i64 16 store ptr @anon.6b4dc23c7395d1f1cc15e09a0889240a.2, ptr %25, align 8 - %26 = getelementptr inbounds i8, ptr %5, i64 24 + %26 = getelementptr inbounds nuw i8, ptr %5, i64 24 store i64 0, ptr %26, align 8 %27 = call noundef zeroext i1 @_ZN4core3fmt9Formatter9write_fmt17heacf5dba8c40948fE(ptr noalias noundef nonnull align 8 dereferenceable(64) %1, ptr noalias nocapture noundef nonnull align 8 dereferenceable(48) %5) call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) @@ -122,13 +122,13 @@ define noundef zeroext i1 @"_ZN60_$LT$mio..interest..Interest$u20$as$u20$core..f 28: ; preds = %18 call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %6) store ptr @anon.6b4dc23c7395d1f1cc15e09a0889240a.4, ptr %6, align 8 - %29 = getelementptr inbounds i8, ptr %6, i64 8 + %29 = getelementptr inbounds nuw i8, ptr %6, i64 8 store i64 1, ptr %29, align 8 - %30 = getelementptr inbounds i8, ptr %6, i64 32 + %30 = getelementptr inbounds nuw i8, ptr %6, i64 32 store ptr null, ptr %30, align 8 - %31 = getelementptr inbounds i8, ptr %6, i64 16 + %31 = getelementptr inbounds nuw i8, ptr %6, i64 16 store ptr @anon.6b4dc23c7395d1f1cc15e09a0889240a.2, ptr %31, align 8 - %32 = getelementptr inbounds i8, ptr %6, i64 24 + %32 = getelementptr inbounds nuw i8, ptr %6, i64 24 store i64 0, ptr %32, align 8 %33 = call noundef zeroext i1 @_ZN4core3fmt9Formatter9write_fmt17heacf5dba8c40948fE(ptr noalias noundef nonnull align 8 dereferenceable(64) %1, ptr noalias nocapture noundef nonnull align 8 dereferenceable(48) %6) call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) @@ -141,13 +141,13 @@ define noundef zeroext i1 @"_ZN60_$LT$mio..interest..Interest$u20$as$u20$core..f 36: ; preds = %42, %34 call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) store ptr @anon.6b4dc23c7395d1f1cc15e09a0889240a.8, ptr %3, align 8 - %37 = getelementptr inbounds i8, ptr %3, i64 8 + %37 = getelementptr inbounds nuw i8, ptr %3, i64 8 store i64 1, ptr %37, align 8 - %38 = getelementptr inbounds i8, ptr %3, i64 32 + %38 = getelementptr inbounds nuw i8, ptr %3, i64 32 store ptr null, ptr %38, align 8 - %39 = getelementptr inbounds i8, ptr %3, i64 16 + %39 = getelementptr inbounds nuw i8, ptr %3, i64 16 store ptr @anon.6b4dc23c7395d1f1cc15e09a0889240a.2, ptr %39, align 8 - %40 = getelementptr inbounds i8, ptr %3, i64 24 + %40 = getelementptr inbounds nuw i8, ptr %3, i64 24 store i64 0, ptr %40, align 8 %41 = call noundef zeroext i1 @_ZN4core3fmt9Formatter9write_fmt17heacf5dba8c40948fE(ptr noalias noundef nonnull align 8 dereferenceable(64) %1, ptr noalias nocapture noundef nonnull align 8 dereferenceable(48) %3) call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) @@ -156,13 +156,13 @@ define noundef zeroext i1 @"_ZN60_$LT$mio..interest..Interest$u20$as$u20$core..f 42: ; preds = %34 call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) store ptr @anon.6b4dc23c7395d1f1cc15e09a0889240a.4, ptr %4, align 8 - %43 = getelementptr inbounds i8, ptr %4, i64 8 + %43 = getelementptr inbounds nuw i8, ptr %4, i64 8 store i64 1, ptr %43, align 8 - %44 = getelementptr inbounds i8, ptr %4, i64 32 + %44 = getelementptr inbounds nuw i8, ptr %4, i64 32 store ptr null, ptr %44, align 8 - %45 = getelementptr inbounds i8, ptr %4, i64 16 + %45 = getelementptr inbounds nuw i8, ptr %4, i64 16 store ptr @anon.6b4dc23c7395d1f1cc15e09a0889240a.2, ptr %45, align 8 - %46 = getelementptr inbounds i8, ptr %4, i64 24 + %46 = getelementptr inbounds nuw i8, ptr %4, i64 24 store i64 0, ptr %46, align 8 %47 = call noundef zeroext i1 @_ZN4core3fmt9Formatter9write_fmt17heacf5dba8c40948fE(ptr noalias noundef nonnull align 8 dereferenceable(64) %1, ptr noalias nocapture noundef nonnull align 8 dereferenceable(48) %4) call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) diff --git a/bench/mold/optimized/demangle.cc.ll b/bench/mold/optimized/demangle.cc.ll index 6b25f066025..21da18aa278 100644 --- a/bench/mold/optimized/demangle.cc.ll +++ b/bench/mold/optimized/demangle.cc.ll @@ -76,12 +76,12 @@ declare i32 @__cxa_guard_acquire(ptr) local_unnamed_addr #2 define linkonce_odr dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %this) unnamed_addr #4 comdat align 2 { entry: %0 = load ptr, ptr %this, align 8 - %1 = getelementptr inbounds i8, ptr %this, i64 16 + %1 = getelementptr inbounds nuw i8, ptr %this, i64 16 %cmp.i.i = icmp eq ptr %0, %1 br i1 %cmp.i.i, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i, label %if.then.i _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i: ; preds = %entry - %_M_string_length.i.i = getelementptr inbounds i8, ptr %this, i64 8 + %_M_string_length.i.i = getelementptr inbounds nuw i8, ptr %this, i64 8 %2 = load i64, ptr %_M_string_length.i.i, align 8 %cmp3.i.i = icmp ult i64 %2, 16 tail call void @llvm.assume(i1 %cmp3.i.i) @@ -143,7 +143,7 @@ entry: %ref.tmp = alloca %"class.std::__cxx11::basic_string", align 8 %ref.tmp1 = alloca %"class.std::allocator", align 1 store i64 %name.coerce0, ptr %name, align 8 - %0 = getelementptr inbounds i8, ptr %name, i64 8 + %0 = getelementptr inbounds nuw i8, ptr %name, i64 8 store ptr %name.coerce1, ptr %0, align 8 %cmp.i.not.i.i = icmp ult i64 %name.coerce0, 2 br i1 %cmp.i.not.i.i, label %return, label %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i.i.i @@ -162,12 +162,12 @@ if.then: ; preds = %_ZNSt11char_traitsI %4 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_ZZN4mold12demangle_cppESt17basic_string_viewIcSt11char_traitsIcEEE6buflen) %call3 = call ptr @__cxa_demangle(ptr noundef %1, ptr noundef %3, ptr noundef nonnull %4, ptr noundef nonnull %status) #15 %5 = load ptr, ptr %ref.tmp, align 8 - %6 = getelementptr inbounds i8, ptr %ref.tmp, i64 16 + %6 = getelementptr inbounds nuw i8, ptr %ref.tmp, i64 16 %cmp.i.i.i = icmp eq ptr %5, %6 br i1 %cmp.i.i.i, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i, label %if.then.i.i _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i: ; preds = %if.then - %_M_string_length.i.i.i = getelementptr inbounds i8, ptr %ref.tmp, i64 8 + %_M_string_length.i.i.i = getelementptr inbounds nuw i8, ptr %ref.tmp, i64 8 %7 = load i64, ptr %_M_string_length.i.i.i, align 8 %cmp3.i.i.i = icmp ult i64 %7, 16 call void @llvm.assume(i1 %cmp3.i.i.i) @@ -188,13 +188,13 @@ if.then4: ; preds = %_ZNSt7__cxx1112basi store ptr %call3, ptr %2, align 8 %call.i.i.i.i.i.i.i = call noundef i64 @strlen(ptr noundef nonnull dereferenceable(1) %call3) #15 store i64 %call.i.i.i.i.i.i.i, ptr %agg.result, align 8 - %_M_str.i.i.i.i.i.i = getelementptr inbounds i8, ptr %agg.result, i64 8 + %_M_str.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %agg.result, i64 8 store ptr %call3, ptr %_M_str.i.i.i.i.i.i, align 8 br label %return return: ; preds = %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit, %entry, %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i.i.i, %if.then4 %.sink = phi i8 [ 1, %if.then4 ], [ 0, %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i.i.i ], [ 0, %entry ], [ 0, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit ] - %_M_engaged.i.i.i.i1 = getelementptr inbounds i8, ptr %agg.result, i64 16 + %_M_engaged.i.i.i.i1 = getelementptr inbounds nuw i8, ptr %agg.result, i64 16 store i8 %.sink, ptr %_M_engaged.i.i.i.i1, align 8 ret void } @@ -208,9 +208,9 @@ declare void @_ZNSaIcEC1Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnam define linkonce_odr dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ISt17basic_string_viewIcS2_EvEERKT_RKS3_(ptr noundef nonnull align 8 dereferenceable(32) %this, ptr noundef nonnull align 8 dereferenceable(16) %__t, ptr noundef nonnull align 1 dereferenceable(1) %__a) unnamed_addr #4 comdat align 2 { entry: %agg.tmp3.sroa.0.0.copyload = load i64, ptr %__t, align 8 - %agg.tmp3.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %__t, i64 8 + %agg.tmp3.sroa.2.0..sroa_idx = getelementptr inbounds nuw i8, ptr %__t, i64 8 %agg.tmp3.sroa.2.0.copyload = load ptr, ptr %agg.tmp3.sroa.2.0..sroa_idx, align 8 - %0 = getelementptr inbounds i8, ptr %this, i64 16 + %0 = getelementptr inbounds nuw i8, ptr %this, i64 16 tail call void @_ZNSaIcEC2ERKS_(ptr noundef nonnull align 1 dereferenceable(1) %this, ptr noundef nonnull align 1 dereferenceable(1) %__a) #15 store ptr %0, ptr %this, align 8 %cmp.i.i = icmp eq ptr %agg.tmp3.sroa.2.0.copyload, null @@ -266,7 +266,7 @@ if.end.i.i.i3.i.i.i: ; preds = %if.end.i.i.i br label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ENS4_12__sv_wrapperERKS3_.exit _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ENS4_12__sv_wrapperERKS3_.exit: ; preds = %if.end.i.i.i, %if.then.i.i.i.i.i, %if.end.i.i.i3.i.i.i - %_M_string_length.i.i.i.i.i = getelementptr inbounds i8, ptr %this, i64 8 + %_M_string_length.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %this, i64 8 store i64 %agg.tmp3.sroa.0.0.copyload, ptr %_M_string_length.i.i.i.i.i, align 8 %arrayidx.i.i.i.i = getelementptr inbounds i8, ptr %1, i64 %agg.tmp3.sroa.0.0.copyload store i8 0, ptr %arrayidx.i.i.i.i, align 1 @@ -286,7 +286,7 @@ entry: %ref.tmp = alloca %"class.std::__cxx11::basic_string", align 8 %ref.tmp1 = alloca %"class.std::allocator", align 1 store i64 %name.coerce0, ptr %name, align 8 - %0 = getelementptr inbounds i8, ptr %name, i64 8 + %0 = getelementptr inbounds nuw i8, ptr %name, i64 8 store ptr %name.coerce1, ptr %0, align 8 %1 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_ZZN4mold13demangle_rustESt17basic_string_viewIcSt11char_traitsIcEEE3buf) %2 = load ptr, ptr %1, align 8 @@ -297,12 +297,12 @@ entry: %call2 = call ptr @rust_demangle(ptr noundef %3, i32 noundef 0) #15 store ptr %call2, ptr %1, align 8 %4 = load ptr, ptr %ref.tmp, align 8 - %5 = getelementptr inbounds i8, ptr %ref.tmp, i64 16 + %5 = getelementptr inbounds nuw i8, ptr %ref.tmp, i64 16 %cmp.i.i.i = icmp eq ptr %4, %5 br i1 %cmp.i.i.i, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i, label %if.then.i.i _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i: ; preds = %entry - %_M_string_length.i.i.i = getelementptr inbounds i8, ptr %ref.tmp, i64 8 + %_M_string_length.i.i.i = getelementptr inbounds nuw i8, ptr %ref.tmp, i64 8 %6 = load i64, ptr %_M_string_length.i.i.i, align 8 %cmp3.i.i.i = icmp ult i64 %6, 16 call void @llvm.assume(i1 %cmp3.i.i.i) @@ -322,13 +322,13 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit: ; preds = %_ZNKS if.then: ; preds = %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit %call.i.i.i.i.i.i.i = call noundef i64 @strlen(ptr noundef nonnull dereferenceable(1) %7) #15 store i64 %call.i.i.i.i.i.i.i, ptr %agg.result, align 8 - %_M_str.i.i.i.i.i.i = getelementptr inbounds i8, ptr %agg.result, i64 8 + %_M_str.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %agg.result, i64 8 store ptr %7, ptr %_M_str.i.i.i.i.i.i, align 8 br label %return return: ; preds = %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit, %if.then %.sink = phi i8 [ 1, %if.then ], [ 0, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit ] - %8 = getelementptr inbounds i8, ptr %agg.result, i64 16 + %8 = getelementptr inbounds nuw i8, ptr %agg.result, i64 16 store i8 %.sink, ptr %8, align 8 ret void } diff --git a/bench/nix/optimized/signer.ll b/bench/nix/optimized/signer.ll index 128cf5b4f70..c36c8b3ac97 100644 --- a/bench/nix/optimized/signer.ll +++ b/bench/nix/optimized/signer.ll @@ -73,10 +73,10 @@ declare void @__cxa_guard_release(ptr) local_unnamed_addr #1 define void @_ZN3nix11LocalSignerC2EONS_9SecretKeyE(ptr noundef nonnull align 8 dereferenceable(136) %0, ptr noundef nonnull align 8 dereferenceable(64) %1) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 { .noexc: store ptr getelementptr inbounds (i8, ptr @_ZTVN3nix11LocalSignerE, i64 16), ptr %0, align 8 - %2 = getelementptr inbounds i8, ptr %0, i64 8 + %2 = getelementptr inbounds nuw i8, ptr %0, i64 8 tail call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(32) %1) - %3 = getelementptr inbounds i8, ptr %0, i64 40 - %4 = getelementptr inbounds i8, ptr %1, i64 32 + %3 = getelementptr inbounds nuw i8, ptr %0, i64 40 + %4 = getelementptr inbounds nuw i8, ptr %1, i64 32 invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 8 dereferenceable(32) %4) to label %_ZN3nix9SecretKeyC2ERKS0_.exit unwind label %5 @@ -87,7 +87,7 @@ define void @_ZN3nix11LocalSignerC2EONS_9SecretKeyE(ptr noundef nonnull align 8 br label %.body _ZN3nix9SecretKeyC2ERKS0_.exit: ; preds = %.noexc - %7 = getelementptr inbounds i8, ptr %0, i64 72 + %7 = getelementptr inbounds nuw i8, ptr %0, i64 72 invoke void @_ZNK3nix9SecretKey11toPublicKeyEv(ptr dead_on_unwind nonnull writable sret(%"struct.nix::PublicKey") align 8 %7, ptr noundef nonnull align 8 dereferenceable(64) %1) to label %8 unwind label %9 @@ -109,14 +109,14 @@ declare void @_ZNK3nix9SecretKey11toPublicKeyEv(ptr dead_on_unwind writable sret ; Function Attrs: mustprogress nounwind uwtable define linkonce_odr void @_ZN3nix9SecretKeyD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %0) unnamed_addr #4 comdat align 2 personality ptr @__gxx_personality_v0 { - %2 = getelementptr inbounds i8, ptr %0, i64 32 + %2 = getelementptr inbounds nuw i8, ptr %0, i64 32 %3 = load ptr, ptr %2, align 8 - %4 = getelementptr inbounds i8, ptr %0, i64 48 + %4 = getelementptr inbounds nuw i8, ptr %0, i64 48 %5 = icmp eq ptr %3, %4 br i1 %5, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i.i, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i.i: ; preds = %1 - %6 = getelementptr inbounds i8, ptr %0, i64 40 + %6 = getelementptr inbounds nuw i8, ptr %0, i64 40 %7 = load i64, ptr %6, align 8 %8 = icmp ult i64 %7, 16 tail call void @llvm.assume(i1 %8) @@ -129,12 +129,12 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit.i: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i.i tail call void @_ZNSaIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #12 %9 = load ptr, ptr %0, align 8 - %10 = getelementptr inbounds i8, ptr %0, i64 16 + %10 = getelementptr inbounds nuw i8, ptr %0, i64 16 %11 = icmp eq ptr %9, %10 br i1 %11, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i2.i, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i1.i _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i2.i: ; preds = %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit.i - %12 = getelementptr inbounds i8, ptr %0, i64 8 + %12 = getelementptr inbounds nuw i8, ptr %0, i64 8 %13 = load i64, ptr %12, align 8 %14 = icmp ult i64 %13, 16 tail call void @llvm.assume(i1 %14) @@ -151,7 +151,7 @@ _ZN3nix3KeyD2Ev.exit: ; preds = %_ZNKSt7__cxx1112bas ; Function Attrs: mustprogress uwtable define void @_ZNK3nix11LocalSigner12signDetachedB5cxx11ESt17basic_string_viewIcSt11char_traitsIcEE(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(136) %1, i64 %2, ptr %3) unnamed_addr #2 align 2 { - %5 = getelementptr inbounds i8, ptr %1, i64 8 + %5 = getelementptr inbounds nuw i8, ptr %1, i64 8 tail call void @_ZNK3nix9SecretKey12signDetachedB5cxx11ESt17basic_string_viewIcSt11char_traitsIcEE(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(64) %5, i64 %2, ptr %3) ret void } @@ -163,22 +163,22 @@ declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define noundef nonnull align 8 dereferenceable(64) ptr @_ZN3nix11LocalSigner12getPublicKeyEv(ptr noundef nonnull readnone align 8 dereferenceable(136) %0) unnamed_addr #6 align 2 { - %2 = getelementptr inbounds i8, ptr %0, i64 72 + %2 = getelementptr inbounds nuw i8, ptr %0, i64 72 ret ptr %2 } ; Function Attrs: mustprogress nounwind uwtable define linkonce_odr void @_ZN3nix11LocalSignerD2Ev(ptr noundef nonnull align 8 dereferenceable(136) %0) unnamed_addr #4 comdat align 2 personality ptr @__gxx_personality_v0 { store ptr getelementptr inbounds (i8, ptr @_ZTVN3nix11LocalSignerE, i64 16), ptr %0, align 8 - %2 = getelementptr inbounds i8, ptr %0, i64 72 - %3 = getelementptr inbounds i8, ptr %0, i64 104 + %2 = getelementptr inbounds nuw i8, ptr %0, i64 72 + %3 = getelementptr inbounds nuw i8, ptr %0, i64 104 %4 = load ptr, ptr %3, align 8 - %5 = getelementptr inbounds i8, ptr %0, i64 120 + %5 = getelementptr inbounds nuw i8, ptr %0, i64 120 %6 = icmp eq ptr %4, %5 br i1 %6, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i.i.i, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i.i _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i.i.i: ; preds = %1 - %7 = getelementptr inbounds i8, ptr %0, i64 112 + %7 = getelementptr inbounds nuw i8, ptr %0, i64 112 %8 = load i64, ptr %7, align 8 %9 = icmp ult i64 %8, 16 tail call void @llvm.assume(i1 %9) @@ -191,12 +191,12 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit.i.i: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i.i, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i.i.i tail call void @_ZNSaIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #12 %10 = load ptr, ptr %2, align 8 - %11 = getelementptr inbounds i8, ptr %0, i64 88 + %11 = getelementptr inbounds nuw i8, ptr %0, i64 88 %12 = icmp eq ptr %10, %11 br i1 %12, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i2.i.i, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i1.i.i _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i2.i.i: ; preds = %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit.i.i - %13 = getelementptr inbounds i8, ptr %0, i64 80 + %13 = getelementptr inbounds nuw i8, ptr %0, i64 80 %14 = load i64, ptr %13, align 8 %15 = icmp ult i64 %14, 16 tail call void @llvm.assume(i1 %15) @@ -208,15 +208,15 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i1. _ZN3nix9PublicKeyD2Ev.exit: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i2.i.i, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i1.i.i tail call void @_ZNSaIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #12 - %16 = getelementptr inbounds i8, ptr %0, i64 8 - %17 = getelementptr inbounds i8, ptr %0, i64 40 + %16 = getelementptr inbounds nuw i8, ptr %0, i64 8 + %17 = getelementptr inbounds nuw i8, ptr %0, i64 40 %18 = load ptr, ptr %17, align 8 - %19 = getelementptr inbounds i8, ptr %0, i64 56 + %19 = getelementptr inbounds nuw i8, ptr %0, i64 56 %20 = icmp eq ptr %18, %19 br i1 %20, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i.i.i5, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i.i1 _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i.i.i5: ; preds = %_ZN3nix9PublicKeyD2Ev.exit - %21 = getelementptr inbounds i8, ptr %0, i64 48 + %21 = getelementptr inbounds nuw i8, ptr %0, i64 48 %22 = load i64, ptr %21, align 8 %23 = icmp ult i64 %22, 16 tail call void @llvm.assume(i1 %23) @@ -229,12 +229,12 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit.i.i2: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i.i1, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i.i.i5 tail call void @_ZNSaIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #12 %24 = load ptr, ptr %16, align 8 - %25 = getelementptr inbounds i8, ptr %0, i64 24 + %25 = getelementptr inbounds nuw i8, ptr %0, i64 24 %26 = icmp eq ptr %24, %25 br i1 %26, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i2.i.i4, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i1.i.i3 _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i2.i.i4: ; preds = %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit.i.i2 - %27 = getelementptr inbounds i8, ptr %0, i64 16 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 16 %28 = load i64, ptr %27, align 8 %29 = icmp ult i64 %28, 16 tail call void @llvm.assume(i1 %29) @@ -259,13 +259,13 @@ define linkonce_odr void @_ZN3nix11LocalSignerD0Ev(ptr noundef nonnull align 8 d ; Function Attrs: mustprogress uwtable define linkonce_odr void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %1) unnamed_addr #2 comdat align 2 personality ptr @__gxx_personality_v0 { %3 = alloca %"class.std::allocator", align 1 - %4 = getelementptr inbounds i8, ptr %0, i64 16 + %4 = getelementptr inbounds nuw i8, ptr %0, i64 16 call void @_ZNSaIcEC1ERKS_(ptr noundef nonnull align 1 dereferenceable(1) %3, ptr noundef nonnull align 1 dereferenceable(1) %1) #12 call void @_ZNSaIcEC2ERKS_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull align 1 dereferenceable(1) %3) #12 store ptr %4, ptr %0, align 8 call void @_ZNSaIcED1Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #12 %5 = load ptr, ptr %1, align 8 - %6 = getelementptr inbounds i8, ptr %1, i64 8 + %6 = getelementptr inbounds nuw i8, ptr %1, i64 8 %7 = load i64, ptr %6, align 8 %8 = icmp ugt i64 %7, 15 br i1 %8, label %9, label %._crit_edge.i @@ -323,7 +323,7 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm.exit.i: ; pr br label %22 22: ; preds = %21, %19, %17 - %23 = getelementptr inbounds i8, ptr %0, i64 8 + %23 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 %7, ptr %23, align 8 %24 = load ptr, ptr %0, align 8 %25 = getelementptr inbounds i8, ptr %24, i64 %7 @@ -340,12 +340,12 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm.exit.i: ; pr ; Function Attrs: mustprogress nounwind uwtable define linkonce_odr void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) unnamed_addr #4 comdat align 2 personality ptr @__gxx_personality_v0 { %2 = load ptr, ptr %0, align 8 - %3 = getelementptr inbounds i8, ptr %0, i64 16 + %3 = getelementptr inbounds nuw i8, ptr %0, i64 16 %4 = icmp eq ptr %2, %3 br i1 %4, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i: ; preds = %1 - %5 = getelementptr inbounds i8, ptr %0, i64 8 + %5 = getelementptr inbounds nuw i8, ptr %0, i64 8 %6 = load i64, ptr %5, align 8 %7 = icmp ult i64 %6, 16 tail call void @llvm.assume(i1 %7) diff --git a/bench/nix/optimized/terminal.ll b/bench/nix/optimized/terminal.ll index 4f0af5a000c..658b24c0cab 100644 --- a/bench/nix/optimized/terminal.ll +++ b/bench/nix/optimized/terminal.ll @@ -71,22 +71,22 @@ define noundef zeroext i1 @_ZN3nix10shouldANSIEv() local_unnamed_addr #0 persona 15: ; preds = %14 call void @llvm.experimental.noalias.scope.decl(metadata !4) call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %1) - %16 = getelementptr inbounds i8, ptr %3, i64 32 + %16 = getelementptr inbounds nuw i8, ptr %3, i64 32 %17 = load i8, ptr %16, align 8, !noalias !4 %18 = trunc i8 %17 to i1 br i1 %18, label %19, label %33 19: ; preds = %15 - %20 = getelementptr inbounds i8, ptr %2, i64 16 + %20 = getelementptr inbounds nuw i8, ptr %2, i64 16 call void @_ZNSaIcEC2ERKS_(ptr noundef nonnull align 1 dereferenceable(1) %2, ptr noundef nonnull align 1 dereferenceable(1) %3) #14 store ptr %20, ptr %2, align 8, !alias.scope !4 %21 = load ptr, ptr %3, align 8, !noalias !4 - %22 = getelementptr inbounds i8, ptr %3, i64 16 + %22 = getelementptr inbounds nuw i8, ptr %3, i64 16 %23 = icmp eq ptr %21, %22 br i1 %23, label %24, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i 24: ; preds = %19 - %25 = getelementptr inbounds i8, ptr %3, i64 8 + %25 = getelementptr inbounds nuw i8, ptr %3, i64 8 %26 = load i64, ptr %25, align 8, !noalias !4 %27 = icmp ult i64 %26, 16 call void @llvm.assume(i1 %27) @@ -98,14 +98,14 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i: store ptr %21, ptr %2, align 8, !alias.scope !4 %29 = load i64, ptr %22, align 8, !noalias !4 store i64 %29, ptr %20, align 8, !alias.scope !4 - %.phi.trans.insert.i = getelementptr inbounds i8, ptr %3, i64 8 + %.phi.trans.insert.i = getelementptr inbounds nuw i8, ptr %3, i64 8 %.pre.i = load i64, ptr %.phi.trans.insert.i, align 8, !noalias !4 br label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_.exit.i _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_.exit.i: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i, %24 %30 = phi i64 [ %26, %24 ], [ %.pre.i, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i ] - %31 = getelementptr inbounds i8, ptr %3, i64 8 - %32 = getelementptr inbounds i8, ptr %2, i64 8 + %31 = getelementptr inbounds nuw i8, ptr %3, i64 8 + %32 = getelementptr inbounds nuw i8, ptr %2, i64 8 store i64 %30, ptr %32, align 8, !alias.scope !4 store ptr %22, ptr %3, align 8, !noalias !4 store i64 0, ptr %31, align 8, !noalias !4 @@ -119,7 +119,7 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_.exit.i: ; preds = % 34: ; preds = %33 call void @_ZNSaIcED1Ev(ptr noundef nonnull align 1 dereferenceable(1) %1) #14 - %.phi.trans.insert = getelementptr inbounds i8, ptr %2, i64 8 + %.phi.trans.insert = getelementptr inbounds nuw i8, ptr %2, i64 8 %.pre = load i64, ptr %.phi.trans.insert, align 8 br label %37 @@ -132,7 +132,7 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_.exit.i: ; preds = % 37: ; preds = %34, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_.exit.i %38 = phi i64 [ %.pre, %34 ], [ %30, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_.exit.i ] call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %1) - %39 = getelementptr inbounds i8, ptr %2, i64 8 + %39 = getelementptr inbounds nuw i8, ptr %2, i64 8 %40 = icmp eq i64 %38, 0 br i1 %40, label %_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_.exit.thread, label %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i @@ -155,7 +155,7 @@ _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_.exi to label %44 unwind label %109 44: ; preds = %43 - %45 = getelementptr inbounds i8, ptr %6, i64 32 + %45 = getelementptr inbounds nuw i8, ptr %6, i64 32 %46 = load i8, ptr %45, align 8 %47 = trunc i8 %46 to i1 br i1 %47, label %.critedge48, label %48 @@ -170,7 +170,7 @@ _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_.exi to label %.critedge unwind label %113 .critedge: ; preds = %49 - %50 = getelementptr inbounds i8, ptr %9, i64 32 + %50 = getelementptr inbounds nuw i8, ptr %9, i64 32 %51 = load i8, ptr %50, align 8 %52 = trunc i8 %51 to i1 %53 = xor i1 %52, true @@ -179,12 +179,12 @@ _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_.exi 54: ; preds = %.critedge store i8 0, ptr %50, align 8 %55 = load ptr, ptr %9, align 8 - %56 = getelementptr inbounds i8, ptr %9, i64 16 + %56 = getelementptr inbounds nuw i8, ptr %9, i64 16 %57 = icmp eq ptr %55, %56 br i1 %57, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i.i.i.i.i.i, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i.i.i.i.i _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i.i.i.i.i.i: ; preds = %54 - %58 = getelementptr inbounds i8, ptr %9, i64 8 + %58 = getelementptr inbounds nuw i8, ptr %9, i64 8 %59 = load i64, ptr %58, align 8 %60 = icmp ult i64 %59, 16 call void @llvm.assume(i1 %60) @@ -200,12 +200,12 @@ _ZNSt22_Optional_payload_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcE _ZNSt8optionalINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev.exit: ; preds = %.critedge, %_ZNSt22_Optional_payload_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE10_M_destroyEv.exit.i.i.i.i %61 = load ptr, ptr %10, align 8 - %62 = getelementptr inbounds i8, ptr %10, i64 16 + %62 = getelementptr inbounds nuw i8, ptr %10, i64 16 %63 = icmp eq ptr %61, %62 br i1 %63, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i54 _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i: ; preds = %_ZNSt8optionalINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev.exit - %64 = getelementptr inbounds i8, ptr %10, i64 8 + %64 = getelementptr inbounds nuw i8, ptr %10, i64 8 %65 = load i64, ptr %64, align 8 %66 = icmp ult i64 %65, 16 call void @llvm.assume(i1 %66) @@ -230,12 +230,12 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit: ; preds = %_ZNKS 69: ; preds = %.critedge48 store i8 0, ptr %45, align 8 %70 = load ptr, ptr %6, align 8 - %71 = getelementptr inbounds i8, ptr %6, i64 16 + %71 = getelementptr inbounds nuw i8, ptr %6, i64 16 %72 = icmp eq ptr %70, %71 br i1 %72, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i.i.i.i.i.i57, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i.i.i.i.i55 _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i.i.i.i.i.i57: ; preds = %69 - %73 = getelementptr inbounds i8, ptr %6, i64 8 + %73 = getelementptr inbounds nuw i8, ptr %6, i64 8 %74 = load i64, ptr %73, align 8 %75 = icmp ult i64 %74, 16 call void @llvm.assume(i1 %75) @@ -251,12 +251,12 @@ _ZNSt22_Optional_payload_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcE _ZNSt8optionalINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev.exit58: ; preds = %.critedge48, %_ZNSt22_Optional_payload_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE10_M_destroyEv.exit.i.i.i.i56 %76 = load ptr, ptr %7, align 8 - %77 = getelementptr inbounds i8, ptr %7, i64 16 + %77 = getelementptr inbounds nuw i8, ptr %7, i64 16 %78 = icmp eq ptr %76, %77 br i1 %78, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i60, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i59 _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i60: ; preds = %_ZNSt8optionalINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev.exit58 - %79 = getelementptr inbounds i8, ptr %7, i64 8 + %79 = getelementptr inbounds nuw i8, ptr %7, i64 8 %80 = load i64, ptr %79, align 8 %81 = icmp ult i64 %80, 16 call void @llvm.assume(i1 %81) @@ -275,7 +275,7 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit61: ; preds = %_ZN .critedge51: ; preds = %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit61 %82 = phi ptr [ %.pre81, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit61 ], [ %41, %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i ] %.ph79 = phi i1 [ %.ph, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit61 ], [ false, %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i ] - %83 = getelementptr inbounds i8, ptr %2, i64 16 + %83 = getelementptr inbounds nuw i8, ptr %2, i64 16 %84 = icmp eq ptr %82, %83 br i1 %84, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i63, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i62 @@ -298,12 +298,12 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit64: ; preds = %_ZN 89: ; preds = %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit64 store i8 0, ptr %16, align 8 %90 = load ptr, ptr %3, align 8 - %91 = getelementptr inbounds i8, ptr %3, i64 16 + %91 = getelementptr inbounds nuw i8, ptr %3, i64 16 %92 = icmp eq ptr %90, %91 br i1 %92, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i.i.i.i.i.i67, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i.i.i.i.i65 _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i.i.i.i.i.i67: ; preds = %89 - %93 = getelementptr inbounds i8, ptr %3, i64 8 + %93 = getelementptr inbounds nuw i8, ptr %3, i64 8 %94 = load i64, ptr %93, align 8 %95 = icmp ult i64 %94, 16 call void @llvm.assume(i1 %95) @@ -319,12 +319,12 @@ _ZNSt22_Optional_payload_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcE _ZNSt8optionalINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev.exit68: ; preds = %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit64, %_ZNSt22_Optional_payload_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE10_M_destroyEv.exit.i.i.i.i66 %96 = load ptr, ptr %4, align 8 - %97 = getelementptr inbounds i8, ptr %4, i64 16 + %97 = getelementptr inbounds nuw i8, ptr %4, i64 16 %98 = icmp eq ptr %96, %97 br i1 %98, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i70, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i69 _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i70: ; preds = %_ZNSt8optionalINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev.exit68 - %99 = getelementptr inbounds i8, ptr %4, i64 8 + %99 = getelementptr inbounds nuw i8, ptr %4, i64 8 %100 = load i64, ptr %99, align 8 %101 = icmp ult i64 %100, 16 call void @llvm.assume(i1 %101) @@ -417,7 +417,7 @@ declare void @_ZNSaIcEC1Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnam ; Function Attrs: mustprogress uwtable define linkonce_odr void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %1, ptr noundef nonnull align 1 dereferenceable(1) %2) unnamed_addr #0 comdat align 2 personality ptr @__gxx_personality_v0 { - %4 = getelementptr inbounds i8, ptr %0, i64 16 + %4 = getelementptr inbounds nuw i8, ptr %0, i64 16 tail call void @_ZNSaIcEC2ERKS_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull align 1 dereferenceable(1) %2) #14 store ptr %4, ptr %0, align 8 %5 = icmp eq ptr %1, null @@ -490,7 +490,7 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm.exit.i: ; pr br label %25 25: ; preds = %24, %22, %._crit_edge.i - %26 = getelementptr inbounds i8, ptr %0, i64 8 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 %11, ptr %26, align 8 %27 = getelementptr inbounds i8, ptr %21, i64 %11 store i8 0, ptr %27, align 1 @@ -501,7 +501,7 @@ declare i32 @__gxx_personality_v0(...) ; Function Attrs: mustprogress nounwind uwtable define linkonce_odr void @_ZNSt8optionalINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %0) unnamed_addr #3 comdat align 2 personality ptr @__gxx_personality_v0 { - %2 = getelementptr inbounds i8, ptr %0, i64 32 + %2 = getelementptr inbounds nuw i8, ptr %0, i64 32 %3 = load i8, ptr %2, align 8 %4 = trunc i8 %3 to i1 br i1 %4, label %5, label %_ZNSt14_Optional_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELb0ELb0EED2Ev.exit @@ -509,12 +509,12 @@ define linkonce_odr void @_ZNSt8optionalINSt7__cxx1112basic_stringIcSt11char_tra 5: ; preds = %1 store i8 0, ptr %2, align 8 %6 = load ptr, ptr %0, align 8 - %7 = getelementptr inbounds i8, ptr %0, i64 16 + %7 = getelementptr inbounds nuw i8, ptr %0, i64 16 %8 = icmp eq ptr %6, %7 br i1 %8, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i.i.i.i.i, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i.i.i.i _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i.i.i.i.i: ; preds = %5 - %9 = getelementptr inbounds i8, ptr %0, i64 8 + %9 = getelementptr inbounds nuw i8, ptr %0, i64 8 %10 = load i64, ptr %9, align 8 %11 = icmp ult i64 %10, 16 tail call void @llvm.assume(i1 %11) @@ -535,12 +535,12 @@ _ZNSt14_Optional_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELb0ELb ; Function Attrs: mustprogress nounwind uwtable define linkonce_odr void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) unnamed_addr #3 comdat align 2 personality ptr @__gxx_personality_v0 { %2 = load ptr, ptr %0, align 8 - %3 = getelementptr inbounds i8, ptr %0, i64 16 + %3 = getelementptr inbounds nuw i8, ptr %0, i64 16 %4 = icmp eq ptr %2, %3 br i1 %4, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i: ; preds = %1 - %5 = getelementptr inbounds i8, ptr %0, i64 8 + %5 = getelementptr inbounds nuw i8, ptr %0, i64 8 %6 = load i64, ptr %5, align 8 %7 = icmp ult i64 %6, 16 tail call void @llvm.assume(i1 %7) @@ -566,23 +566,23 @@ define void @_ZN3nix17filterANSIEscapesB5cxx11ESt17basic_string_viewIcSt11char_t %9 = alloca %"class.std::__cxx11::basic_string", align 8 %10 = alloca %"class.std::__cxx11::basic_string", align 8 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) - %11 = getelementptr inbounds i8, ptr %0, i64 16 + %11 = getelementptr inbounds nuw i8, ptr %0, i64 16 call void @_ZNSaIcEC1Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #14 call void @_ZNSaIcEC2ERKS_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull align 1 dereferenceable(1) %8) #14 store ptr %11, ptr %0, align 8 call void @_ZNSaIcED1Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #14 - %12 = getelementptr inbounds i8, ptr %0, i64 8 + %12 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 0, ptr %12, align 8 %13 = load ptr, ptr %0, align 8 store i8 0, ptr %13, align 1 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) - %14 = getelementptr inbounds i8, ptr %9, i64 16 + %14 = getelementptr inbounds nuw i8, ptr %9, i64 16 call void @_ZNSaIcEC1Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #14 call void @_ZNSaIcEC2ERKS_(ptr noundef nonnull align 1 dereferenceable(1) %9, ptr noundef nonnull align 1 dereferenceable(1) %7) #14 store ptr %14, ptr %9, align 8 call void @_ZNSaIcED1Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #14 - %15 = getelementptr inbounds i8, ptr %9, i64 8 + %15 = getelementptr inbounds nuw i8, ptr %9, i64 8 store i64 0, ptr %15, align 8 %16 = load ptr, ptr %9, align 8 store i8 0, ptr %16, align 1 @@ -593,8 +593,8 @@ define void @_ZN3nix17filterANSIEscapesB5cxx11ESt17basic_string_viewIcSt11char_t .lr.ph241: ; preds = %5 %18 = getelementptr inbounds i8, ptr %2, i64 %1 - %19 = getelementptr inbounds i8, ptr %10, i64 16 - %20 = getelementptr inbounds i8, ptr %10, i64 8 + %19 = getelementptr inbounds nuw i8, ptr %10, i64 16 + %20 = getelementptr inbounds nuw i8, ptr %10, i64 8 br label %21 21: ; preds = %.lr.ph241, %.loopexit215 @@ -1517,11 +1517,11 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit183: ; preds = %_Z ; Function Attrs: mustprogress uwtable define linkonce_odr noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %0, i8 noundef signext %1) local_unnamed_addr #0 comdat align 2 personality ptr @__gxx_personality_v0 { - %3 = getelementptr inbounds i8, ptr %0, i64 8 + %3 = getelementptr inbounds nuw i8, ptr %0, i64 8 %4 = load i64, ptr %3, align 8 %5 = add i64 %4, 1 %6 = load ptr, ptr %0, align 8 - %7 = getelementptr inbounds i8, ptr %0, i64 16 + %7 = getelementptr inbounds nuw i8, ptr %0, i64 16 %8 = icmp eq ptr %6, %7 br i1 %8, label %9, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i @@ -1570,10 +1570,10 @@ define void @_ZN3nix16updateWindowSizeEv() local_unnamed_addr #0 personality ptr _ZN3nix4SyncISt4pairIttESt5mutexE4LockD2Ev.exit: ; preds = %4 %7 = load i16, ptr %1, align 2 - store i16 %7, ptr getelementptr inbounds (i8, ptr @_ZN3nixL10windowSizeE, i64 40), align 8 - %8 = getelementptr inbounds i8, ptr %1, i64 2 + store i16 %7, ptr getelementptr inbounds nuw (i8, ptr @_ZN3nixL10windowSizeE, i64 40), align 8 + %8 = getelementptr inbounds nuw i8, ptr %1, i64 2 %9 = load i16, ptr %8, align 2 - store i16 %9, ptr getelementptr inbounds (i8, ptr @_ZN3nixL10windowSizeE, i64 42), align 2 + store i16 %9, ptr getelementptr inbounds nuw (i8, ptr @_ZN3nixL10windowSizeE, i64 42), align 2 %10 = call noundef i32 @pthread_mutex_unlock(ptr noundef nonnull @_ZN3nixL10windowSizeE) #14 br label %11 @@ -1595,7 +1595,7 @@ define i32 @_ZN3nix13getWindowSizeEv() local_unnamed_addr #0 personality ptr @__ unreachable _ZN3nix4SyncISt4pairIttESt5mutexE4LockD2Ev.exit: ; preds = %0 - %.sroa.0.0.copyload = load i32, ptr getelementptr inbounds (i8, ptr @_ZN3nixL10windowSizeE, i64 40), align 8 + %.sroa.0.0.copyload = load i32, ptr getelementptr inbounds nuw (i8, ptr @_ZN3nixL10windowSizeE, i64 40), align 8 %3 = tail call noundef i32 @pthread_mutex_unlock(ptr noundef nonnull @_ZN3nixL10windowSizeE) #14 ret i32 %.sroa.0.0.copyload } @@ -1629,14 +1629,14 @@ declare void @_ZNSaIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnam ; Function Attrs: mustprogress uwtable define linkonce_odr void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_mutateEmmPKcm(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %1, i64 noundef %2, ptr noundef %3, i64 noundef %4) local_unnamed_addr #0 comdat align 2 personality ptr @__gxx_personality_v0 { - %6 = getelementptr inbounds i8, ptr %0, i64 8 + %6 = getelementptr inbounds nuw i8, ptr %0, i64 8 %7 = load i64, ptr %6, align 8 %8 = add i64 %2, %1 %9 = sub i64 %7, %8 %10 = sub i64 %4, %2 %11 = add i64 %10, %7 %12 = load ptr, ptr %0, align 8 - %13 = getelementptr inbounds i8, ptr %0, i64 16 + %13 = getelementptr inbounds nuw i8, ptr %0, i64 16 %14 = icmp eq ptr %12, %13 br i1 %14, label %15, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit diff --git a/bench/nuttx/optimized/lib_ungetwc.c.ll b/bench/nuttx/optimized/lib_ungetwc.c.ll index 4754f2cc496..1ee5f496758 100644 --- a/bench/nuttx/optimized/lib_ungetwc.c.ll +++ b/bench/nuttx/optimized/lib_ungetwc.c.ll @@ -6,38 +6,37 @@ target triple = "x86_64-pc-linux-gnu" ; Function Attrs: nounwind uwtable define noundef i32 @ungetwc_unlocked(i32 noundef %0, ptr nocapture noundef %1) local_unnamed_addr #0 { %3 = alloca [4 x i8], align 1 - %4 = getelementptr inbounds i8, ptr %1, i64 192 + %4 = getelementptr inbounds nuw i8, ptr %1, i64 192 %5 = load i16, ptr %4, align 8 %6 = and i16 %5, 1 %7 = icmp eq i16 %6, 0 - br i1 %7, label %25, label %8 + br i1 %7, label %24, label %8 8: ; preds = %2 %9 = call i32 @wctomb(ptr noundef nonnull %3, i32 noundef %0) #5 %10 = icmp slt i32 %9, 0 - br i1 %10, label %25, label %11 + br i1 %10, label %24, label %11 11: ; preds = %8 - %12 = getelementptr inbounds i8, ptr %1, i64 195 + %12 = getelementptr inbounds nuw i8, ptr %1, i64 195 %13 = load i8, ptr %12, align 1 %14 = zext i8 %13 to i32 %15 = add nuw nsw i32 %9, %14 %16 = icmp ult i32 %15, 3 - br i1 %16, label %17, label %25 + br i1 %16, label %17, label %24 17: ; preds = %11 - %18 = getelementptr inbounds i8, ptr %1, i64 196 + %18 = getelementptr inbounds nuw i8, ptr %1, i64 196 %19 = zext i8 %13 to i64 - %20 = getelementptr inbounds i8, ptr %18, i64 %19 + %20 = getelementptr inbounds nuw i8, ptr %18, i64 %19 %21 = zext nneg i32 %9 to i64 call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %20, ptr nonnull align 1 %3, i64 %21, i1 false) - %22 = load i8, ptr %12, align 1 - %23 = trunc nuw i32 %9 to i8 - %24 = add i8 %22, %23 - store i8 %24, ptr %12, align 1 - br label %25 + %22 = trunc nuw i32 %9 to i8 + %23 = add i8 %13, %22 + store i8 %23, ptr %12, align 1 + br label %24 -25: ; preds = %11, %8, %2, %17 +24: ; preds = %11, %8, %2, %17 %.0 = phi i32 [ %0, %17 ], [ -1, %2 ], [ -1, %8 ], [ -1, %11 ] ret i32 %.0 } @@ -53,12 +52,12 @@ define noundef i32 @ungetwc(i32 noundef %0, ptr noundef %1) local_unnamed_addr # %4 = icmp eq ptr %1, null %5 = icmp eq i32 %0, -1 %or.cond = or i1 %5, %4 - br i1 %or.cond, label %28, label %6 + br i1 %or.cond, label %27, label %6 6: ; preds = %2 tail call void @flockfile(ptr noundef nonnull %1) call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) - %7 = getelementptr inbounds i8, ptr %1, i64 192 + %7 = getelementptr inbounds nuw i8, ptr %1, i64 192 %8 = load i16, ptr %7, align 8 %9 = and i16 %8, 1 %10 = icmp eq i16 %9, 0 @@ -70,7 +69,7 @@ define noundef i32 @ungetwc(i32 noundef %0, ptr noundef %1) local_unnamed_addr # br i1 %13, label %ungetwc_unlocked.exit, label %14 14: ; preds = %11 - %15 = getelementptr inbounds i8, ptr %1, i64 195 + %15 = getelementptr inbounds nuw i8, ptr %1, i64 195 %16 = load i8, ptr %15, align 1 %17 = zext i8 %16 to i32 %18 = add nuw nsw i32 %12, %17 @@ -78,24 +77,23 @@ define noundef i32 @ungetwc(i32 noundef %0, ptr noundef %1) local_unnamed_addr # br i1 %19, label %20, label %ungetwc_unlocked.exit 20: ; preds = %14 - %21 = getelementptr inbounds i8, ptr %1, i64 196 + %21 = getelementptr inbounds nuw i8, ptr %1, i64 196 %22 = zext i8 %16 to i64 - %23 = getelementptr inbounds i8, ptr %21, i64 %22 + %23 = getelementptr inbounds nuw i8, ptr %21, i64 %22 %24 = zext nneg i32 %12 to i64 call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %23, ptr nonnull align 1 %3, i64 %24, i1 false) - %25 = load i8, ptr %15, align 1 - %26 = trunc nuw i32 %12 to i8 - %27 = add i8 %25, %26 - store i8 %27, ptr %15, align 1 + %25 = trunc nuw i32 %12 to i8 + %26 = add i8 %16, %25 + store i8 %26, ptr %15, align 1 br label %ungetwc_unlocked.exit ungetwc_unlocked.exit: ; preds = %6, %11, %14, %20 %.0.i = phi i32 [ %0, %20 ], [ -1, %6 ], [ -1, %11 ], [ -1, %14 ] call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) call void @funlockfile(ptr noundef nonnull %1) - br label %28 + br label %27 -28: ; preds = %2, %ungetwc_unlocked.exit +27: ; preds = %2, %ungetwc_unlocked.exit %.0 = phi i32 [ %.0.i, %ungetwc_unlocked.exit ], [ -1, %2 ] ret i32 %.0 } diff --git a/bench/openjdk/optimized/cmsmd5.ll b/bench/openjdk/optimized/cmsmd5.ll index 3545dc74334..4cc76300cc4 100644 --- a/bench/openjdk/optimized/cmsmd5.ll +++ b/bench/openjdk/optimized/cmsmd5.ll @@ -14,18 +14,18 @@ define hidden ptr @cmsMD5alloc(ptr noundef %0) local_unnamed_addr #0 { br i1 %3, label %11, label %4 4: ; preds = %1 - %5 = getelementptr inbounds i8, ptr %2, i64 88 + %5 = getelementptr inbounds nuw i8, ptr %2, i64 88 store ptr %0, ptr %5, align 8 store i32 1732584193, ptr %2, align 8 - %6 = getelementptr inbounds i8, ptr %2, i64 4 + %6 = getelementptr inbounds nuw i8, ptr %2, i64 4 store i32 -271733879, ptr %6, align 4 - %7 = getelementptr inbounds i8, ptr %2, i64 8 + %7 = getelementptr inbounds nuw i8, ptr %2, i64 8 store i32 -1732584194, ptr %7, align 8 - %8 = getelementptr inbounds i8, ptr %2, i64 12 + %8 = getelementptr inbounds nuw i8, ptr %2, i64 12 store i32 271733878, ptr %8, align 4 - %9 = getelementptr inbounds i8, ptr %2, i64 16 + %9 = getelementptr inbounds nuw i8, ptr %2, i64 16 store i32 0, ptr %9, align 8 - %10 = getelementptr inbounds i8, ptr %2, i64 20 + %10 = getelementptr inbounds nuw i8, ptr %2, i64 20 store i32 0, ptr %10, align 4 br label %11 @@ -38,18 +38,18 @@ declare ptr @_cmsMallocZero(ptr noundef, i32 noundef) local_unnamed_addr #1 ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable define hidden void @cmsMD5add(ptr nocapture noundef %0, ptr nocapture noundef readonly %1, i32 noundef %2) local_unnamed_addr #2 { ._crit_edge47: - %3 = getelementptr inbounds i8, ptr %0, i64 16 + %3 = getelementptr inbounds nuw i8, ptr %0, i64 16 %4 = load i32, ptr %3, align 8 %5 = shl i32 %2, 3 %6 = add i32 %4, %5 store i32 %6, ptr %3, align 8 %7 = icmp ult i32 %6, %4 - %8 = getelementptr inbounds i8, ptr %0, i64 20 + %8 = getelementptr inbounds nuw i8, ptr %0, i64 20 %9 = load i32, ptr %8, align 4 %10 = zext i1 %7 to i32 %11 = add i32 %9, %10 %12 = lshr i32 %2, 29 - %13 = getelementptr inbounds i8, ptr %0, i64 20 + %13 = getelementptr inbounds nuw i8, ptr %0, i64 20 %14 = add i32 %11, %12 store i32 %14, ptr %13, align 4 %15 = lshr i32 %4, 3 @@ -58,9 +58,9 @@ define hidden void @cmsMD5add(ptr nocapture noundef %0, ptr nocapture noundef re br i1 %.not, label %29, label %17 17: ; preds = %._crit_edge47 - %18 = getelementptr inbounds i8, ptr %0, i64 24 + %18 = getelementptr inbounds nuw i8, ptr %0, i64 24 %19 = zext nneg i32 %16 to i64 - %20 = getelementptr inbounds i8, ptr %18, i64 %19 + %20 = getelementptr inbounds nuw i8, ptr %18, i64 %19 %21 = sub nuw nsw i32 64, %16 %22 = icmp ult i32 %2, %21 br i1 %22, label %23, label %25 @@ -74,7 +74,7 @@ define hidden void @cmsMD5add(ptr nocapture noundef %0, ptr nocapture noundef re %26 = zext nneg i32 %21 to i64 tail call void @llvm.memmove.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %20, ptr noundef nonnull align 1 dereferenceable(1) %1, i64 %26, i1 false) tail call fastcc void @cmsMD5_Transform(ptr noundef nonnull %0, ptr noundef nonnull %18) - %27 = getelementptr inbounds i8, ptr %1, i64 %26 + %27 = getelementptr inbounds nuw i8, ptr %1, i64 %26 %28 = sub nuw i32 %2, %21 br label %29 @@ -85,7 +85,7 @@ define hidden void @cmsMD5add(ptr nocapture noundef %0, ptr nocapture noundef re br i1 %30, label %.lr.ph, label %._crit_edge .lr.ph: ; preds = %29 - %31 = getelementptr inbounds i8, ptr %0, i64 24 + %31 = getelementptr inbounds nuw i8, ptr %0, i64 24 br label %32 32: ; preds = %.lr.ph, %32 @@ -101,7 +101,7 @@ define hidden void @cmsMD5add(ptr nocapture noundef %0, ptr nocapture noundef re ._crit_edge: ; preds = %32, %29 %.138.lcssa = phi i32 [ %.037, %29 ], [ %34, %32 ] %.1.lcssa = phi ptr [ %.0, %29 ], [ %33, %32 ] - %36 = getelementptr inbounds i8, ptr %0, i64 24 + %36 = getelementptr inbounds nuw i8, ptr %0, i64 24 %37 = zext nneg i32 %.138.lcssa to i64 tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 8 %36, ptr align 1 %.1.lcssa, i64 %37, i1 false) br label %38 @@ -116,11 +116,11 @@ declare void @llvm.memmove.p0.p0.i64(ptr nocapture writeonly, ptr nocapture read ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define internal fastcc void @cmsMD5_Transform(ptr nocapture noundef %0, ptr nocapture noundef readonly %1) unnamed_addr #4 { %3 = load i32, ptr %0, align 4 - %4 = getelementptr inbounds i8, ptr %0, i64 4 + %4 = getelementptr inbounds nuw i8, ptr %0, i64 4 %5 = load i32, ptr %4, align 4 - %6 = getelementptr inbounds i8, ptr %0, i64 8 + %6 = getelementptr inbounds nuw i8, ptr %0, i64 8 %7 = load i32, ptr %6, align 4 - %8 = getelementptr inbounds i8, ptr %0, i64 12 + %8 = getelementptr inbounds nuw i8, ptr %0, i64 12 %9 = load i32, ptr %8, align 4 %10 = xor i32 %9, %7 %11 = and i32 %10, %5 @@ -134,7 +134,7 @@ define internal fastcc void @cmsMD5_Transform(ptr nocapture noundef %0, ptr noca %19 = xor i32 %7, %5 %20 = and i32 %18, %19 %21 = xor i32 %20, %7 - %22 = getelementptr inbounds i8, ptr %1, i64 4 + %22 = getelementptr inbounds nuw i8, ptr %1, i64 4 %23 = load i32, ptr %22, align 4 %24 = add i32 %9, -389564586 %25 = add i32 %24, %23 @@ -144,7 +144,7 @@ define internal fastcc void @cmsMD5_Transform(ptr nocapture noundef %0, ptr noca %29 = xor i32 %18, %5 %30 = and i32 %28, %29 %31 = xor i32 %30, %5 - %32 = getelementptr inbounds i8, ptr %1, i64 8 + %32 = getelementptr inbounds nuw i8, ptr %1, i64 8 %33 = load i32, ptr %32, align 4 %34 = add i32 %7, 606105819 %35 = add i32 %34, %33 @@ -154,7 +154,7 @@ define internal fastcc void @cmsMD5_Transform(ptr nocapture noundef %0, ptr noca %39 = xor i32 %28, %18 %40 = and i32 %38, %39 %41 = xor i32 %40, %18 - %42 = getelementptr inbounds i8, ptr %1, i64 12 + %42 = getelementptr inbounds nuw i8, ptr %1, i64 12 %43 = load i32, ptr %42, align 4 %44 = add i32 %5, -1044525330 %45 = add i32 %44, %43 @@ -164,7 +164,7 @@ define internal fastcc void @cmsMD5_Transform(ptr nocapture noundef %0, ptr noca %49 = xor i32 %38, %28 %50 = and i32 %48, %49 %51 = xor i32 %50, %28 - %52 = getelementptr inbounds i8, ptr %1, i64 16 + %52 = getelementptr inbounds nuw i8, ptr %1, i64 16 %53 = load i32, ptr %52, align 4 %54 = add i32 %53, -176418897 %55 = add i32 %54, %18 @@ -174,7 +174,7 @@ define internal fastcc void @cmsMD5_Transform(ptr nocapture noundef %0, ptr noca %59 = xor i32 %48, %38 %60 = and i32 %58, %59 %61 = xor i32 %60, %38 - %62 = getelementptr inbounds i8, ptr %1, i64 20 + %62 = getelementptr inbounds nuw i8, ptr %1, i64 20 %63 = load i32, ptr %62, align 4 %64 = add i32 %63, 1200080426 %65 = add i32 %64, %28 @@ -184,7 +184,7 @@ define internal fastcc void @cmsMD5_Transform(ptr nocapture noundef %0, ptr noca %69 = xor i32 %58, %48 %70 = and i32 %68, %69 %71 = xor i32 %70, %48 - %72 = getelementptr inbounds i8, ptr %1, i64 24 + %72 = getelementptr inbounds nuw i8, ptr %1, i64 24 %73 = load i32, ptr %72, align 4 %74 = add i32 %73, -1473231341 %75 = add i32 %74, %38 @@ -194,7 +194,7 @@ define internal fastcc void @cmsMD5_Transform(ptr nocapture noundef %0, ptr noca %79 = xor i32 %68, %58 %80 = and i32 %78, %79 %81 = xor i32 %80, %58 - %82 = getelementptr inbounds i8, ptr %1, i64 28 + %82 = getelementptr inbounds nuw i8, ptr %1, i64 28 %83 = load i32, ptr %82, align 4 %84 = add i32 %83, -45705983 %85 = add i32 %84, %48 @@ -204,7 +204,7 @@ define internal fastcc void @cmsMD5_Transform(ptr nocapture noundef %0, ptr noca %89 = xor i32 %78, %68 %90 = and i32 %88, %89 %91 = xor i32 %90, %68 - %92 = getelementptr inbounds i8, ptr %1, i64 32 + %92 = getelementptr inbounds nuw i8, ptr %1, i64 32 %93 = load i32, ptr %92, align 4 %94 = add i32 %93, 1770035416 %95 = add i32 %94, %58 @@ -214,7 +214,7 @@ define internal fastcc void @cmsMD5_Transform(ptr nocapture noundef %0, ptr noca %99 = xor i32 %88, %78 %100 = and i32 %98, %99 %101 = xor i32 %100, %78 - %102 = getelementptr inbounds i8, ptr %1, i64 36 + %102 = getelementptr inbounds nuw i8, ptr %1, i64 36 %103 = load i32, ptr %102, align 4 %104 = add i32 %103, -1958414417 %105 = add i32 %104, %68 @@ -224,7 +224,7 @@ define internal fastcc void @cmsMD5_Transform(ptr nocapture noundef %0, ptr noca %109 = xor i32 %98, %88 %110 = and i32 %108, %109 %111 = xor i32 %110, %88 - %112 = getelementptr inbounds i8, ptr %1, i64 40 + %112 = getelementptr inbounds nuw i8, ptr %1, i64 40 %113 = load i32, ptr %112, align 4 %114 = add i32 %113, -42063 %115 = add i32 %114, %78 @@ -234,7 +234,7 @@ define internal fastcc void @cmsMD5_Transform(ptr nocapture noundef %0, ptr noca %119 = xor i32 %108, %98 %120 = and i32 %118, %119 %121 = xor i32 %120, %98 - %122 = getelementptr inbounds i8, ptr %1, i64 44 + %122 = getelementptr inbounds nuw i8, ptr %1, i64 44 %123 = load i32, ptr %122, align 4 %124 = add i32 %123, -1990404162 %125 = add i32 %124, %88 @@ -244,7 +244,7 @@ define internal fastcc void @cmsMD5_Transform(ptr nocapture noundef %0, ptr noca %129 = xor i32 %118, %108 %130 = and i32 %128, %129 %131 = xor i32 %130, %108 - %132 = getelementptr inbounds i8, ptr %1, i64 48 + %132 = getelementptr inbounds nuw i8, ptr %1, i64 48 %133 = load i32, ptr %132, align 4 %134 = add i32 %133, 1804603682 %135 = add i32 %134, %98 @@ -254,7 +254,7 @@ define internal fastcc void @cmsMD5_Transform(ptr nocapture noundef %0, ptr noca %139 = xor i32 %128, %118 %140 = and i32 %138, %139 %141 = xor i32 %140, %118 - %142 = getelementptr inbounds i8, ptr %1, i64 52 + %142 = getelementptr inbounds nuw i8, ptr %1, i64 52 %143 = load i32, ptr %142, align 4 %144 = add i32 %143, -40341101 %145 = add i32 %144, %108 @@ -264,7 +264,7 @@ define internal fastcc void @cmsMD5_Transform(ptr nocapture noundef %0, ptr noca %149 = xor i32 %138, %128 %150 = and i32 %148, %149 %151 = xor i32 %150, %128 - %152 = getelementptr inbounds i8, ptr %1, i64 56 + %152 = getelementptr inbounds nuw i8, ptr %1, i64 56 %153 = load i32, ptr %152, align 4 %154 = add i32 %153, -1502002290 %155 = add i32 %154, %118 @@ -274,7 +274,7 @@ define internal fastcc void @cmsMD5_Transform(ptr nocapture noundef %0, ptr noca %159 = xor i32 %148, %138 %160 = and i32 %158, %159 %161 = xor i32 %160, %138 - %162 = getelementptr inbounds i8, ptr %1, i64 60 + %162 = getelementptr inbounds nuw i8, ptr %1, i64 60 %163 = load i32, ptr %162, align 4 %164 = add i32 %163, 1236535329 %165 = add i32 %164, %128 @@ -661,14 +661,14 @@ define internal fastcc void @cmsMD5_Transform(ptr nocapture noundef %0, ptr noca ; Function Attrs: nounwind uwtable define hidden void @cmsMD5finish(ptr nocapture noundef writeonly %0, ptr noundef %1) local_unnamed_addr #0 { - %3 = getelementptr inbounds i8, ptr %1, i64 16 + %3 = getelementptr inbounds nuw i8, ptr %1, i64 16 %4 = load i32, ptr %3, align 8 %5 = lshr i32 %4, 3 %6 = and i32 %5, 63 - %7 = getelementptr inbounds i8, ptr %1, i64 24 + %7 = getelementptr inbounds nuw i8, ptr %1, i64 24 %8 = zext nneg i32 %6 to i64 - %9 = getelementptr inbounds i8, ptr %7, i64 %8 - %10 = getelementptr inbounds i8, ptr %9, i64 1 + %9 = getelementptr inbounds nuw i8, ptr %7, i64 %8 + %10 = getelementptr inbounds nuw i8, ptr %9, i64 1 store i8 -128, ptr %9, align 1 %11 = xor i32 %6, 63 %12 = icmp ult i32 %11, 8 @@ -679,6 +679,7 @@ define hidden void @cmsMD5finish(ptr nocapture noundef writeonly %0, ptr noundef tail call void @llvm.memset.p0.i64(ptr nonnull align 1 %10, i8 0, i64 %14, i1 false) tail call fastcc void @cmsMD5_Transform(ptr noundef nonnull %1, ptr noundef nonnull %7) tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(56) %7, i8 0, i64 56, i1 false) + %.pre = load i32, ptr %3, align 8 br label %18 15: ; preds = %2 @@ -688,16 +689,16 @@ define hidden void @cmsMD5finish(ptr nocapture noundef writeonly %0, ptr noundef br label %18 18: ; preds = %15, %13 - %19 = load i32, ptr %3, align 8 - %20 = getelementptr inbounds i8, ptr %1, i64 80 + %19 = phi i32 [ %4, %15 ], [ %.pre, %13 ] + %20 = getelementptr inbounds nuw i8, ptr %1, i64 80 store i32 %19, ptr %20, align 8 - %21 = getelementptr inbounds i8, ptr %1, i64 20 + %21 = getelementptr inbounds nuw i8, ptr %1, i64 20 %22 = load i32, ptr %21, align 4 - %23 = getelementptr inbounds i8, ptr %1, i64 84 + %23 = getelementptr inbounds nuw i8, ptr %1, i64 84 store i32 %22, ptr %23, align 4 tail call fastcc void @cmsMD5_Transform(ptr noundef nonnull %1, ptr noundef nonnull %7) tail call void @llvm.memmove.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, i64 16, i1 false) - %24 = getelementptr inbounds i8, ptr %1, i64 88 + %24 = getelementptr inbounds nuw i8, ptr %1, i64 88 %25 = load ptr, ptr %24, align 8 tail call void @_cmsFree(ptr noundef %25, ptr noundef nonnull %1) #8 ret void @@ -714,11 +715,11 @@ define hidden range(i32 0, 2) i32 @cmsMD5computeID(ptr noundef %0) local_unnamed %3 = alloca %struct._cms_iccprofile_struct, align 8 %4 = tail call ptr @cmsGetProfileContextID(ptr noundef %0) #8 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(3760) %3, ptr noundef nonnull align 8 dereferenceable(3760) %0, i64 3760, i1 false) - %5 = getelementptr inbounds i8, ptr %0, i64 112 + %5 = getelementptr inbounds nuw i8, ptr %0, i64 112 store i64 0, ptr %5, align 8 - %6 = getelementptr inbounds i8, ptr %0, i64 92 + %6 = getelementptr inbounds nuw i8, ptr %0, i64 92 store i32 0, ptr %6, align 4 - %7 = getelementptr inbounds i8, ptr %0, i64 124 + %7 = getelementptr inbounds nuw i8, ptr %0, i64 124 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %7, i8 0, i64 16, i1 false) %8 = call i32 @cmsSaveProfileToMem(ptr noundef %0, ptr noundef null, ptr noundef nonnull %2) #8 %.not = icmp eq i32 %8, 0 @@ -741,17 +742,17 @@ define hidden range(i32 0, 2) i32 @cmsMD5computeID(ptr noundef %0) local_unnamed br i1 %17, label %cmsMD5alloc.exit.thread, label %18 18: ; preds = %15 - %19 = getelementptr inbounds i8, ptr %16, i64 88 + %19 = getelementptr inbounds nuw i8, ptr %16, i64 88 store ptr %4, ptr %19, align 8 store i32 1732584193, ptr %16, align 8 - %20 = getelementptr inbounds i8, ptr %16, i64 4 + %20 = getelementptr inbounds nuw i8, ptr %16, i64 4 store i32 -271733879, ptr %20, align 4 - %21 = getelementptr inbounds i8, ptr %16, i64 8 + %21 = getelementptr inbounds nuw i8, ptr %16, i64 8 store i32 -1732584194, ptr %21, align 8 - %22 = getelementptr inbounds i8, ptr %16, i64 12 + %22 = getelementptr inbounds nuw i8, ptr %16, i64 12 store i32 271733878, ptr %22, align 4 - %23 = getelementptr inbounds i8, ptr %16, i64 16 - %24 = getelementptr inbounds i8, ptr %16, i64 20 + %23 = getelementptr inbounds nuw i8, ptr %16, i64 16 + %24 = getelementptr inbounds nuw i8, ptr %16, i64 20 %25 = load i32, ptr %2, align 4 %26 = shl i32 %25, 3 store i32 %26, ptr %23, align 8 @@ -761,7 +762,7 @@ define hidden range(i32 0, 2) i32 @cmsMD5computeID(ptr noundef %0) local_unnamed br i1 %28, label %.lr.ph.i, label %._crit_edge.i .lr.ph.i: ; preds = %18 - %29 = getelementptr inbounds i8, ptr %16, i64 24 + %29 = getelementptr inbounds nuw i8, ptr %16, i64 24 br label %30 30: ; preds = %30, %.lr.ph.i @@ -777,7 +778,7 @@ define hidden range(i32 0, 2) i32 @cmsMD5computeID(ptr noundef %0) local_unnamed ._crit_edge.i: ; preds = %30, %18 %.138.lcssa.i = phi i32 [ %25, %18 ], [ %32, %30 ] %.1.lcssa.i = phi ptr [ %11, %18 ], [ %31, %30 ] - %34 = getelementptr inbounds i8, ptr %16, i64 24 + %34 = getelementptr inbounds nuw i8, ptr %16, i64 24 %35 = zext nneg i32 %.138.lcssa.i to i64 call void @llvm.memmove.p0.p0.i64(ptr nonnull align 8 %34, ptr nonnull align 1 %.1.lcssa.i, i64 %35, i1 false) call void @_cmsFree(ptr noundef %4, ptr noundef nonnull %11) #8 @@ -786,8 +787,8 @@ define hidden range(i32 0, 2) i32 @cmsMD5computeID(ptr noundef %0) local_unnamed %37 = lshr i32 %36, 3 %38 = and i32 %37, 63 %39 = zext nneg i32 %38 to i64 - %40 = getelementptr inbounds i8, ptr %34, i64 %39 - %41 = getelementptr inbounds i8, ptr %40, i64 1 + %40 = getelementptr inbounds nuw i8, ptr %34, i64 %39 + %41 = getelementptr inbounds nuw i8, ptr %40, i64 1 store i8 -128, ptr %40, align 1 %42 = xor i32 %38, 63 %43 = icmp ult i32 %42, 8 @@ -798,6 +799,7 @@ define hidden range(i32 0, 2) i32 @cmsMD5computeID(ptr noundef %0) local_unnamed call void @llvm.memset.p0.i64(ptr nonnull align 1 %41, i8 0, i64 %45, i1 false) call fastcc void @cmsMD5_Transform(ptr noundef nonnull %16, ptr noundef nonnull %34) call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(56) %34, i8 0, i64 56, i1 false) + %.pre.i = load i32, ptr %23, align 8 br label %cmsMD5finish.exit 46: ; preds = %._crit_edge.i @@ -807,11 +809,11 @@ define hidden range(i32 0, 2) i32 @cmsMD5computeID(ptr noundef %0) local_unnamed br label %cmsMD5finish.exit cmsMD5finish.exit: ; preds = %44, %46 - %49 = load i32, ptr %23, align 8 - %50 = getelementptr inbounds i8, ptr %16, i64 80 + %49 = phi i32 [ %36, %46 ], [ %.pre.i, %44 ] + %50 = getelementptr inbounds nuw i8, ptr %16, i64 80 store i32 %49, ptr %50, align 8 %51 = load i32, ptr %24, align 4 - %52 = getelementptr inbounds i8, ptr %16, i64 84 + %52 = getelementptr inbounds nuw i8, ptr %16, i64 84 store i32 %51, ptr %52, align 4 call fastcc void @cmsMD5_Transform(ptr noundef nonnull %16, ptr noundef nonnull %34) call void @llvm.memmove.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %16, i64 16, i1 false) diff --git a/bench/openspiel/optimized/CalcTables.cpp.ll b/bench/openspiel/optimized/CalcTables.cpp.ll index 5171ab616c8..b82761e91fa 100644 --- a/bench/openspiel/optimized/CalcTables.cpp.ll +++ b/bench/openspiel/optimized/CalcTables.cpp.ll @@ -201,7 +201,7 @@ define void @_Z14CopyCalcSingleRKSt6vectorIiSaIiEE(ptr nocapture noundef nonnull %6 = phi ptr [ %21, %.loopexit ], [ %3, %1 ] %7 = phi i64 [ %23, %.loopexit ], [ 0, %1 ] %.01114 = phi i32 [ %22, %.loopexit ], [ 0, %1 ] - %8 = getelementptr inbounds i32, ptr %5, i64 %7 + %8 = getelementptr inbounds nuw i32, ptr %5, i64 %7 %9 = load i32, ptr %8, align 4 %10 = icmp eq i32 %9, -1 br i1 %10, label %.loopexit, label %.preheader @@ -211,12 +211,12 @@ define void @_Z14CopyCalcSingleRKSt6vectorIiSaIiEE(ptr nocapture noundef nonnull %11 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @cparam, i64 16), align 8 %12 = getelementptr inbounds nuw i8, ptr %11, i64 4 %13 = load ptr, ptr %0, align 8 - %14 = getelementptr inbounds i32, ptr %13, i64 %7 + %14 = getelementptr inbounds nuw i32, ptr %13, i64 %7 %15 = load i32, ptr %14, align 4 %16 = sext i32 %15 to i64 %17 = getelementptr inbounds [200 x %struct.futureTricks], ptr %12, i64 0, i64 %16, i32 5, i64 %indvars.iv %18 = load i32, ptr %17, align 4 - %19 = getelementptr inbounds [200 x %struct.futureTricks], ptr %12, i64 0, i64 %7, i32 5, i64 %indvars.iv + %19 = getelementptr inbounds nuw [200 x %struct.futureTricks], ptr %12, i64 0, i64 %7, i32 5, i64 %indvars.iv store i32 %18, ptr %19, align 4 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 4 @@ -371,7 +371,7 @@ define noundef i32 @_Z14CalcAllBoardsNP6boardsP12solvedBoards(ptr noundef %0, pt 9: ; preds = %5, %9 %indvars.iv = phi i64 [ 0, %5 ], [ %indvars.iv.next, %9 ] - %10 = getelementptr inbounds [200 x %struct.futureTricks], ptr %8, i64 0, i64 %indvars.iv, i32 1 + %10 = getelementptr inbounds nuw [200 x %struct.futureTricks], ptr %8, i64 0, i64 %indvars.iv, i32 1 store i32 0, ptr %10, align 4 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 200 @@ -406,7 +406,7 @@ define i32 @CalcDDtable(ptr nocapture noundef readonly byval(%struct.ddTableDeal %2 = alloca %struct.deal, align 4 %3 = alloca %struct.boards, align 4 %4 = alloca %struct.solvedBoards, align 4 - %scevgep53 = getelementptr inbounds i8, ptr %2, i64 32 + %scevgep53 = getelementptr inbounds nuw i8, ptr %2, i64 32 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(64) %scevgep53, ptr noundef nonnull align 8 dereferenceable(64) %0, i64 64, i1 false) %5 = getelementptr inbounds nuw i8, ptr %2, i64 20 %6 = getelementptr inbounds nuw i8, ptr %2, i64 8 @@ -415,7 +415,7 @@ define i32 @CalcDDtable(ptr nocapture noundef readonly byval(%struct.ddTableDeal 7: ; preds = %.preheader42, %7 %indvars.iv = phi i64 [ 0, %.preheader42 ], [ %indvars.iv.next, %7 ] - %8 = getelementptr inbounds [3 x i32], ptr %5, i64 0, i64 %indvars.iv + %8 = getelementptr inbounds nuw [3 x i32], ptr %5, i64 0, i64 %indvars.iv store i32 0, ptr %8, align 4 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 3 @@ -433,13 +433,13 @@ define i32 @CalcDDtable(ptr nocapture noundef readonly byval(%struct.ddTableDeal %indvars.iv56 = phi i64 [ 0, %9 ], [ %indvars.iv.next57, %14 ] %.03548 = phi i32 [ 4, %9 ], [ %19, %14 ] store i32 %.03548, ptr %2, align 4 - %15 = getelementptr inbounds [200 x %struct.deal], ptr %10, i64 0, i64 %indvars.iv56 + %15 = getelementptr inbounds nuw [200 x %struct.deal], ptr %10, i64 0, i64 %indvars.iv56 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(96) %15, ptr noundef nonnull align 4 dereferenceable(96) %2, i64 96, i1 false) - %16 = getelementptr inbounds [200 x i32], ptr %11, i64 0, i64 %indvars.iv56 + %16 = getelementptr inbounds nuw [200 x i32], ptr %11, i64 0, i64 %indvars.iv56 store i32 -1, ptr %16, align 4 - %17 = getelementptr inbounds [200 x i32], ptr %12, i64 0, i64 %indvars.iv56 + %17 = getelementptr inbounds nuw [200 x i32], ptr %12, i64 0, i64 %indvars.iv56 store i32 1, ptr %17, align 4 - %18 = getelementptr inbounds [200 x i32], ptr %13, i64 0, i64 %indvars.iv56 + %18 = getelementptr inbounds nuw [200 x i32], ptr %13, i64 0, i64 %indvars.iv56 store i32 1, ptr %18, align 4 %indvars.iv.next57 = add nuw nsw i64 %indvars.iv56, 1 %19 = add nsw i32 %.03548, -1 @@ -458,7 +458,7 @@ define i32 @CalcDDtable(ptr nocapture noundef readonly byval(%struct.ddTableDeal 23: ; preds = %23, %20 %indvars.iv.i = phi i64 [ 0, %20 ], [ %indvars.iv.next.i, %23 ] - %24 = getelementptr inbounds [200 x %struct.futureTricks], ptr %22, i64 0, i64 %indvars.iv.i, i32 1 + %24 = getelementptr inbounds nuw [200 x %struct.futureTricks], ptr %22, i64 0, i64 %indvars.iv.i, i32 1 store i32 0, ptr %24, align 4 %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 %exitcond.not.i = icmp eq i64 %indvars.iv.next.i, 200 @@ -470,40 +470,38 @@ define i32 @CalcDDtable(ptr nocapture noundef readonly byval(%struct.ddTableDeal br i1 %.not.i, label %_Z14CalcAllBoardsNP6boardsP12solvedBoards.exit, label %_Z14CalcAllBoardsNP6boardsP12solvedBoards.exit.thread _Z14CalcAllBoardsNP6boardsP12solvedBoards.exit: ; preds = %25 - %27 = load i32, ptr @cparam, align 8 - store i32 %27, ptr %4, align 4 - %28 = load i32, ptr getelementptr inbounds nuw (i8, ptr @cparam, i64 24), align 8 - %.not = icmp ult i32 %28, 2 + %27 = load i32, ptr getelementptr inbounds nuw (i8, ptr @cparam, i64 24), align 8 + %.not = icmp ult i32 %27, 2 br i1 %.not, label %.preheader, label %_Z14CalcAllBoardsNP6boardsP12solvedBoards.exit.thread -.preheader: ; preds = %_Z14CalcAllBoardsNP6boardsP12solvedBoards.exit, %40 - %indvars.iv64 = phi i64 [ %indvars.iv.next65, %40 ], [ 0, %_Z14CalcAllBoardsNP6boardsP12solvedBoards.exit ] - %29 = getelementptr inbounds [200 x %struct.deal], ptr %10, i64 0, i64 %indvars.iv64 - %30 = load i32, ptr %29, align 4 - %31 = sext i32 %30 to i64 - br label %32 - -32: ; preds = %.preheader, %32 - %indvars.iv60 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next61, %32 ] - %33 = getelementptr inbounds [200 x %struct.futureTricks], ptr %22, i64 0, i64 %indvars.iv64, i32 5, i64 %indvars.iv60 - %34 = load i32, ptr %33, align 4 - %35 = sub nsw i32 13, %34 - %36 = getelementptr inbounds [4 x i32], ptr @rho, i64 0, i64 %indvars.iv60 - %37 = load i32, ptr %36, align 4 - %38 = sext i32 %37 to i64 - %39 = getelementptr inbounds [5 x [4 x i32]], ptr %1, i64 0, i64 %31, i64 %38 - store i32 %35, ptr %39, align 4 +.preheader: ; preds = %_Z14CalcAllBoardsNP6boardsP12solvedBoards.exit, %39 + %indvars.iv64 = phi i64 [ %indvars.iv.next65, %39 ], [ 0, %_Z14CalcAllBoardsNP6boardsP12solvedBoards.exit ] + %28 = getelementptr inbounds nuw [200 x %struct.deal], ptr %10, i64 0, i64 %indvars.iv64 + %29 = load i32, ptr %28, align 4 + %30 = sext i32 %29 to i64 + br label %31 + +31: ; preds = %.preheader, %31 + %indvars.iv60 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next61, %31 ] + %32 = getelementptr inbounds nuw [200 x %struct.futureTricks], ptr %22, i64 0, i64 %indvars.iv64, i32 5, i64 %indvars.iv60 + %33 = load i32, ptr %32, align 4 + %34 = sub nsw i32 13, %33 + %35 = getelementptr inbounds nuw [4 x i32], ptr @rho, i64 0, i64 %indvars.iv60 + %36 = load i32, ptr %35, align 4 + %37 = sext i32 %36 to i64 + %38 = getelementptr inbounds [5 x [4 x i32]], ptr %1, i64 0, i64 %30, i64 %37 + store i32 %34, ptr %38, align 4 %indvars.iv.next61 = add nuw nsw i64 %indvars.iv60, 1 %exitcond63.not = icmp eq i64 %indvars.iv.next61, 4 - br i1 %exitcond63.not, label %40, label %32, !llvm.loop !13 + br i1 %exitcond63.not, label %39, label %31, !llvm.loop !13 -40: ; preds = %32 +39: ; preds = %31 %indvars.iv.next65 = add nuw nsw i64 %indvars.iv64, 1 %exitcond67.not = icmp eq i64 %indvars.iv.next65, 5 br i1 %exitcond67.not, label %_Z14CalcAllBoardsNP6boardsP12solvedBoards.exit.thread, label %.preheader, !llvm.loop !14 -_Z14CalcAllBoardsNP6boardsP12solvedBoards.exit.thread: ; preds = %40, %25, %_Z14CalcAllBoardsNP6boardsP12solvedBoards.exit - %.032 = phi i32 [ %28, %_Z14CalcAllBoardsNP6boardsP12solvedBoards.exit ], [ %26, %25 ], [ 1, %40 ] +_Z14CalcAllBoardsNP6boardsP12solvedBoards.exit.thread: ; preds = %39, %25, %_Z14CalcAllBoardsNP6boardsP12solvedBoards.exit + %.032 = phi i32 [ %27, %_Z14CalcAllBoardsNP6boardsP12solvedBoards.exit ], [ %26, %25 ], [ 1, %39 ] ret i32 %.032 } @@ -517,7 +515,7 @@ define i32 @CalcAllTables(ptr nocapture noundef readonly %0, i32 noundef %1, ptr %indvars.iv = phi i64 [ 0, %5 ], [ %indvars.iv.next, %8 ] %.080111 = phi i32 [ 0, %5 ], [ %spec.select102, %8 ] %.094109 = phi i1 [ false, %5 ], [ %spec.select, %8 ] - %9 = getelementptr inbounds i32, ptr %2, i64 %indvars.iv + %9 = getelementptr inbounds nuw i32, ptr %2, i64 %indvars.iv %10 = load i32, ptr %9, align 4 %.not101 = icmp eq i32 %10, 0 %spec.select = select i1 %.not101, i1 true, i1 %.094109 @@ -552,7 +550,7 @@ define i32 @CalcAllTables(ptr nocapture noundef readonly %0, i32 noundef %1, ptr %21 = getelementptr inbounds nuw i8, ptr %6, i64 19204 %22 = getelementptr inbounds nuw i8, ptr %6, i64 20004 %23 = getelementptr inbounds nuw i8, ptr %6, i64 20804 - %scevgep138 = getelementptr inbounds i8, ptr %6, i64 36 + %scevgep138 = getelementptr inbounds nuw i8, ptr %6, i64 36 %wide.trip.count = zext nneg i32 %18 to i64 br label %.preheader108 @@ -569,7 +567,7 @@ define i32 @CalcAllTables(ptr nocapture noundef readonly %0, i32 noundef %1, ptr %indvars.iv146 = phi i64 [ 4, %.preheader108 ], [ %indvars.iv.next147, %42 ] %.189116 = phi i32 [ %.088119, %.preheader108 ], [ %.2, %42 ] %.191115 = phi i32 [ %.090118, %.preheader108 ], [ %.292, %42 ] - %27 = getelementptr inbounds i32, ptr %2, i64 %indvars.iv146 + %27 = getelementptr inbounds nuw i32, ptr %2, i64 %indvars.iv146 %28 = load i32, ptr %27, align 4 %.not100 = icmp eq i32 %28, 0 br i1 %.not100, label %.preheader107, label %42 @@ -589,7 +587,7 @@ define i32 @CalcAllTables(ptr nocapture noundef readonly %0, i32 noundef %1, ptr 35: ; preds = %.preheader107, %35 %indvars.iv142 = phi i64 [ 0, %.preheader107 ], [ %indvars.iv.next143, %35 ] - %36 = getelementptr inbounds [3 x i32], ptr %33, i64 0, i64 %indvars.iv142 + %36 = getelementptr inbounds nuw [3 x i32], ptr %33, i64 0, i64 %indvars.iv142 store i32 0, ptr %36, align 4 %indvars.iv.next143 = add nuw nsw i64 %indvars.iv142, 1 %exitcond145.not = icmp eq i64 %indvars.iv.next143, 3 @@ -636,7 +634,7 @@ define i32 @CalcAllTables(ptr nocapture noundef readonly %0, i32 noundef %1, ptr 50: ; preds = %50, %46 %indvars.iv.i = phi i64 [ 0, %46 ], [ %indvars.iv.next.i, %50 ] - %51 = getelementptr inbounds [200 x %struct.futureTricks], ptr %49, i64 0, i64 %indvars.iv.i, i32 1 + %51 = getelementptr inbounds nuw [200 x %struct.futureTricks], ptr %49, i64 0, i64 %indvars.iv.i, i32 1 store i32 0, ptr %51, align 4 %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 %exitcond.not.i = icmp eq i64 %indvars.iv.next.i, 200 @@ -676,13 +674,13 @@ _Z14CalcAllBoardsNP6boardsP12solvedBoards.exit: ; preds = %52 .preheader105.us: ; preds = %.preheader105.us.preheader, %._crit_edge123.us %indvars.iv160 = phi i64 [ 0, %.preheader105.us.preheader ], [ %indvars.iv.next161, %._crit_edge123.us ] %65 = mul nuw nsw i64 %indvars.iv160, %64 - %66 = getelementptr inbounds [200 x %struct.ddTableResults], ptr %63, i64 0, i64 %indvars.iv160 + %66 = getelementptr inbounds nuw [200 x %struct.ddTableResults], ptr %63, i64 0, i64 %indvars.iv160 br label %67 67: ; preds = %.preheader105.us, %72 %indvars.iv155 = phi i64 [ 0, %.preheader105.us ], [ %indvars.iv.next156, %72 ] %68 = add nuw nsw i64 %indvars.iv155, %65 - %69 = getelementptr inbounds [200 x %struct.deal], ptr %62, i64 0, i64 %68 + %69 = getelementptr inbounds nuw [200 x %struct.deal], ptr %62, i64 0, i64 %68 %70 = load i32, ptr %69, align 4 %71 = sext i32 %70 to i64 br label %73 @@ -694,10 +692,10 @@ _Z14CalcAllBoardsNP6boardsP12solvedBoards.exit: ; preds = %52 73: ; preds = %73, %67 %indvars.iv151 = phi i64 [ %indvars.iv.next152, %73 ], [ 0, %67 ] - %74 = getelementptr inbounds [200 x %struct.futureTricks], ptr %49, i64 0, i64 %68, i32 5, i64 %indvars.iv151 + %74 = getelementptr inbounds nuw [200 x %struct.futureTricks], ptr %49, i64 0, i64 %68, i32 5, i64 %indvars.iv151 %75 = load i32, ptr %74, align 4 %76 = sub nsw i32 13, %75 - %77 = getelementptr inbounds [4 x i32], ptr @rho, i64 0, i64 %indvars.iv151 + %77 = getelementptr inbounds nuw [4 x i32], ptr @rho, i64 0, i64 %indvars.iv151 %78 = load i32, ptr %77, align 4 %79 = sext i32 %78 to i64 %80 = getelementptr inbounds [5 x [4 x i32]], ptr %66, i64 0, i64 %71, i64 %79 @@ -733,8 +731,8 @@ _Z14CalcAllBoardsNP6boardsP12solvedBoards.exit: ; preds = %52 .lr.ph: ; preds = %.preheader, %87 %indvars.iv163 = phi i64 [ %indvars.iv.next164, %87 ], [ 0, %.preheader ] - %91 = getelementptr inbounds [200 x %struct.ddTableResults], ptr %86, i64 0, i64 %indvars.iv163 - %92 = getelementptr inbounds [40 x %struct.parResults], ptr %4, i64 0, i64 %indvars.iv163 + %91 = getelementptr inbounds nuw [200 x %struct.ddTableResults], ptr %86, i64 0, i64 %indvars.iv163 + %92 = getelementptr inbounds nuw [40 x %struct.parResults], ptr %4, i64 0, i64 %indvars.iv163 %93 = call i32 @Par(ptr noundef nonnull %91, ptr noundef %92, i32 noundef %1) %.not99 = icmp eq i32 %93, 1 br i1 %.not99, label %87, label %_Z14CalcAllBoardsNP6boardsP12solvedBoards.exit.thread @@ -767,8 +765,8 @@ define i32 @CalcAllTablesPBN(ptr noundef %0, i32 noundef %1, ptr nocapture nound 15: ; preds = %.lr.ph, %11 %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %11 ] - %16 = getelementptr inbounds [200 x %struct.ddTableDealPBN], ptr %9, i64 0, i64 %indvars.iv - %17 = getelementptr inbounds [200 x %struct.ddTableDeal], ptr %10, i64 0, i64 %indvars.iv + %16 = getelementptr inbounds nuw [200 x %struct.ddTableDealPBN], ptr %9, i64 0, i64 %indvars.iv + %17 = getelementptr inbounds nuw [200 x %struct.ddTableDeal], ptr %10, i64 0, i64 %indvars.iv %18 = call noundef i32 @_Z14ConvertFromPBNPKcPA4_j(ptr noundef nonnull %16, ptr noundef nonnull %17) %.not = icmp eq i32 %18, 1 br i1 %.not, label %11, label %.loopexit @@ -841,7 +839,7 @@ define linkonce_odr void @_ZNSt6vectorI12futureTricksSaIS0_EE17_M_default_append 19: ; preds = %3 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(216) %5, i8 0, i64 216, i1 false) - %20 = getelementptr inbounds i8, ptr %5, i64 216 + %20 = getelementptr inbounds nuw i8, ptr %5, i64 216 %21 = icmp eq i64 %1, 1 br i1 %21, label %_ZSt27__uninitialized_default_n_aIP12futureTricksmS0_ET_S2_T0_RSaIT1_E.exit, label %22 @@ -881,7 +879,7 @@ _ZNKSt6vectorI12futureTricksSaIS0_EE12_M_check_lenEmPKc.exit: ; preds = %25 br i1 %33, label %_ZSt27__uninitialized_default_n_aIP12futureTricksmS0_ET_S2_T0_RSaIT1_E.exit34, label %34 34: ; preds = %_ZNKSt6vectorI12futureTricksSaIS0_EE12_M_check_lenEmPKc.exit - %35 = getelementptr inbounds i8, ptr %32, i64 216 + %35 = getelementptr inbounds nuw i8, ptr %32, i64 216 %36 = getelementptr %struct.futureTricks, ptr %32, i64 %1 br label %.lr.ph.i.i.i.i.i.i.i30 @@ -913,7 +911,7 @@ _ZNSt12_Vector_baseI12futureTricksSaIS0_EE13_M_deallocateEPS0_m.exit37: ; preds store ptr %31, ptr %0, align 8 %42 = getelementptr inbounds %struct.futureTricks, ptr %32, i64 %1 store ptr %42, ptr %4, align 8 - %43 = getelementptr inbounds %struct.futureTricks, ptr %31, i64 %29 + %43 = getelementptr inbounds nuw %struct.futureTricks, ptr %31, i64 %29 store ptr %43, ptr %11, align 8 br label %44 diff --git a/bench/openssl/optimized/libcrypto-lib-bio_b64.ll b/bench/openssl/optimized/libcrypto-lib-bio_b64.ll index 08a0a367240..895ed8e678c 100644 --- a/bench/openssl/optimized/libcrypto-lib-bio_b64.ll +++ b/bench/openssl/optimized/libcrypto-lib-bio_b64.ll @@ -36,7 +36,7 @@ entry: if.end: ; preds = %entry tail call void @BIO_clear_flags(ptr noundef %b, i32 noundef 15) #7 - %encode = getelementptr inbounds i8, ptr %call, i64 16 + %encode = getelementptr inbounds nuw i8, ptr %call, i64 16 %0 = load i32, ptr %encode, align 8 %cmp3.not = icmp eq i32 %0, 1 br i1 %cmp3.not, label %if.end6, label %if.then4 @@ -44,17 +44,17 @@ if.end: ; preds = %entry if.then4: ; preds = %if.end store i32 1, ptr %encode, align 8 store i32 0, ptr %call, align 8 - %buf_off = getelementptr inbounds i8, ptr %call, i64 4 + %buf_off = getelementptr inbounds nuw i8, ptr %call, i64 4 store i32 0, ptr %buf_off, align 4 - %tmp_len = getelementptr inbounds i8, ptr %call, i64 8 + %tmp_len = getelementptr inbounds nuw i8, ptr %call, i64 8 store i32 0, ptr %tmp_len, align 8 - %base64 = getelementptr inbounds i8, ptr %call, i64 32 + %base64 = getelementptr inbounds nuw i8, ptr %call, i64 32 %1 = load ptr, ptr %base64, align 8 tail call void @EVP_EncodeInit(ptr noundef %1) #7 br label %if.end6 if.end6: ; preds = %if.then4, %if.end - %buf_off7 = getelementptr inbounds i8, ptr %call, i64 4 + %buf_off7 = getelementptr inbounds nuw i8, ptr %call, i64 4 %2 = load i32, ptr %buf_off7, align 4 %cmp8 = icmp slt i32 %2, 1502 br i1 %cmp8, label %cond.end, label %cond.false @@ -86,7 +86,7 @@ cond.end20: ; preds = %cond.end13 br i1 %cmp24174, label %while.body.lr.ph, label %while.end while.body.lr.ph: ; preds = %cond.end20 - %buf = getelementptr inbounds i8, ptr %call, i64 40 + %buf = getelementptr inbounds nuw i8, ptr %call, i64 40 br label %while.body while.cond: ; preds = %cond.end40 @@ -144,10 +144,10 @@ while.end: ; preds = %while.cond, %cond.e br i1 %or.cond1, label %return, label %while.cond57.preheader while.cond57.preheader: ; preds = %while.end - %tmp_len68 = getelementptr inbounds i8, ptr %call, i64 8 - %buf125 = getelementptr inbounds i8, ptr %call, i64 40 - %tmp = getelementptr inbounds i8, ptr %call, i64 1542 - %base64147 = getelementptr inbounds i8, ptr %call, i64 32 + %tmp_len68 = getelementptr inbounds nuw i8, ptr %call, i64 8 + %buf125 = getelementptr inbounds nuw i8, ptr %call, i64 40 + %tmp = getelementptr inbounds nuw i8, ptr %call, i64 1542 + %base64147 = getelementptr inbounds nuw i8, ptr %call, i64 32 br label %while.body59 while.body59: ; preds = %while.cond57.preheader, %while.end223 @@ -178,14 +178,13 @@ cond.end75: ; preds = %if.then70 %cmp79 = icmp ugt i32 %sub78, %inl.addr.0176 %spec.select = select i1 %cmp79, i32 1, i32 %sub78 %idxprom83 = zext nneg i32 %8 to i64 - %arrayidx84 = getelementptr inbounds [1024 x i8], ptr %tmp, i64 0, i64 %idxprom83 + %arrayidx84 = getelementptr inbounds nuw [1024 x i8], ptr %tmp, i64 0, i64 %idxprom83 %conv = zext nneg i32 %spec.select to i64 tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %arrayidx84, ptr align 1 %in.addr.0178, i64 %conv, i1 false) - %9 = load i32, ptr %tmp_len68, align 8 - %add86 = add nsw i32 %9, %spec.select + %add86 = add nuw nsw i32 %8, %spec.select store i32 %add86, ptr %tmp_len68, align 8 %add87 = add nuw nsw i32 %spec.select, %ret.0177 - %cmp89 = icmp slt i32 %add86, 3 + %cmp89 = icmp ult i32 %add86, 3 br i1 %cmp89, label %return, label %if.end92 if.end92: ; preds = %cond.end75 @@ -199,8 +198,8 @@ cond.false103: ; preds = %if.end92 unreachable cond.end104: ; preds = %if.end92 - %10 = load i32, ptr %buf_off7, align 4 - %cmp108.not = icmp slt i32 %call97, %10 + %9 = load i32, ptr %buf_off7, align 4 + %cmp108.not = icmp slt i32 %call97, %9 br i1 %cmp108.not, label %cond.false111, label %cond.end112 cond.false111: ; preds = %cond.end104 @@ -237,8 +236,8 @@ cond.false133: ; preds = %if.end123 unreachable cond.end134: ; preds = %if.end123 - %11 = load i32, ptr %buf_off7, align 4 - %cmp138.not = icmp slt i32 %call127, %11 + %10 = load i32, ptr %buf_off7, align 4 + %cmp138.not = icmp slt i32 %call127, %10 br i1 %cmp138.not, label %cond.false141, label %cond.end142 cond.false141: ; preds = %cond.end134 @@ -250,8 +249,8 @@ cond.end142: ; preds = %cond.end134 br label %if.end176 if.else146: ; preds = %while.body59 - %12 = load ptr, ptr %base64147, align 8 - %call151 = tail call i32 @EVP_EncodeUpdate(ptr noundef %12, ptr noundef nonnull %buf125, ptr noundef nonnull %call, ptr noundef %in.addr.0178, i32 noundef %7) #7 + %11 = load ptr, ptr %base64147, align 8 + %call151 = tail call i32 @EVP_EncodeUpdate(ptr noundef %11, ptr noundef nonnull %buf125, ptr noundef nonnull %call, ptr noundef %in.addr.0178, i32 noundef %7) #7 %tobool.not = icmp eq i32 %call151, 0 br i1 %tobool.not, label %if.then152, label %if.end159 @@ -261,8 +260,8 @@ if.then152: ; preds = %if.else146 br label %return if.end159: ; preds = %if.else146 - %13 = load i32, ptr %call, align 8 - %cmp161 = icmp slt i32 %13, 1503 + %12 = load i32, ptr %call, align 8 + %cmp161 = icmp slt i32 %12, 1503 br i1 %cmp161, label %cond.end165, label %cond.false164 cond.false164: ; preds = %if.end159 @@ -270,8 +269,8 @@ cond.false164: ; preds = %if.end159 unreachable cond.end165: ; preds = %if.end159 - %14 = load i32, ptr %buf_off7, align 4 - %cmp169.not = icmp slt i32 %13, %14 + %13 = load i32, ptr %buf_off7, align 4 + %cmp169.not = icmp slt i32 %12, %13 br i1 %cmp169.not, label %cond.false172, label %cond.end173 cond.false172: ; preds = %cond.end165 @@ -283,7 +282,7 @@ cond.end173: ; preds = %cond.end165 br label %if.end176 if.end176: ; preds = %cond.end112, %cond.end142, %cond.end173 - %15 = phi i32 [ %call97, %cond.end112 ], [ %call127, %cond.end142 ], [ %13, %cond.end173 ] + %14 = phi i32 [ %call97, %cond.end112 ], [ %call127, %cond.end142 ], [ %12, %cond.end173 ] %ret.2 = phi i32 [ %add87, %cond.end112 ], [ %add144, %cond.end142 ], [ %add175, %cond.end173 ] %n.2 = phi i32 [ %spec.select, %cond.end112 ], [ %sub124, %cond.end142 ], [ %7, %cond.end173 ] %sub177 = sub nsw i32 %inl.addr.0176, %n.2 @@ -293,13 +292,13 @@ if.end176: ; preds = %cond.end112, %cond. br label %while.cond180 while.cond180: ; preds = %cond.end213, %if.end176 - %16 = phi i32 [ 0, %if.end176 ], [ %add207, %cond.end213 ] - %n.3 = phi i32 [ %15, %if.end176 ], [ %sub205, %cond.end213 ] + %15 = phi i32 [ 0, %if.end176 ], [ %add207, %cond.end213 ] + %n.3 = phi i32 [ %14, %if.end176 ], [ %sub205, %cond.end213 ] %cmp181 = icmp sgt i32 %n.3, 0 br i1 %cmp181, label %while.body183, label %while.end223 while.body183: ; preds = %while.cond180 - %idxprom186 = sext i32 %16 to i64 + %idxprom186 = sext i32 %15 to i64 %arrayidx187 = getelementptr inbounds [1502 x i8], ptr %buf125, i64 0, i64 %idxprom186 %call188 = tail call i32 @BIO_write(ptr noundef %call1, ptr noundef nonnull %arrayidx187, i32 noundef %n.3) #7 %cmp189 = icmp slt i32 %call188, 1 @@ -320,8 +319,8 @@ cond.false202: ; preds = %if.end198 unreachable cond.end203: ; preds = %if.end198 - %17 = load i32, ptr %buf_off7, align 4 - %add207 = add nsw i32 %17, %call188 + %16 = load i32, ptr %buf_off7, align 4 + %add207 = add nsw i32 %16, %call188 store i32 %add207, ptr %buf_off7, align 4 %cmp209 = icmp slt i32 %add207, 1503 br i1 %cmp209, label %cond.end213, label %cond.false212 @@ -332,8 +331,8 @@ cond.false212: ; preds = %cond.end203 cond.end213: ; preds = %cond.end203 %sub205 = sub nsw i32 %n.3, %call188 - %18 = load i32, ptr %call, align 8 - %cmp217.not = icmp slt i32 %18, %add207 + %17 = load i32, ptr %call, align 8 + %cmp217.not = icmp slt i32 %17, %add207 br i1 %cmp217.not, label %cond.false220, label %while.cond180, !llvm.loop !6 cond.false220: ; preds = %cond.end213 @@ -370,7 +369,7 @@ if.end: ; preds = %entry if.end5: ; preds = %if.end tail call void @BIO_clear_flags(ptr noundef %b, i32 noundef 15) #7 - %encode = getelementptr inbounds i8, ptr %call, i64 16 + %encode = getelementptr inbounds nuw i8, ptr %call, i64 16 %0 = load i32, ptr %encode, align 8 %cmp6.not = icmp eq i32 %0, 2 br i1 %cmp6.not, label %if.end9, label %if.then7 @@ -378,11 +377,11 @@ if.end5: ; preds = %if.end if.then7: ; preds = %if.end5 store i32 2, ptr %encode, align 8 store i32 0, ptr %call, align 8 - %buf_off = getelementptr inbounds i8, ptr %call, i64 4 + %buf_off = getelementptr inbounds nuw i8, ptr %call, i64 4 store i32 0, ptr %buf_off, align 4 - %tmp_len = getelementptr inbounds i8, ptr %call, i64 8 + %tmp_len = getelementptr inbounds nuw i8, ptr %call, i64 8 store i32 0, ptr %tmp_len, align 8 - %base64 = getelementptr inbounds i8, ptr %call, i64 32 + %base64 = getelementptr inbounds nuw i8, ptr %call, i64 32 %1 = load ptr, ptr %base64, align 8 tail call void @EVP_DecodeInit(ptr noundef %1) #7 br label %if.end9 @@ -393,7 +392,7 @@ if.end9: ; preds = %if.then7, %if.end5 br i1 %cmp11, label %if.then12, label %if.end39 if.then12: ; preds = %if.end9 - %buf_off14 = getelementptr inbounds i8, ptr %call, i64 4 + %buf_off14 = getelementptr inbounds nuw i8, ptr %call, i64 4 %3 = load i32, ptr %buf_off14, align 4 %cmp15.not = icmp slt i32 %2, %3 br i1 %cmp15.not, label %cond.false, label %cond.end @@ -414,7 +413,7 @@ cond.false24: ; preds = %cond.end unreachable cond.end25: ; preds = %cond.end - %buf = getelementptr inbounds i8, ptr %call, i64 40 + %buf = getelementptr inbounds nuw i8, ptr %call, i64 40 %idxprom = sext i32 %3 to i64 %arrayidx = getelementptr inbounds [1502 x i8], ptr %buf, i64 0, i64 %idxprom %conv = sext i32 %spec.select to i64 @@ -441,14 +440,14 @@ if.end39: ; preds = %cond.end25, %if.the br i1 %cmp40214, label %while.body.lr.ph.lr.ph, label %while.end while.body.lr.ph.lr.ph: ; preds = %if.end39 - %cont = getelementptr inbounds i8, ptr %call, i64 24 - %tmp.ptr = getelementptr inbounds i8, ptr %call, i64 1542 - %tmp_len46 = getelementptr inbounds i8, ptr %call, i64 8 - %start = getelementptr inbounds i8, ptr %call, i64 20 - %tmp_nl = getelementptr inbounds i8, ptr %call, i64 12 - %base6491 = getelementptr inbounds i8, ptr %call, i64 32 - %buf92 = getelementptr inbounds i8, ptr %call, i64 40 - %buf_off254 = getelementptr inbounds i8, ptr %call, i64 4 + %cont = getelementptr inbounds nuw i8, ptr %call, i64 24 + %tmp.ptr = getelementptr inbounds nuw i8, ptr %call, i64 1542 + %tmp_len46 = getelementptr inbounds nuw i8, ptr %call, i64 8 + %start = getelementptr inbounds nuw i8, ptr %call, i64 20 + %tmp_nl = getelementptr inbounds nuw i8, ptr %call, i64 12 + %base6491 = getelementptr inbounds nuw i8, ptr %call, i64 32 + %buf92 = getelementptr inbounds nuw i8, ptr %call, i64 40 + %buf_off254 = getelementptr inbounds nuw i8, ptr %call, i64 4 %scevgep = getelementptr i8, ptr %call, i64 1543 br label %while.body.lr.ph @@ -561,7 +560,7 @@ if.then104: ; preds = %land.lhs.true101 br label %for.inc133 if.else106: ; preds = %land.lhs.true101, %if.end90 - %incdec.ptr.ptr.le = getelementptr inbounds i8, ptr %call, i64 %q.0.add + %incdec.ptr.ptr.le = getelementptr inbounds nuw i8, ptr %call, i64 %q.0.add %cmp109.not = icmp eq i64 %p.0.idx192, 1542 br i1 %cmp109.not, label %if.end129, label %if.then111 @@ -578,9 +577,9 @@ for.body123.preheader: ; preds = %if.then111 for.body123: ; preds = %for.body123.preheader, %for.body123 %indvars.iv = phi i64 [ 0, %for.body123.preheader ], [ %indvars.iv.next, %for.body123 ] - %arrayidx125 = getelementptr inbounds i8, ptr %p.0.ptr195, i64 %indvars.iv + %arrayidx125 = getelementptr inbounds nuw i8, ptr %p.0.ptr195, i64 %indvars.iv %21 = load i8, ptr %arrayidx125, align 1 - %arrayidx128 = getelementptr inbounds [1024 x i8], ptr %tmp.ptr, i64 0, i64 %indvars.iv + %arrayidx128 = getelementptr inbounds nuw [1024 x i8], ptr %tmp.ptr, i64 0, i64 %indvars.iv store i8 %21, ptr %arrayidx128, align 1 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond238.not = icmp eq i64 %indvars.iv.next, %wide.trip.count @@ -596,7 +595,7 @@ if.end129: ; preds = %for.body123, %if.th for.inc133: ; preds = %for.body, %if.then104, %if.then88 %p.1.idx = phi i64 [ %p.0.idx192, %for.body ], [ %q.0.add, %if.then88 ], [ %q.0.add, %if.then104 ] %inc134 = add nuw nsw i32 %j.0191, 1 - %q.0.ptr = getelementptr inbounds i8, ptr %call, i64 %q.0.add + %q.0.ptr = getelementptr inbounds nuw i8, ptr %call, i64 %q.0.add %p.0.ptr = getelementptr inbounds i8, ptr %call, i64 %p.1.idx %exitcond.not = icmp eq i32 %inc134, %add67 br i1 %exitcond.not, label %for.end135, label %for.body, !llvm.loop !9 @@ -650,9 +649,9 @@ for.body164.preheader: ; preds = %if.then156 for.body164: ; preds = %for.body164.preheader, %for.body164 %indvars.iv239 = phi i64 [ 0, %for.body164.preheader ], [ %indvars.iv.next240, %for.body164 ] - %arrayidx166 = getelementptr inbounds i8, ptr %p.0.ptr166, i64 %indvars.iv239 + %arrayidx166 = getelementptr inbounds nuw i8, ptr %p.0.ptr166, i64 %indvars.iv239 %25 = load i8, ptr %arrayidx166, align 1 - %arrayidx169 = getelementptr inbounds [1024 x i8], ptr %tmp.ptr, i64 0, i64 %indvars.iv239 + %arrayidx169 = getelementptr inbounds nuw [1024 x i8], ptr %tmp.ptr, i64 0, i64 %indvars.iv239 store i8 %25, ptr %arrayidx169, align 1 %indvars.iv.next240 = add nuw nsw i64 %indvars.iv239, 1 %exitcond243.not = icmp eq i64 %indvars.iv.next240, %wide.trip.count242 @@ -698,7 +697,7 @@ if.then194: ; preds = %if.end189 if.then203: ; preds = %if.then194 %sub205 = add nsw i32 %and195, -1 %idxprom206 = zext nneg i32 %sub205 to i64 - %arrayidx207 = getelementptr inbounds [1024 x i8], ptr %tmp.ptr, i64 0, i64 %idxprom206 + %arrayidx207 = getelementptr inbounds nuw [1024 x i8], ptr %tmp.ptr, i64 0, i64 %idxprom206 %28 = load i8, ptr %arrayidx207, align 1 %cmp209 = icmp eq i8 %28, 61 br i1 %cmp209, label %if.then211, label %if.end223 @@ -706,7 +705,7 @@ if.then203: ; preds = %if.then194 if.then211: ; preds = %if.then203 %sub213 = add nsw i32 %and195, -2 %idxprom214 = zext nneg i32 %sub213 to i64 - %arrayidx215 = getelementptr inbounds [1024 x i8], ptr %tmp.ptr, i64 0, i64 %idxprom214 + %arrayidx215 = getelementptr inbounds nuw [1024 x i8], ptr %tmp.ptr, i64 0, i64 %idxprom214 %29 = load i8, ptr %arrayidx215, align 1 %cmp217 = icmp eq i8 %29, 61 %spec.select161.v = select i1 %cmp217, i32 -2, i32 -1 @@ -815,26 +814,26 @@ if.end: ; preds = %entry ] again.preheader: ; preds = %if.end - %buf_off51 = getelementptr inbounds i8, ptr %call, i64 4 - %tmp_len = getelementptr inbounds i8, ptr %call, i64 8 - %buf = getelementptr inbounds i8, ptr %call, i64 40 - %tmp = getelementptr inbounds i8, ptr %call, i64 1542 - %encode73 = getelementptr inbounds i8, ptr %call, i64 16 - %base6477 = getelementptr inbounds i8, ptr %call, i64 32 + %buf_off51 = getelementptr inbounds nuw i8, ptr %call, i64 4 + %tmp_len = getelementptr inbounds nuw i8, ptr %call, i64 8 + %buf = getelementptr inbounds nuw i8, ptr %call, i64 40 + %tmp = getelementptr inbounds nuw i8, ptr %call, i64 1542 + %encode73 = getelementptr inbounds nuw i8, ptr %call, i64 16 + %base6477 = getelementptr inbounds nuw i8, ptr %call, i64 32 br label %while.cond sw.bb: ; preds = %if.end - %cont = getelementptr inbounds i8, ptr %call, i64 24 + %cont = getelementptr inbounds nuw i8, ptr %call, i64 24 store i32 1, ptr %cont, align 8 - %start = getelementptr inbounds i8, ptr %call, i64 20 + %start = getelementptr inbounds nuw i8, ptr %call, i64 20 store i32 1, ptr %start, align 4 - %encode = getelementptr inbounds i8, ptr %call, i64 16 + %encode = getelementptr inbounds nuw i8, ptr %call, i64 16 store i32 0, ptr %encode, align 8 %call3 = tail call i64 @BIO_ctrl(ptr noundef nonnull %call1, i32 noundef 1, i64 noundef %num, ptr noundef %ptr) #7 br label %return sw.bb4: ; preds = %if.end - %cont5 = getelementptr inbounds i8, ptr %call, i64 24 + %cont5 = getelementptr inbounds nuw i8, ptr %call, i64 24 %0 = load i32, ptr %cont5, align 8 %cmp6 = icmp slt i32 %0, 1 br i1 %cmp6, label %return, label %if.else @@ -845,7 +844,7 @@ if.else: ; preds = %sw.bb4 sw.bb10: ; preds = %if.end %1 = load i32, ptr %call, align 8 - %buf_off = getelementptr inbounds i8, ptr %call, i64 4 + %buf_off = getelementptr inbounds nuw i8, ptr %call, i64 4 %2 = load i32, ptr %buf_off, align 4 %cmp11.not = icmp slt i32 %1, %2 br i1 %cmp11.not, label %cond.false, label %cond.end @@ -861,13 +860,13 @@ cond.end: ; preds = %sw.bb10 br i1 %cmp14, label %land.lhs.true, label %if.else24 land.lhs.true: ; preds = %cond.end - %encode16 = getelementptr inbounds i8, ptr %call, i64 16 + %encode16 = getelementptr inbounds nuw i8, ptr %call, i64 16 %3 = load i32, ptr %encode16, align 8 %cmp17.not = icmp eq i32 %3, 0 br i1 %cmp17.not, label %if.else24, label %land.lhs.true19 land.lhs.true19: ; preds = %land.lhs.true - %base64 = getelementptr inbounds i8, ptr %call, i64 32 + %base64 = getelementptr inbounds nuw i8, ptr %call, i64 32 %4 = load ptr, ptr %base64, align 8 %call20 = tail call i32 @EVP_ENCODE_CTX_num(ptr noundef %4) #7 %cmp21.not = icmp eq i32 %call20, 0 @@ -883,7 +882,7 @@ if.then27: ; preds = %if.else24 sw.bb31: ; preds = %if.end %5 = load i32, ptr %call, align 8 - %buf_off33 = getelementptr inbounds i8, ptr %call, i64 4 + %buf_off33 = getelementptr inbounds nuw i8, ptr %call, i64 4 %6 = load i32, ptr %buf_off33, align 4 %cmp34.not = icmp slt i32 %5, %6 br i1 %cmp34.not, label %cond.false37, label %cond.end38 @@ -983,12 +982,12 @@ entry: br i1 %cmp, label %return, label %if.end if.end: ; preds = %entry - %cont = getelementptr inbounds i8, ptr %call, i64 24 + %cont = getelementptr inbounds nuw i8, ptr %call, i64 24 store i32 1, ptr %cont, align 8 - %start = getelementptr inbounds i8, ptr %call, i64 20 + %start = getelementptr inbounds nuw i8, ptr %call, i64 20 store i32 1, ptr %start, align 4 %call1 = tail call ptr @EVP_ENCODE_CTX_new() #7 - %base64 = getelementptr inbounds i8, ptr %call, i64 32 + %base64 = getelementptr inbounds nuw i8, ptr %call, i64 32 store ptr %call1, ptr %base64, align 8 %cmp3 = icmp eq ptr %call1, null br i1 %cmp3, label %if.then4, label %if.end5 @@ -1019,7 +1018,7 @@ if.end: ; preds = %entry br i1 %cmp1, label %return, label %if.end3 if.end3: ; preds = %if.end - %base64 = getelementptr inbounds i8, ptr %call, i64 32 + %base64 = getelementptr inbounds nuw i8, ptr %call, i64 32 %0 = load ptr, ptr %base64, align 8 tail call void @EVP_ENCODE_CTX_free(ptr noundef %0) #7 tail call void @CRYPTO_free(ptr noundef nonnull %call, ptr noundef nonnull @.str.2, i32 noundef 99) #7 diff --git a/bench/openssl/optimized/libcrypto-lib-mdc2dgst.ll b/bench/openssl/optimized/libcrypto-lib-mdc2dgst.ll index 2aab35a4cf5..6cab94cd385 100644 --- a/bench/openssl/optimized/libcrypto-lib-mdc2dgst.ll +++ b/bench/openssl/optimized/libcrypto-lib-mdc2dgst.ll @@ -10,11 +10,11 @@ target triple = "x86_64-unknown-linux-gnu" define noundef i32 @MDC2_Init(ptr nocapture noundef writeonly %c) local_unnamed_addr #0 { entry: store i32 0, ptr %c, align 4 - %pad_type = getelementptr inbounds i8, ptr %c, i64 28 + %pad_type = getelementptr inbounds nuw i8, ptr %c, i64 28 store i32 1, ptr %pad_type, align 4 - %h = getelementptr inbounds i8, ptr %c, i64 12 + %h = getelementptr inbounds nuw i8, ptr %c, i64 12 store i64 5931894172722287186, ptr %h, align 4 - %hh = getelementptr inbounds i8, ptr %c, i64 20 + %hh = getelementptr inbounds nuw i8, ptr %c, i64 20 store i64 2676586395008836901, ptr %hh, align 4 ret i32 1 } @@ -33,15 +33,14 @@ if.then: ; preds = %entry %conv = zext i32 %0 to i64 %sub = sub nsw i64 8, %conv %cmp2 = icmp ult i64 %len, %sub - %data = getelementptr inbounds i8, ptr %c, i64 4 - %arrayidx = getelementptr inbounds [8 x i8], ptr %data, i64 0, i64 %conv + %data = getelementptr inbounds nuw i8, ptr %c, i64 4 + %arrayidx = getelementptr inbounds nuw [8 x i8], ptr %data, i64 0, i64 %conv br i1 %cmp2, label %if.then4, label %if.else if.then4: ; preds = %if.then tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %arrayidx, ptr align 1 %in, i64 %len, i1 false) %conv5 = trunc i64 %len to i32 - %1 = load i32, ptr %c, align 4 - %add = add i32 %1, %conv5 + %add = add i32 %0, %conv5 br label %return.sink.split if.else: ; preds = %if.then @@ -69,7 +68,7 @@ if.end18: ; preds = %if.then17, %if.end1 br i1 %cmp20.not, label %return, label %if.then22 if.then22: ; preds = %if.end18 - %data23 = getelementptr inbounds i8, ptr %c, i64 4 + %data23 = getelementptr inbounds nuw i8, ptr %c, i64 4 %arrayidx25 = getelementptr inbounds i8, ptr %in.addr.0, i64 %and tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 %data23, ptr align 1 %arrayidx25, i64 %sub19, i1 false) %conv26 = trunc nuw nsw i64 %sub19 to i32 @@ -93,24 +92,24 @@ entry: %d = alloca [2 x i32], align 4 %dd = alloca [2 x i32], align 4 %k = alloca %struct.DES_ks, align 4 - %arrayidx26 = getelementptr inbounds i8, ptr %dd, i64 4 - %arrayidx27 = getelementptr inbounds i8, ptr %d, i64 4 - %h = getelementptr inbounds i8, ptr %c, i64 12 - %hh = getelementptr inbounds i8, ptr %c, i64 20 - %incdec.ptr57 = getelementptr inbounds i8, ptr %c, i64 13 - %incdec.ptr60 = getelementptr inbounds i8, ptr %c, i64 14 - %incdec.ptr64 = getelementptr inbounds i8, ptr %c, i64 15 - %incdec.ptr68 = getelementptr inbounds i8, ptr %c, i64 16 - %incdec.ptr71 = getelementptr inbounds i8, ptr %c, i64 17 - %incdec.ptr75 = getelementptr inbounds i8, ptr %c, i64 18 - %incdec.ptr79 = getelementptr inbounds i8, ptr %c, i64 19 - %incdec.ptr88 = getelementptr inbounds i8, ptr %c, i64 21 - %incdec.ptr92 = getelementptr inbounds i8, ptr %c, i64 22 - %incdec.ptr96 = getelementptr inbounds i8, ptr %c, i64 23 - %incdec.ptr100 = getelementptr inbounds i8, ptr %c, i64 24 - %incdec.ptr103 = getelementptr inbounds i8, ptr %c, i64 25 - %incdec.ptr107 = getelementptr inbounds i8, ptr %c, i64 26 - %incdec.ptr111 = getelementptr inbounds i8, ptr %c, i64 27 + %arrayidx26 = getelementptr inbounds nuw i8, ptr %dd, i64 4 + %arrayidx27 = getelementptr inbounds nuw i8, ptr %d, i64 4 + %h = getelementptr inbounds nuw i8, ptr %c, i64 12 + %hh = getelementptr inbounds nuw i8, ptr %c, i64 20 + %incdec.ptr57 = getelementptr inbounds nuw i8, ptr %c, i64 13 + %incdec.ptr60 = getelementptr inbounds nuw i8, ptr %c, i64 14 + %incdec.ptr64 = getelementptr inbounds nuw i8, ptr %c, i64 15 + %incdec.ptr68 = getelementptr inbounds nuw i8, ptr %c, i64 16 + %incdec.ptr71 = getelementptr inbounds nuw i8, ptr %c, i64 17 + %incdec.ptr75 = getelementptr inbounds nuw i8, ptr %c, i64 18 + %incdec.ptr79 = getelementptr inbounds nuw i8, ptr %c, i64 19 + %incdec.ptr88 = getelementptr inbounds nuw i8, ptr %c, i64 21 + %incdec.ptr92 = getelementptr inbounds nuw i8, ptr %c, i64 22 + %incdec.ptr96 = getelementptr inbounds nuw i8, ptr %c, i64 23 + %incdec.ptr100 = getelementptr inbounds nuw i8, ptr %c, i64 24 + %incdec.ptr103 = getelementptr inbounds nuw i8, ptr %c, i64 25 + %incdec.ptr107 = getelementptr inbounds nuw i8, ptr %c, i64 26 + %incdec.ptr111 = getelementptr inbounds nuw i8, ptr %c, i64 27 %.pre = load i8, ptr %h, align 4 %.pre59 = load i8, ptr %hh, align 4 br label %for.body @@ -226,7 +225,7 @@ for.end: ; preds = %for.body define noundef i32 @MDC2_Final(ptr nocapture noundef writeonly %md, ptr noundef %c) local_unnamed_addr #2 { entry: %0 = load i32, ptr %c, align 4 - %pad_type = getelementptr inbounds i8, ptr %c, i64 28 + %pad_type = getelementptr inbounds nuw i8, ptr %c, i64 28 %1 = load i32, ptr %pad_type, align 4 %cmp = icmp ne i32 %0, 0 %cmp1 = icmp eq i32 %1, 2 @@ -237,18 +236,18 @@ if.then: ; preds = %entry br i1 %cmp1, label %if.then3, label %if.end if.then3: ; preds = %if.then - %data = getelementptr inbounds i8, ptr %c, i64 4 + %data = getelementptr inbounds nuw i8, ptr %c, i64 4 %inc = add i32 %0, 1 %idxprom = zext i32 %0 to i64 - %arrayidx = getelementptr inbounds [8 x i8], ptr %data, i64 0, i64 %idxprom + %arrayidx = getelementptr inbounds nuw [8 x i8], ptr %data, i64 0, i64 %idxprom store i8 -128, ptr %arrayidx, align 1 br label %if.end if.end: ; preds = %if.then3, %if.then %i.0 = phi i32 [ %inc, %if.then3 ], [ %0, %if.then ] - %data4 = getelementptr inbounds i8, ptr %c, i64 4 + %data4 = getelementptr inbounds nuw i8, ptr %c, i64 4 %idxprom5 = zext i32 %i.0 to i64 - %arrayidx6 = getelementptr inbounds [8 x i8], ptr %data4, i64 0, i64 %idxprom5 + %arrayidx6 = getelementptr inbounds nuw [8 x i8], ptr %data4, i64 0, i64 %idxprom5 %sub = sub i32 8, %i.0 %conv = zext i32 %sub to i64 tail call void @llvm.memset.p0.i64(ptr nonnull align 1 %arrayidx6, i8 0, i64 %conv, i1 false) @@ -256,11 +255,11 @@ if.end: ; preds = %if.then3, %if.then br label %if.end8 if.end8: ; preds = %entry, %if.end - %h = getelementptr inbounds i8, ptr %c, i64 12 + %h = getelementptr inbounds nuw i8, ptr %c, i64 12 %2 = load i64, ptr %h, align 4 store i64 %2, ptr %md, align 1 - %arrayidx10 = getelementptr inbounds i8, ptr %md, i64 8 - %hh = getelementptr inbounds i8, ptr %c, i64 20 + %arrayidx10 = getelementptr inbounds nuw i8, ptr %md, i64 8 + %hh = getelementptr inbounds nuw i8, ptr %c, i64 20 %3 = load i64, ptr %hh, align 4 store i64 %3, ptr %arrayidx10, align 1 ret i32 1 diff --git a/bench/openvdb/optimized/Proximity.cc.ll b/bench/openvdb/optimized/Proximity.cc.ll index b5cdd4dfd91..bc2ed1d62e5 100644 --- a/bench/openvdb/optimized/Proximity.cc.ll +++ b/bench/openvdb/optimized/Proximity.cc.ll @@ -41,15 +41,15 @@ _ZN7openvdb5v11_04math18isRelOrApproxEqualIdEEbRKT_S5_S5_S5_.exit.i.i: ; preds = br i1 %cmp11.i.i.i, label %_ZN7openvdb5v11_04math18isRelOrApproxEqualIdEEbRKT_S5_S5_S5_.exit.i.i.if.end_crit_edge, label %land.lhs.true.i.i _ZN7openvdb5v11_04math18isRelOrApproxEqualIdEEbRKT_S5_S5_S5_.exit.i.i.if.end_crit_edge: ; preds = %_ZN7openvdb5v11_04math18isRelOrApproxEqualIdEEbRKT_S5_S5_S5_.exit.i.i - %ab.sroa.8.0.b.sroa_idx.phi.trans.insert = getelementptr inbounds i8, ptr %b, i64 8 + %ab.sroa.8.0.b.sroa_idx.phi.trans.insert = getelementptr inbounds nuw i8, ptr %b, i64 8 %ab.sroa.8.0.copyload.pre = load double, ptr %ab.sroa.8.0.b.sroa_idx.phi.trans.insert, align 8 - %arrayidx.i.i.i.i.phi.trans.insert = getelementptr inbounds i8, ptr %a, i64 8 + %arrayidx.i.i.i.i.phi.trans.insert = getelementptr inbounds nuw i8, ptr %a, i64 8 %.pre = load double, ptr %arrayidx.i.i.i.i.phi.trans.insert, align 8 br label %if.end land.lhs.true.i.i: ; preds = %_ZN7openvdb5v11_04math18isRelOrApproxEqualIdEEbRKT_S5_S5_S5_.exit.i.i, %entry - %arrayidx5.i.i = getelementptr inbounds i8, ptr %a, i64 8 - %arrayidx7.i.i = getelementptr inbounds i8, ptr %b, i64 8 + %arrayidx5.i.i = getelementptr inbounds nuw i8, ptr %a, i64 8 + %arrayidx7.i.i = getelementptr inbounds nuw i8, ptr %b, i64 8 %6 = load double, ptr %arrayidx5.i.i, align 8 %7 = load double, ptr %arrayidx7.i.i, align 8 %sub.i3.i.i = fsub double %6, %7 @@ -68,8 +68,8 @@ _ZN7openvdb5v11_04math18isRelOrApproxEqualIdEEbRKT_S5_S5_S5_.exit11.i.i: ; preds br i1 %cmp11.i10.i.i, label %if.end, label %land.rhs.i.i land.rhs.i.i: ; preds = %_ZN7openvdb5v11_04math18isRelOrApproxEqualIdEEbRKT_S5_S5_S5_.exit11.i.i, %land.lhs.true.i.i - %arrayidx10.i.i = getelementptr inbounds i8, ptr %a, i64 16 - %arrayidx12.i.i = getelementptr inbounds i8, ptr %b, i64 16 + %arrayidx10.i.i = getelementptr inbounds nuw i8, ptr %a, i64 16 + %arrayidx12.i.i = getelementptr inbounds nuw i8, ptr %b, i64 16 %12 = load double, ptr %arrayidx10.i.i, align 8 %13 = load double, ptr %arrayidx12.i.i, align 8 %sub.i12.i.i = fsub double %12, %13 @@ -105,7 +105,7 @@ _ZN7openvdb5v11_04math18isRelOrApproxEqualIdEEbRKT_S5_S5_S5_.exit.i.i128: ; pred br i1 %cmp11.i.i.i132, label %if.end, label %land.lhs.true.i.i108 land.lhs.true.i.i108: ; preds = %_ZN7openvdb5v11_04math18isRelOrApproxEqualIdEEbRKT_S5_S5_S5_.exit.i.i128, %land.lhs.true - %arrayidx7.i.i110 = getelementptr inbounds i8, ptr %c, i64 8 + %arrayidx7.i.i110 = getelementptr inbounds nuw i8, ptr %c, i64 8 %23 = load double, ptr %arrayidx7.i.i110, align 8 %sub.i3.i.i111 = fsub double %6, %23 %24 = tail call noundef double @llvm.fabs.f64(double %sub.i3.i.i111) @@ -123,7 +123,7 @@ _ZN7openvdb5v11_04math18isRelOrApproxEqualIdEEbRKT_S5_S5_S5_.exit11.i.i123: ; pr br i1 %cmp11.i10.i.i127, label %if.end, label %land.rhs.i.i113 land.rhs.i.i113: ; preds = %_ZN7openvdb5v11_04math18isRelOrApproxEqualIdEEbRKT_S5_S5_S5_.exit11.i.i123, %land.lhs.true.i.i108 - %arrayidx12.i.i115 = getelementptr inbounds i8, ptr %c, i64 16 + %arrayidx12.i.i115 = getelementptr inbounds nuw i8, ptr %c, i64 16 %28 = load double, ptr %arrayidx12.i.i115, align 8 %sub.i12.i.i116 = fsub double %12, %28 %29 = tail call noundef double @llvm.fabs.f64(double %sub.i12.i.i116) @@ -148,27 +148,27 @@ if.then: ; preds = %land.rhs.i.i113, %_ if.end: ; preds = %_ZN7openvdb5v11_04math18isRelOrApproxEqualIdEEbRKT_S5_S5_S5_.exit.i.i.if.end_crit_edge, %_ZN7openvdb5v11_04math18isRelOrApproxEqualIdEEbRKT_S5_S5_S5_.exit.i.i128, %_ZN7openvdb5v11_04math18isRelOrApproxEqualIdEEbRKT_S5_S5_S5_.exit11.i.i123, %_ZN7openvdb5v11_04math18isRelOrApproxEqualIdEEbRKT_S5_S5_S5_.exit11.i.i, %_ZN7openvdb5v11_04math13isApproxEqualIdEEbRKNS1_4Vec3IT_EES7_.exit133, %_ZN7openvdb5v11_04math13isApproxEqualIdEEbRKNS1_4Vec3IT_EES7_.exit %33 = phi double [ %.pre, %_ZN7openvdb5v11_04math18isRelOrApproxEqualIdEEbRKT_S5_S5_S5_.exit.i.i.if.end_crit_edge ], [ %6, %_ZN7openvdb5v11_04math18isRelOrApproxEqualIdEEbRKT_S5_S5_S5_.exit.i.i128 ], [ %6, %_ZN7openvdb5v11_04math18isRelOrApproxEqualIdEEbRKT_S5_S5_S5_.exit11.i.i123 ], [ %6, %_ZN7openvdb5v11_04math18isRelOrApproxEqualIdEEbRKT_S5_S5_S5_.exit11.i.i ], [ %6, %_ZN7openvdb5v11_04math13isApproxEqualIdEEbRKNS1_4Vec3IT_EES7_.exit133 ], [ %6, %_ZN7openvdb5v11_04math13isApproxEqualIdEEbRKNS1_4Vec3IT_EES7_.exit ] %ab.sroa.8.0.copyload = phi double [ %ab.sroa.8.0.copyload.pre, %_ZN7openvdb5v11_04math18isRelOrApproxEqualIdEEbRKT_S5_S5_S5_.exit.i.i.if.end_crit_edge ], [ %7, %_ZN7openvdb5v11_04math18isRelOrApproxEqualIdEEbRKT_S5_S5_S5_.exit.i.i128 ], [ %7, %_ZN7openvdb5v11_04math18isRelOrApproxEqualIdEEbRKT_S5_S5_S5_.exit11.i.i123 ], [ %7, %_ZN7openvdb5v11_04math18isRelOrApproxEqualIdEEbRKT_S5_S5_S5_.exit11.i.i ], [ %7, %_ZN7openvdb5v11_04math13isApproxEqualIdEEbRKNS1_4Vec3IT_EES7_.exit133 ], [ %7, %_ZN7openvdb5v11_04math13isApproxEqualIdEEbRKNS1_4Vec3IT_EES7_.exit ] - %ab.sroa.8.0.b.sroa_idx = getelementptr inbounds i8, ptr %b, i64 8 - %ab.sroa.15.0.b.sroa_idx = getelementptr inbounds i8, ptr %b, i64 16 + %ab.sroa.8.0.b.sroa_idx = getelementptr inbounds nuw i8, ptr %b, i64 8 + %ab.sroa.15.0.b.sroa_idx = getelementptr inbounds nuw i8, ptr %b, i64 16 %ab.sroa.15.0.copyload = load double, ptr %ab.sroa.15.0.b.sroa_idx, align 8 %sub.i.i = fsub double %1, %0 - %arrayidx.i.i.i.i = getelementptr inbounds i8, ptr %a, i64 8 + %arrayidx.i.i.i.i = getelementptr inbounds nuw i8, ptr %a, i64 8 %sub5.i.i = fsub double %ab.sroa.8.0.copyload, %33 - %arrayidx.i.i3.i.i = getelementptr inbounds i8, ptr %a, i64 16 + %arrayidx.i.i3.i.i = getelementptr inbounds nuw i8, ptr %a, i64 16 %34 = load double, ptr %arrayidx.i.i3.i.i, align 8 %sub9.i.i = fsub double %ab.sroa.15.0.copyload, %34 %ac.sroa.0.0.copyload = load double, ptr %c, align 8 - %ac.sroa.8.0.c.sroa_idx = getelementptr inbounds i8, ptr %c, i64 8 + %ac.sroa.8.0.c.sroa_idx = getelementptr inbounds nuw i8, ptr %c, i64 8 %ac.sroa.8.0.copyload = load double, ptr %ac.sroa.8.0.c.sroa_idx, align 8 - %ac.sroa.15.0.c.sroa_idx = getelementptr inbounds i8, ptr %c, i64 16 + %ac.sroa.15.0.c.sroa_idx = getelementptr inbounds nuw i8, ptr %c, i64 16 %ac.sroa.15.0.copyload = load double, ptr %ac.sroa.15.0.c.sroa_idx, align 8 %sub.i.i134 = fsub double %ac.sroa.0.0.copyload, %0 %sub5.i.i137 = fsub double %ac.sroa.8.0.copyload, %33 %sub9.i.i140 = fsub double %ac.sroa.15.0.copyload, %34 %ap.sroa.0.0.copyload = load double, ptr %p, align 8 - %ap.sroa.5.0.p.sroa_idx = getelementptr inbounds i8, ptr %p, i64 8 + %ap.sroa.5.0.p.sroa_idx = getelementptr inbounds nuw i8, ptr %p, i64 8 %ap.sroa.5.0.copyload = load double, ptr %ap.sroa.5.0.p.sroa_idx, align 8 - %ap.sroa.9.0.p.sroa_idx = getelementptr inbounds i8, ptr %p, i64 16 + %ap.sroa.9.0.p.sroa_idx = getelementptr inbounds nuw i8, ptr %p, i64 16 %ap.sroa.9.0.copyload = load double, ptr %ap.sroa.9.0.p.sroa_idx, align 8 %sub.i.i141 = fsub double %ap.sroa.0.0.copyload, %0 %sub5.i.i144 = fsub double %ap.sroa.5.0.copyload, %33 @@ -251,11 +251,11 @@ if.else4.i: ; preds = %if.else.i %52 = load double, ptr %agg.result, align 8, !alias.scope !4 %add.i.i.i = fadd double %mul.i.i.i, %52 store double %add.i.i.i, ptr %agg.result, align 8, !alias.scope !4 - %arrayidx4.i.i26.i = getelementptr inbounds i8, ptr %agg.result, i64 8 + %arrayidx4.i.i26.i = getelementptr inbounds nuw i8, ptr %agg.result, i64 8 %53 = load double, ptr %arrayidx4.i.i26.i, align 8, !alias.scope !4 %add5.i.i.i = fadd double %mul4.i.i.i, %53 store double %add5.i.i.i, ptr %arrayidx4.i.i26.i, align 8, !alias.scope !4 - %arrayidx8.i.i28.i = getelementptr inbounds i8, ptr %agg.result, i64 16 + %arrayidx8.i.i28.i = getelementptr inbounds nuw i8, ptr %agg.result, i64 16 %54 = load double, ptr %arrayidx8.i.i28.i, align 8, !alias.scope !4 %add9.i.i.i = fadd double %mul7.i.i.i, %54 store double %add9.i.i.i, ptr %arrayidx8.i.i28.i, align 8, !alias.scope !4 @@ -265,7 +265,7 @@ _ZN7openvdb5v11_04math28closestPointOnSegmentToPointERKNS1_4Vec3IdEES5_S5_Rd.exi %t.0 = phi double [ %div.i, %if.else4.i ], [ 1.000000e+00, %if.then3.i ], [ 0.000000e+00, %if.then.i ] %sub = fsub double 1.000000e+00, %t.0 store double %sub, ptr %uvw, align 8 - %arrayidx.i.i = getelementptr inbounds i8, ptr %uvw, i64 16 + %arrayidx.i.i = getelementptr inbounds nuw i8, ptr %uvw, i64 16 store double %t.0, ptr %arrayidx.i.i, align 8 br label %return @@ -393,11 +393,11 @@ if.else4.i263: ; preds = %if.else.i259 %81 = load double, ptr %agg.result, align 8, !alias.scope !9 %add.i.i.i268 = fadd double %mul.i.i.i265, %81 store double %add.i.i.i268, ptr %agg.result, align 8, !alias.scope !9 - %arrayidx4.i.i26.i269 = getelementptr inbounds i8, ptr %agg.result, i64 8 + %arrayidx4.i.i26.i269 = getelementptr inbounds nuw i8, ptr %agg.result, i64 8 %82 = load double, ptr %arrayidx4.i.i26.i269, align 8, !alias.scope !9 %add5.i.i.i270 = fadd double %mul4.i.i.i266, %82 store double %add5.i.i.i270, ptr %arrayidx4.i.i26.i269, align 8, !alias.scope !9 - %arrayidx8.i.i28.i271 = getelementptr inbounds i8, ptr %agg.result, i64 16 + %arrayidx8.i.i28.i271 = getelementptr inbounds nuw i8, ptr %agg.result, i64 16 %83 = load double, ptr %arrayidx8.i.i28.i271, align 8, !alias.scope !9 %add9.i.i.i272 = fadd double %mul7.i.i.i267, %83 store double %add9.i.i.i272, ptr %arrayidx8.i.i28.i271, align 8, !alias.scope !9 @@ -407,7 +407,7 @@ _ZN7openvdb5v11_04math28closestPointOnSegmentToPointERKNS1_4Vec3IdEES5_S5_Rd.exi %t13.0 = phi double [ %div.i264, %if.else4.i263 ], [ 1.000000e+00, %if.then3.i262 ], [ 0.000000e+00, %if.then.i258 ] %sub14 = fsub double 1.000000e+00, %t13.0 store double %sub14, ptr %uvw, align 8 - %arrayidx.i.i275 = getelementptr inbounds i8, ptr %uvw, i64 8 + %arrayidx.i.i275 = getelementptr inbounds nuw i8, ptr %uvw, i64 8 store double %t13.0, ptr %arrayidx.i.i275, align 8 br label %return @@ -438,7 +438,7 @@ if.end23: ; preds = %if.end18 br i1 %or.cond104, label %if.end31, label %if.then29 if.then29: ; preds = %if.end23 - %arrayidx.i.i294 = getelementptr inbounds i8, ptr %uvw, i64 8 + %arrayidx.i.i294 = getelementptr inbounds nuw i8, ptr %uvw, i64 8 store double 1.000000e+00, ptr %arrayidx.i.i294, align 8 tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %agg.result, ptr noundef nonnull align 8 dereferenceable(24) %b, i64 24, i1 false) br label %return @@ -457,7 +457,7 @@ if.end31: ; preds = %if.end23 if.then38: ; preds = %if.end31 %sub39 = fsub double %36, %85 %div = fdiv double %36, %sub39 - %arrayidx.i.i295 = getelementptr inbounds i8, ptr %uvw, i64 8 + %arrayidx.i.i295 = getelementptr inbounds nuw i8, ptr %uvw, i64 8 store double %div, ptr %arrayidx.i.i295, align 8 %sub42 = fsub double 1.000000e+00, %div store double %sub42, ptr %uvw, align 8 @@ -468,11 +468,11 @@ if.then38: ; preds = %if.end31 %90 = load double, ptr %agg.result, align 8, !alias.scope !14 %add.i.i = fadd double %mul.i.i.i299, %90 store double %add.i.i, ptr %agg.result, align 8, !alias.scope !14 - %arrayidx4.i.i303 = getelementptr inbounds i8, ptr %agg.result, i64 8 + %arrayidx4.i.i303 = getelementptr inbounds nuw i8, ptr %agg.result, i64 8 %91 = load double, ptr %arrayidx4.i.i303, align 8, !alias.scope !14 %add5.i.i = fadd double %mul4.i.i.i300, %91 store double %add5.i.i, ptr %arrayidx4.i.i303, align 8, !alias.scope !14 - %arrayidx8.i.i305 = getelementptr inbounds i8, ptr %agg.result, i64 16 + %arrayidx8.i.i305 = getelementptr inbounds nuw i8, ptr %agg.result, i64 16 %92 = load double, ptr %arrayidx8.i.i305, align 8, !alias.scope !14 %add9.i.i = fadd double %mul7.i.i.i301, %92 store double %add9.i.i, ptr %arrayidx8.i.i305, align 8, !alias.scope !14 @@ -494,7 +494,7 @@ if.end45: ; preds = %if.end31 br i1 %or.cond105, label %if.end53, label %if.then51 if.then51: ; preds = %if.end45 - %arrayidx.i.i323 = getelementptr inbounds i8, ptr %uvw, i64 16 + %arrayidx.i.i323 = getelementptr inbounds nuw i8, ptr %uvw, i64 16 store double 1.000000e+00, ptr %arrayidx.i.i323, align 8 tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %agg.result, ptr noundef nonnull align 8 dereferenceable(24) %c, i64 24, i1 false) br label %return @@ -513,7 +513,7 @@ if.end53: ; preds = %if.end45 if.then61: ; preds = %if.end53 %sub62 = fsub double %38, %96 %div63 = fdiv double %38, %sub62 - %arrayidx.i.i324 = getelementptr inbounds i8, ptr %uvw, i64 16 + %arrayidx.i.i324 = getelementptr inbounds nuw i8, ptr %uvw, i64 16 store double %div63, ptr %arrayidx.i.i324, align 8 %sub66 = fsub double 1.000000e+00, %div63 store double %sub66, ptr %uvw, align 8 @@ -524,11 +524,11 @@ if.then61: ; preds = %if.end53 %99 = load double, ptr %agg.result, align 8, !alias.scope !17 %add.i.i333 = fadd double %mul.i.i.i328, %99 store double %add.i.i333, ptr %agg.result, align 8, !alias.scope !17 - %arrayidx4.i.i335 = getelementptr inbounds i8, ptr %agg.result, i64 8 + %arrayidx4.i.i335 = getelementptr inbounds nuw i8, ptr %agg.result, i64 8 %100 = load double, ptr %arrayidx4.i.i335, align 8, !alias.scope !17 %add5.i.i336 = fadd double %mul4.i.i.i330, %100 store double %add5.i.i336, ptr %arrayidx4.i.i335, align 8, !alias.scope !17 - %arrayidx8.i.i338 = getelementptr inbounds i8, ptr %agg.result, i64 16 + %arrayidx8.i.i338 = getelementptr inbounds nuw i8, ptr %agg.result, i64 16 %101 = load double, ptr %arrayidx8.i.i338, align 8, !alias.scope !17 %add9.i.i339 = fadd double %mul7.i.i.i332, %101 store double %add9.i.i339, ptr %arrayidx8.i.i338, align 8, !alias.scope !17 @@ -554,10 +554,10 @@ land.lhs.true77: ; preds = %land.lhs.true74 if.then80: ; preds = %land.lhs.true77 %add = fadd double %sub75, %sub78 %div84 = fdiv double %sub75, %add - %arrayidx.i.i340 = getelementptr inbounds i8, ptr %uvw, i64 16 + %arrayidx.i.i340 = getelementptr inbounds nuw i8, ptr %uvw, i64 16 store double %div84, ptr %arrayidx.i.i340, align 8 %sub87 = fsub double 1.000000e+00, %div84 - %arrayidx.i.i342 = getelementptr inbounds i8, ptr %uvw, i64 8 + %arrayidx.i.i342 = getelementptr inbounds nuw i8, ptr %uvw, i64 8 store double %sub87, ptr %arrayidx.i.i342, align 8 %ref.tmp91.sroa.0.0.copyload = load double, ptr %c, align 8 %ref.tmp91.sroa.4.0.copyload = load double, ptr %ac.sroa.8.0.c.sroa_idx, align 8 @@ -575,11 +575,11 @@ if.then80: ; preds = %land.lhs.true77 %107 = load double, ptr %agg.result, align 8, !alias.scope !23 %add.i.i356 = fadd double %mul.i.i.i351, %107 store double %add.i.i356, ptr %agg.result, align 8, !alias.scope !23 - %arrayidx4.i.i358 = getelementptr inbounds i8, ptr %agg.result, i64 8 + %arrayidx4.i.i358 = getelementptr inbounds nuw i8, ptr %agg.result, i64 8 %108 = load double, ptr %arrayidx4.i.i358, align 8, !alias.scope !23 %add5.i.i359 = fadd double %mul4.i.i.i353, %108 store double %add5.i.i359, ptr %arrayidx4.i.i358, align 8, !alias.scope !23 - %arrayidx8.i.i361 = getelementptr inbounds i8, ptr %agg.result, i64 16 + %arrayidx8.i.i361 = getelementptr inbounds nuw i8, ptr %agg.result, i64 16 %109 = load double, ptr %arrayidx8.i.i361, align 8, !alias.scope !23 %add9.i.i362 = fadd double %mul7.i.i.i355, %109 store double %add9.i.i362, ptr %arrayidx8.i.i361, align 8, !alias.scope !23 @@ -590,10 +590,10 @@ if.end92: ; preds = %land.lhs.true77, %l %add94 = fadd double %89, %add93 %div95 = fdiv double 1.000000e+00, %add94 %mul = fmul double %89, %div95 - %arrayidx.i.i363 = getelementptr inbounds i8, ptr %uvw, i64 16 + %arrayidx.i.i363 = getelementptr inbounds nuw i8, ptr %uvw, i64 16 store double %mul, ptr %arrayidx.i.i363, align 8 %mul97 = fmul double %98, %div95 - %arrayidx.i.i364 = getelementptr inbounds i8, ptr %uvw, i64 8 + %arrayidx.i.i364 = getelementptr inbounds nuw i8, ptr %uvw, i64 8 store double %mul97, ptr %arrayidx.i.i364, align 8 %sub100 = fsub double 1.000000e+00, %mul97 %sub102 = fsub double %sub100, %mul @@ -610,8 +610,8 @@ if.end92: ; preds = %land.lhs.true77, %l %mul.i.i377 = fmul double %sub.i.i134, %mul %mul4.i.i379 = fmul double %sub5.i.i137, %mul %mul7.i.i381 = fmul double %sub9.i.i140, %mul - %ref.tmp104.sroa.4.0.agg.result.sroa_idx = getelementptr inbounds i8, ptr %agg.result, i64 8 - %ref.tmp104.sroa.6.0.agg.result.sroa_idx = getelementptr inbounds i8, ptr %agg.result, i64 16 + %ref.tmp104.sroa.4.0.agg.result.sroa_idx = getelementptr inbounds nuw i8, ptr %agg.result, i64 8 + %ref.tmp104.sroa.6.0.agg.result.sroa_idx = getelementptr inbounds nuw i8, ptr %agg.result, i64 16 %add.i.i382 = fadd double %mul.i.i377, %add.i.i369 store double %add.i.i382, ptr %agg.result, align 8, !alias.scope !26 %add5.i.i385 = fadd double %mul4.i.i379, %add5.i.i372 @@ -631,22 +631,22 @@ declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias define void @_ZN7openvdb5v11_04math28closestPointOnSegmentToPointERKNS1_4Vec3IdEES5_S5_Rd(ptr noalias nocapture sret(%"class.openvdb::v11_0::math::Vec3") align 8 %agg.result, ptr nocapture noundef nonnull readonly align 8 dereferenceable(24) %a, ptr nocapture noundef nonnull readonly align 8 dereferenceable(24) %b, ptr nocapture noundef nonnull readonly align 8 dereferenceable(24) %p, ptr nocapture noundef nonnull writeonly align 8 dereferenceable(8) %t) local_unnamed_addr #3 { entry: %ab.sroa.0.0.copyload = load double, ptr %b, align 8 - %ab.sroa.7.0.b.sroa_idx = getelementptr inbounds i8, ptr %b, i64 8 + %ab.sroa.7.0.b.sroa_idx = getelementptr inbounds nuw i8, ptr %b, i64 8 %ab.sroa.7.0.copyload = load double, ptr %ab.sroa.7.0.b.sroa_idx, align 8 - %ab.sroa.13.0.b.sroa_idx = getelementptr inbounds i8, ptr %b, i64 16 + %ab.sroa.13.0.b.sroa_idx = getelementptr inbounds nuw i8, ptr %b, i64 16 %ab.sroa.13.0.copyload = load double, ptr %ab.sroa.13.0.b.sroa_idx, align 8 %0 = load double, ptr %a, align 8, !noalias !29 %sub.i.i = fsub double %ab.sroa.0.0.copyload, %0 - %arrayidx.i.i.i.i = getelementptr inbounds i8, ptr %a, i64 8 + %arrayidx.i.i.i.i = getelementptr inbounds nuw i8, ptr %a, i64 8 %1 = load double, ptr %arrayidx.i.i.i.i, align 8, !noalias !29 %sub5.i.i = fsub double %ab.sroa.7.0.copyload, %1 - %arrayidx.i.i3.i.i = getelementptr inbounds i8, ptr %a, i64 16 + %arrayidx.i.i3.i.i = getelementptr inbounds nuw i8, ptr %a, i64 16 %2 = load double, ptr %arrayidx.i.i3.i.i, align 8, !noalias !29 %sub9.i.i = fsub double %ab.sroa.13.0.copyload, %2 %ref.tmp.sroa.0.0.copyload = load double, ptr %p, align 8 - %ref.tmp.sroa.4.0.p.sroa_idx = getelementptr inbounds i8, ptr %p, i64 8 + %ref.tmp.sroa.4.0.p.sroa_idx = getelementptr inbounds nuw i8, ptr %p, i64 8 %ref.tmp.sroa.4.0.copyload = load double, ptr %ref.tmp.sroa.4.0.p.sroa_idx, align 8 - %ref.tmp.sroa.7.0.p.sroa_idx = getelementptr inbounds i8, ptr %p, i64 16 + %ref.tmp.sroa.7.0.p.sroa_idx = getelementptr inbounds nuw i8, ptr %p, i64 16 %ref.tmp.sroa.7.0.copyload = load double, ptr %ref.tmp.sroa.7.0.p.sroa_idx, align 8 %sub.i.i13 = fsub double %ref.tmp.sroa.0.0.copyload, %0 %sub5.i.i16 = fsub double %ref.tmp.sroa.4.0.copyload, %1 @@ -684,11 +684,11 @@ if.else4: ; preds = %if.else %7 = load double, ptr %agg.result, align 8, !alias.scope !30 %add.i.i = fadd double %mul.i.i, %7 store double %add.i.i, ptr %agg.result, align 8, !alias.scope !30 - %arrayidx4.i.i26 = getelementptr inbounds i8, ptr %agg.result, i64 8 + %arrayidx4.i.i26 = getelementptr inbounds nuw i8, ptr %agg.result, i64 8 %8 = load double, ptr %arrayidx4.i.i26, align 8, !alias.scope !30 %add5.i.i = fadd double %mul4.i.i, %8 store double %add5.i.i, ptr %arrayidx4.i.i26, align 8, !alias.scope !30 - %arrayidx8.i.i28 = getelementptr inbounds i8, ptr %agg.result, i64 16 + %arrayidx8.i.i28 = getelementptr inbounds nuw i8, ptr %agg.result, i64 16 %9 = load double, ptr %arrayidx8.i.i28, align 8, !alias.scope !30 %add9.i.i = fadd double %mul7.i.i, %9 store double %add9.i.i, ptr %arrayidx8.i.i28, align 8, !alias.scope !30 diff --git a/bench/qoi/optimized/qoi.ll b/bench/qoi/optimized/qoi.ll index 7d29e3382cf..2863e7816f0 100644 --- a/bench/qoi/optimized/qoi.ll +++ b/bench/qoi/optimized/qoi.ll @@ -24,20 +24,20 @@ define dso_local noalias noundef ptr @qoi_encode(ptr noundef readonly %0, ptr no br i1 %10, label %168, label %11 11: ; preds = %8 - %12 = getelementptr inbounds i8, ptr %1, i64 4 + %12 = getelementptr inbounds nuw i8, ptr %1, i64 4 %13 = load i32, ptr %12, align 4 %14 = icmp eq i32 %13, 0 br i1 %14, label %168, label %15 15: ; preds = %11 - %16 = getelementptr inbounds i8, ptr %1, i64 8 + %16 = getelementptr inbounds nuw i8, ptr %1, i64 8 %17 = load i8, ptr %16, align 4 %18 = add i8 %17, -5 %or.cond186 = icmp ult i8 %18, -2 br i1 %or.cond186, label %168, label %19 19: ; preds = %15 - %20 = getelementptr inbounds i8, ptr %1, i64 9 + %20 = getelementptr inbounds nuw i8, ptr %1, i64 9 %21 = load i8, ptr %20, align 1 %22 = icmp ugt i8 %21, 1 br i1 %22, label %168, label %23 @@ -72,33 +72,33 @@ define dso_local noalias noundef ptr @qoi_encode(ptr noundef readonly %0, ptr no store i8 %37, ptr %38, align 1 %39 = lshr i32 %9, 16 %40 = trunc i32 %39 to i8 - %41 = getelementptr inbounds i8, ptr %31, i64 5 + %41 = getelementptr inbounds nuw i8, ptr %31, i64 5 store i8 %40, ptr %41, align 1 %42 = lshr i32 %9, 8 %43 = trunc i32 %42 to i8 - %44 = getelementptr inbounds i8, ptr %31, i64 6 + %44 = getelementptr inbounds nuw i8, ptr %31, i64 6 store i8 %43, ptr %44, align 1 %45 = trunc i32 %9 to i8 - %46 = getelementptr inbounds i8, ptr %31, i64 7 + %46 = getelementptr inbounds nuw i8, ptr %31, i64 7 store i8 %45, ptr %46, align 1 %47 = lshr i32 %13, 24 %48 = trunc nuw i32 %47 to i8 - %49 = getelementptr inbounds i8, ptr %31, i64 8 + %49 = getelementptr inbounds nuw i8, ptr %31, i64 8 store i8 %48, ptr %49, align 1 %50 = lshr i32 %13, 16 %51 = trunc i32 %50 to i8 - %52 = getelementptr inbounds i8, ptr %31, i64 9 + %52 = getelementptr inbounds nuw i8, ptr %31, i64 9 store i8 %51, ptr %52, align 1 %53 = lshr i32 %13, 8 %54 = trunc i32 %53 to i8 - %55 = getelementptr inbounds i8, ptr %31, i64 10 + %55 = getelementptr inbounds nuw i8, ptr %31, i64 10 store i8 %54, ptr %55, align 1 %56 = trunc i32 %13 to i8 - %57 = getelementptr inbounds i8, ptr %31, i64 11 + %57 = getelementptr inbounds nuw i8, ptr %31, i64 11 store i8 %56, ptr %57, align 1 - %58 = getelementptr inbounds i8, ptr %31, i64 12 + %58 = getelementptr inbounds nuw i8, ptr %31, i64 12 store i8 %17, ptr %58, align 1 - %59 = getelementptr inbounds i8, ptr %31, i64 13 + %59 = getelementptr inbounds nuw i8, ptr %31, i64 13 store i8 %21, ptr %59, align 1 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(256) %4, i8 0, i64 256, i1 false) %60 = zext nneg i8 %17 to i32 @@ -135,16 +135,16 @@ define dso_local noalias noundef ptr @qoi_encode(ptr noundef readonly %0, ptr no %.sroa.5.0229 = phi i8 [ 0, %.lr.ph ], [ %75, %166 ] %.sroa.7.0228 = phi i8 [ 0, %.lr.ph ], [ %77, %166 ] %.0210227 = phi i32 [ 14, %.lr.ph ], [ %.1211, %166 ] - %72 = getelementptr inbounds i8, ptr %0, i64 %indvars.iv + %72 = getelementptr inbounds nuw i8, ptr %0, i64 %indvars.iv %73 = load i8, ptr %72, align 1 - %74 = getelementptr inbounds i8, ptr %72, i64 1 + %74 = getelementptr inbounds nuw i8, ptr %72, i64 1 %75 = load i8, ptr %74, align 1 - %76 = getelementptr inbounds i8, ptr %72, i64 2 + %76 = getelementptr inbounds nuw i8, ptr %72, i64 2 %77 = load i8, ptr %76, align 1 br i1 %64, label %78, label %81 78: ; preds = %71 - %79 = getelementptr inbounds i8, ptr %72, i64 3 + %79 = getelementptr inbounds nuw i8, ptr %72, i64 3 %80 = load i8, ptr %79, align 1 br label %81 @@ -215,7 +215,7 @@ define dso_local noalias noundef ptr @qoi_encode(ptr noundef readonly %0, ptr no %109 = add nuw nsw i32 %107, %108 %110 = and i32 %109, 63 %111 = zext nneg i32 %110 to i64 - %112 = getelementptr inbounds [64 x %union.qoi_rgba_t], ptr %4, i64 0, i64 %111 + %112 = getelementptr inbounds nuw [64 x %union.qoi_rgba_t], ptr %4, i64 0, i64 %111 %113 = load i32, ptr %112, align 4 %114 = icmp eq i32 %113, %.sroa.066.0.insert.insert br i1 %114, label %115, label %120 @@ -230,11 +230,11 @@ define dso_local noalias noundef ptr @qoi_encode(ptr noundef readonly %0, ptr no 120: ; preds = %102 store i8 %73, ptr %112, align 4 - %.sroa.10.0..sroa_idx = getelementptr inbounds i8, ptr %112, i64 1 + %.sroa.10.0..sroa_idx = getelementptr inbounds nuw i8, ptr %112, i64 1 store i8 %75, ptr %.sroa.10.0..sroa_idx, align 1 - %.sroa.17.0..sroa_idx = getelementptr inbounds i8, ptr %112, i64 2 + %.sroa.17.0..sroa_idx = getelementptr inbounds nuw i8, ptr %112, i64 2 store i8 %77, ptr %.sroa.17.0..sroa_idx, align 2 - %.sroa.24.0..sroa_idx = getelementptr inbounds i8, ptr %112, i64 3 + %.sroa.24.0..sroa_idx = getelementptr inbounds nuw i8, ptr %112, i64 3 store i8 %.sroa.24.1, ptr %.sroa.24.0..sroa_idx, align 1 %121 = icmp eq i8 %.sroa.24.1, %.sroa.24.0231 br i1 %121, label %122, label %162 @@ -359,7 +359,7 @@ define dso_local noalias noundef ptr @qoi_decode(ptr noundef readonly %0, i32 no 13: ; preds = %8 %14 = load i8, ptr %0, align 1 %15 = zext i8 %14 to i32 - %16 = getelementptr inbounds i8, ptr %0, i64 1 + %16 = getelementptr inbounds nuw i8, ptr %0, i64 1 %17 = load i8, ptr %16, align 1 %18 = zext i8 %17 to i32 %19 = getelementptr i8, ptr %0, i64 2 @@ -377,13 +377,13 @@ define dso_local noalias noundef ptr @qoi_decode(ptr noundef readonly %0, i32 no %31 = getelementptr i8, ptr %0, i64 4 %32 = load i8, ptr %31, align 1 %33 = zext i8 %32 to i32 - %34 = getelementptr inbounds i8, ptr %0, i64 5 + %34 = getelementptr inbounds nuw i8, ptr %0, i64 5 %35 = load i8, ptr %34, align 1 %36 = zext i8 %35 to i32 - %37 = getelementptr inbounds i8, ptr %0, i64 6 + %37 = getelementptr inbounds nuw i8, ptr %0, i64 6 %38 = load i8, ptr %37, align 1 %39 = zext i8 %38 to i32 - %40 = getelementptr inbounds i8, ptr %0, i64 7 + %40 = getelementptr inbounds nuw i8, ptr %0, i64 7 %41 = load i8, ptr %40, align 1 %42 = zext i8 %41 to i32 %43 = shl nuw i32 %33, 24 @@ -393,16 +393,16 @@ define dso_local noalias noundef ptr @qoi_decode(ptr noundef readonly %0, i32 no %47 = or disjoint i32 %45, %46 %48 = or disjoint i32 %47, %42 store i32 %48, ptr %2, align 4 - %49 = getelementptr inbounds i8, ptr %0, i64 8 + %49 = getelementptr inbounds nuw i8, ptr %0, i64 8 %50 = load i8, ptr %49, align 1 %51 = zext i8 %50 to i32 - %52 = getelementptr inbounds i8, ptr %0, i64 9 + %52 = getelementptr inbounds nuw i8, ptr %0, i64 9 %53 = load i8, ptr %52, align 1 %54 = zext i8 %53 to i32 - %55 = getelementptr inbounds i8, ptr %0, i64 10 + %55 = getelementptr inbounds nuw i8, ptr %0, i64 10 %56 = load i8, ptr %55, align 1 %57 = zext i8 %56 to i32 - %58 = getelementptr inbounds i8, ptr %0, i64 11 + %58 = getelementptr inbounds nuw i8, ptr %0, i64 11 %59 = load i8, ptr %58, align 1 %60 = zext i8 %59 to i32 %61 = shl nuw i32 %51, 24 @@ -411,15 +411,15 @@ define dso_local noalias noundef ptr @qoi_decode(ptr noundef readonly %0, i32 no %64 = shl nuw nsw i32 %57, 8 %65 = or disjoint i32 %63, %64 %66 = or disjoint i32 %65, %60 - %67 = getelementptr inbounds i8, ptr %2, i64 4 + %67 = getelementptr inbounds nuw i8, ptr %2, i64 4 store i32 %66, ptr %67, align 4 - %68 = getelementptr inbounds i8, ptr %0, i64 12 + %68 = getelementptr inbounds nuw i8, ptr %0, i64 12 %69 = load i8, ptr %68, align 1 - %70 = getelementptr inbounds i8, ptr %2, i64 8 + %70 = getelementptr inbounds nuw i8, ptr %2, i64 8 store i8 %69, ptr %70, align 4 - %71 = getelementptr inbounds i8, ptr %0, i64 13 + %71 = getelementptr inbounds nuw i8, ptr %0, i64 13 %72 = load i8, ptr %71, align 1 - %73 = getelementptr inbounds i8, ptr %2, i64 9 + %73 = getelementptr inbounds nuw i8, ptr %2, i64 9 store i8 %72, ptr %73, align 1 %74 = icmp eq i32 %48, 0 %75 = icmp eq i32 %66, 0 @@ -529,13 +529,13 @@ define dso_local noalias noundef ptr @qoi_decode(ptr noundef readonly %0, i32 no 124: ; preds = %122 %125 = zext i8 %105 to i64 - %126 = getelementptr inbounds [64 x %union.qoi_rgba_t], ptr %5, i64 0, i64 %125 + %126 = getelementptr inbounds nuw [64 x %union.qoi_rgba_t], ptr %5, i64 0, i64 %125 %.sroa.0.0.copyload = load i8, ptr %126, align 4 - %.sroa.11.0..sroa_idx = getelementptr inbounds i8, ptr %126, i64 1 + %.sroa.11.0..sroa_idx = getelementptr inbounds nuw i8, ptr %126, i64 1 %.sroa.11.0.copyload = load i8, ptr %.sroa.11.0..sroa_idx, align 1 - %.sroa.20.0..sroa_idx = getelementptr inbounds i8, ptr %126, i64 2 + %.sroa.20.0..sroa_idx = getelementptr inbounds nuw i8, ptr %126, i64 2 %.sroa.20.0.copyload = load i8, ptr %.sroa.20.0..sroa_idx, align 2 - %.sroa.29.0..sroa_idx = getelementptr inbounds i8, ptr %126, i64 3 + %.sroa.29.0..sroa_idx = getelementptr inbounds nuw i8, ptr %126, i64 3 %.sroa.29.0.copyload = load i8, ptr %.sroa.29.0..sroa_idx, align 1 br label %160 @@ -600,13 +600,13 @@ default.unreachable: ; preds = %122 %170 = mul nuw nsw i64 %169, 11 %171 = add nuw nsw i64 %168, %170 %172 = and i64 %171, 63 - %173 = getelementptr inbounds [64 x %union.qoi_rgba_t], ptr %5, i64 0, i64 %172 + %173 = getelementptr inbounds nuw [64 x %union.qoi_rgba_t], ptr %5, i64 0, i64 %172 store i8 %.sroa.0.2, ptr %173, align 4 - %.sroa.11.0..sroa_idx41 = getelementptr inbounds i8, ptr %173, i64 1 + %.sroa.11.0..sroa_idx41 = getelementptr inbounds nuw i8, ptr %173, i64 1 store i8 %.sroa.11.2, ptr %.sroa.11.0..sroa_idx41, align 1 - %.sroa.20.0..sroa_idx46 = getelementptr inbounds i8, ptr %173, i64 2 + %.sroa.20.0..sroa_idx46 = getelementptr inbounds nuw i8, ptr %173, i64 2 store i8 %.sroa.20.2, ptr %.sroa.20.0..sroa_idx46, align 2 - %.sroa.29.0..sroa_idx51 = getelementptr inbounds i8, ptr %173, i64 3 + %.sroa.29.0..sroa_idx51 = getelementptr inbounds nuw i8, ptr %173, i64 3 store i8 %.sroa.29.2, ptr %.sroa.29.0..sroa_idx51, align 1 br label %174 @@ -617,7 +617,7 @@ default.unreachable: ; preds = %122 %.sroa.20.1 = phi i8 [ %.sroa.20.0136, %97 ], [ %.sroa.20.2, %160 ], [ %.sroa.20.0136, %99 ] %.1 = phi i32 [ %98, %97 ], [ %.2, %160 ], [ 0, %99 ] %.sroa.29.1 = phi i8 [ %.sroa.29.0139, %97 ], [ %.sroa.29.2, %160 ], [ %.sroa.29.0139, %99 ] - %175 = getelementptr inbounds i8, ptr %89, i64 %indvars.iv + %175 = getelementptr inbounds nuw i8, ptr %89, i64 %indvars.iv store i8 %.sroa.0.1, ptr %175, align 1 %176 = getelementptr i8, ptr %175, i64 1 store i8 %.sroa.11.1, ptr %176, align 1 diff --git a/bench/quest/optimized/mt19937ar.c.ll b/bench/quest/optimized/mt19937ar.c.ll index 19614eed9eb..0a448fb5f34 100644 --- a/bench/quest/optimized/mt19937ar.c.ll +++ b/bench/quest/optimized/mt19937ar.c.ll @@ -20,7 +20,7 @@ define void @init_genrand(i64 noundef %0) local_unnamed_addr #0 { %6 = xor i64 %5, %4 %7 = mul nuw nsw i64 %6, 1812433253 %8 = add nuw i64 %7, %indvars.iv - %9 = getelementptr inbounds [624 x i64], ptr @mt, i64 0, i64 %indvars.iv + %9 = getelementptr inbounds nuw [624 x i64], ptr @mt, i64 0, i64 %indvars.iv %10 = and i64 %8, 4294967295 store i64 %10, ptr %9, align 8 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 @@ -44,7 +44,7 @@ define void @init_by_array(ptr nocapture noundef readonly %0, i32 noundef %1) lo %6 = xor i64 %5, %4 %7 = mul nuw nsw i64 %6, 1812433253 %8 = add nuw i64 %7, %indvars.iv.i - %9 = getelementptr inbounds [624 x i64], ptr @mt, i64 0, i64 %indvars.iv.i + %9 = getelementptr inbounds nuw [624 x i64], ptr @mt, i64 0, i64 %indvars.iv.i %10 = and i64 %8, 4294967295 store i64 %10, ptr %9, align 8 %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 @@ -169,7 +169,7 @@ init_genrand.exit.preheader: ; preds = %7, %._crit_edge39 %10 = xor i64 %9, %8 %11 = mul nuw nsw i64 %10, 1812433253 %12 = add nuw i64 %11, %indvars.iv.i - %13 = getelementptr inbounds [624 x i64], ptr @mt, i64 0, i64 %indvars.iv.i + %13 = getelementptr inbounds nuw [624 x i64], ptr @mt, i64 0, i64 %indvars.iv.i %14 = and i64 %12, 4294967295 store i64 %14, ptr %13, align 8 %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 @@ -177,25 +177,25 @@ init_genrand.exit.preheader: ; preds = %7, %._crit_edge39 br i1 %exitcond.not.i, label %init_genrand.exit.preheader, label %7 .lr.ph.preheader: ; preds = %init_genrand.exit - %.pre35 = load i64, ptr getelementptr inbounds (i8, ptr @mt, i64 1816), align 8 + %.pre35 = load i64, ptr getelementptr inbounds nuw (i8, ptr @mt, i64 1816), align 8 br label %.lr.ph init_genrand.exit: ; preds = %init_genrand.exit.preheader, %init_genrand.exit %15 = phi i64 [ %19, %init_genrand.exit ], [ %.ph, %init_genrand.exit.preheader ] %indvars.iv = phi i64 [ %indvars.iv.next, %init_genrand.exit ], [ 0, %init_genrand.exit.preheader ] - %16 = getelementptr inbounds [624 x i64], ptr @mt, i64 0, i64 %indvars.iv + %16 = getelementptr inbounds nuw [624 x i64], ptr @mt, i64 0, i64 %indvars.iv %17 = and i64 %15, 2147483648 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 - %18 = getelementptr inbounds [624 x i64], ptr @mt, i64 0, i64 %indvars.iv.next + %18 = getelementptr inbounds nuw [624 x i64], ptr @mt, i64 0, i64 %indvars.iv.next %19 = load i64, ptr %18, align 8 %20 = and i64 %19, 2147483646 %21 = or disjoint i64 %20, %17 %22 = add nuw nsw i64 %indvars.iv, 397 - %23 = getelementptr inbounds [624 x i64], ptr @mt, i64 0, i64 %22 + %23 = getelementptr inbounds nuw [624 x i64], ptr @mt, i64 0, i64 %22 %24 = load i64, ptr %23, align 8 %25 = lshr exact i64 %21, 1 %26 = and i64 %19, 1 - %27 = getelementptr inbounds [2 x i64], ptr @genrand_int32.mag01, i64 0, i64 %26 + %27 = getelementptr inbounds nuw [2 x i64], ptr @genrand_int32.mag01, i64 0, i64 %26 %28 = load i64, ptr %27, align 8 %29 = xor i64 %28, %24 %30 = xor i64 %29, %25 @@ -206,19 +206,19 @@ init_genrand.exit: ; preds = %init_genrand.exit.p .lr.ph: ; preds = %.lr.ph.preheader, %.lr.ph %31 = phi i64 [ %.pre35, %.lr.ph.preheader ], [ %35, %.lr.ph ] %indvars.iv31 = phi i64 [ 227, %.lr.ph.preheader ], [ %indvars.iv.next32, %.lr.ph ] - %32 = getelementptr inbounds [624 x i64], ptr @mt, i64 0, i64 %indvars.iv31 + %32 = getelementptr inbounds nuw [624 x i64], ptr @mt, i64 0, i64 %indvars.iv31 %33 = and i64 %31, 2147483648 %indvars.iv.next32 = add nuw nsw i64 %indvars.iv31, 1 - %34 = getelementptr inbounds [624 x i64], ptr @mt, i64 0, i64 %indvars.iv.next32 + %34 = getelementptr inbounds nuw [624 x i64], ptr @mt, i64 0, i64 %indvars.iv.next32 %35 = load i64, ptr %34, align 8 %36 = and i64 %35, 2147483646 %37 = or disjoint i64 %36, %33 %38 = add nsw i64 %indvars.iv31, -227 - %39 = getelementptr inbounds [624 x i64], ptr @mt, i64 0, i64 %38 + %39 = getelementptr inbounds nuw [624 x i64], ptr @mt, i64 0, i64 %38 %40 = load i64, ptr %39, align 8 %41 = lshr exact i64 %37, 1 %42 = and i64 %35, 1 - %43 = getelementptr inbounds [2 x i64], ptr @genrand_int32.mag01, i64 0, i64 %42 + %43 = getelementptr inbounds nuw [2 x i64], ptr @genrand_int32.mag01, i64 0, i64 %42 %44 = load i64, ptr %43, align 8 %45 = xor i64 %44, %40 %46 = xor i64 %45, %41 @@ -235,7 +235,7 @@ init_genrand.exit: ; preds = %init_genrand.exit.p %52 = load i64, ptr getelementptr inbounds (i8, ptr @mt, i64 3168), align 16 %53 = lshr exact i64 %51, 1 %54 = and i64 %49, 1 - %55 = getelementptr inbounds [2 x i64], ptr @genrand_int32.mag01, i64 0, i64 %54 + %55 = getelementptr inbounds nuw [2 x i64], ptr @genrand_int32.mag01, i64 0, i64 %54 %56 = load i64, ptr %55, align 8 %57 = xor i64 %56, %52 %58 = xor i64 %57, %53 diff --git a/bench/quickjs/optimized/qjsc.ll b/bench/quickjs/optimized/qjsc.ll index efe827f7010..9800dfe573b 100644 --- a/bench/quickjs/optimized/qjsc.ll +++ b/bench/quickjs/optimized/qjsc.ll @@ -106,9 +106,9 @@ target triple = "x86_64-pc-linux-gnu" ; Function Attrs: mustprogress nounwind willreturn uwtable define dso_local void @namelist_add(ptr nocapture noundef %0, ptr nocapture noundef readonly %1, ptr noundef readonly %2, i32 noundef %3) local_unnamed_addr #0 { - %5 = getelementptr inbounds i8, ptr %0, i64 8 + %5 = getelementptr inbounds nuw i8, ptr %0, i64 8 %6 = load i32, ptr %5, align 8 - %7 = getelementptr inbounds i8, ptr %0, i64 12 + %7 = getelementptr inbounds nuw i8, ptr %0, i64 12 %8 = load i32, ptr %7, align 4 %9 = icmp eq i32 %6, %8 %.pre = load ptr, ptr %0, align 8 @@ -144,9 +144,9 @@ define dso_local void @namelist_add(ptr nocapture noundef %0, ptr nocapture noun 26: ; preds = %17, %24 %.sink = phi ptr [ %25, %24 ], [ null, %17 ] - %27 = getelementptr inbounds i8, ptr %22, i64 8 + %27 = getelementptr inbounds nuw i8, ptr %22, i64 8 store ptr %.sink, ptr %27, align 8 - %28 = getelementptr inbounds i8, ptr %22, i64 16 + %28 = getelementptr inbounds nuw i8, ptr %22, i64 16 store i32 %3, ptr %28, align 8 ret void } @@ -159,7 +159,7 @@ declare noalias ptr @strdup(ptr nocapture noundef readonly) local_unnamed_addr # ; Function Attrs: nounwind uwtable define dso_local void @namelist_free(ptr nocapture noundef %0) local_unnamed_addr #3 { - %2 = getelementptr inbounds i8, ptr %0, i64 8 + %2 = getelementptr inbounds nuw i8, ptr %0, i64 8 %3 = load i32, ptr %2, align 8 %4 = icmp sgt i32 %3, 0 br i1 %4, label %.lr.ph, label %._crit_edge @@ -173,7 +173,7 @@ define dso_local void @namelist_free(ptr nocapture noundef %0) local_unnamed_add %9 = getelementptr %struct.namelist_entry_t, ptr %6, i64 %8 %10 = load ptr, ptr %9, align 8 tail call void @free(ptr noundef %10) #17 - %11 = getelementptr inbounds i8, ptr %9, i64 8 + %11 = getelementptr inbounds nuw i8, ptr %9, i64 8 %12 = load ptr, ptr %11, align 8 tail call void @free(ptr noundef %12) #17 %13 = load i32, ptr %2, align 8 @@ -184,7 +184,7 @@ define dso_local void @namelist_free(ptr nocapture noundef %0) local_unnamed_add %15 = load ptr, ptr %0, align 8 tail call void @free(ptr noundef %15) #17 store ptr null, ptr %0, align 8 - %16 = getelementptr inbounds i8, ptr %0, i64 12 + %16 = getelementptr inbounds nuw i8, ptr %0, i64 12 store i32 0, ptr %16, align 4 ret void } @@ -194,7 +194,7 @@ declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #4 ; Function Attrs: nofree nounwind memory(read, inaccessiblemem: none) uwtable define dso_local noundef ptr @namelist_find(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1) local_unnamed_addr #5 { - %3 = getelementptr inbounds i8, ptr %0, i64 8 + %3 = getelementptr inbounds nuw i8, ptr %0, i64 8 %4 = load i32, ptr %3, align 8 %5 = icmp sgt i32 %4, 0 br i1 %5, label %.lr.ph, label %._crit_edge @@ -253,7 +253,7 @@ define dso_local ptr @jsc_module_loader(ptr noundef %0, ptr noundef %1, ptr noca br i1 %.not.i, label %namelist_find.exit, label %10 namelist_find.exit: ; preds = %11 - %15 = getelementptr inbounds i8, ptr %12, i64 8 + %15 = getelementptr inbounds nuw i8, ptr %12, i64 8 %16 = load ptr, ptr %15, align 8 %17 = load i32, ptr @init_module_list.1, align 8 %18 = load i32, ptr @init_module_list.2, align 8 @@ -291,9 +291,9 @@ namelist_find.exit: ; preds = %11 namelist_add.exit: ; preds = %27, %34 %.sink.i = phi ptr [ %35, %34 ], [ null, %27 ] - %36 = getelementptr inbounds i8, ptr %32, i64 8 + %36 = getelementptr inbounds nuw i8, ptr %32, i64 8 store ptr %.sink.i, ptr %36, align 8 - %37 = getelementptr inbounds i8, ptr %32, i64 16 + %37 = getelementptr inbounds nuw i8, ptr %32, i64 16 store i32 0, ptr %37, align 8 %38 = tail call ptr @JS_NewCModule(ptr noundef %0, ptr noundef %1, ptr noundef nonnull @js_module_dummy_init) #17 br label %JS_FreeValue.exit @@ -360,7 +360,7 @@ namelist_find.exit50: ; preds = %59 br i1 %64, label %65, label %67 65: ; preds = %namelist_find.exit50 - %66 = getelementptr inbounds i8, ptr %6, i64 1008 + %66 = getelementptr inbounds nuw i8, ptr %6, i64 1008 store i8 0, ptr %66, align 16 br label %67 @@ -558,9 +558,9 @@ namelist_add.exit: ; preds = %10, %14 %25 = getelementptr %struct.namelist_entry_t, ptr %22, i64 %24 %26 = call noalias ptr @strdup(ptr noundef nonnull readonly %4) #17 store ptr %26, ptr %25, align 8 - %27 = getelementptr inbounds i8, ptr %25, i64 8 + %27 = getelementptr inbounds nuw i8, ptr %25, i64 8 store ptr null, ptr %27, align 8 - %28 = getelementptr inbounds i8, ptr %25, i64 16 + %28 = getelementptr inbounds nuw i8, ptr %25, i64 16 store i32 %5, ptr %28, align 8 %29 = load i64, ptr %7, align 8 %30 = trunc i64 %29 to i32 @@ -712,9 +712,9 @@ namelist_add.exit: ; preds = %2, %19 %31 = tail call noalias dereferenceable_or_null(4) ptr @strdup(ptr noundef nonnull readonly @.str.4) #17 store ptr %31, ptr %30, align 8 %32 = tail call noalias dereferenceable_or_null(4) ptr @strdup(ptr noundef nonnull readonly @.str.4) #17 - %33 = getelementptr inbounds i8, ptr %30, i64 8 + %33 = getelementptr inbounds nuw i8, ptr %30, i64 8 store ptr %32, ptr %33, align 8 - %34 = getelementptr inbounds i8, ptr %30, i64 16 + %34 = getelementptr inbounds nuw i8, ptr %30, i64 16 store i32 0, ptr %34, align 8 %35 = load i32, ptr @cmodule_list.1, align 8 %36 = load i32, ptr @cmodule_list.2, align 8 @@ -744,9 +744,9 @@ namelist_add.exit137: ; preds = %namelist_add.exit, %50 = tail call noalias dereferenceable_or_null(3) ptr @strdup(ptr noundef nonnull readonly @.str.5) #17 store ptr %50, ptr %49, align 8 %51 = tail call noalias dereferenceable_or_null(3) ptr @strdup(ptr noundef nonnull readonly @.str.5) #17 - %52 = getelementptr inbounds i8, ptr %49, i64 8 + %52 = getelementptr inbounds nuw i8, ptr %49, i64 8 store ptr %51, ptr %52, align 8 - %53 = getelementptr inbounds i8, ptr %49, i64 16 + %53 = getelementptr inbounds nuw i8, ptr %49, i64 16 store i32 0, ptr %53, align 8 br label %54 @@ -913,9 +913,9 @@ namelist_add.exit140: ; preds = %91, %95 %107 = call noalias ptr @strdup(ptr noundef nonnull readonly %14) #17 store ptr %107, ptr %106, align 8 %108 = call noalias ptr @strdup(ptr noundef nonnull readonly %15) #17 - %109 = getelementptr inbounds i8, ptr %106, i64 8 + %109 = getelementptr inbounds nuw i8, ptr %106, i64 8 store ptr %108, ptr %109, align 8 - %110 = getelementptr inbounds i8, ptr %106, i64 16 + %110 = getelementptr inbounds nuw i8, ptr %106, i64 16 store i32 0, ptr %110, align 8 br label %.backedge @@ -941,9 +941,9 @@ namelist_add.exit143: ; preds = %111, %114 %123 = getelementptr %struct.namelist_entry_t, ptr %.sroa.0.2, i64 %122 %124 = call noalias ptr @strdup(ptr noundef readonly %112) #17 store ptr %124, ptr %123, align 8 - %125 = getelementptr inbounds i8, ptr %123, i64 8 + %125 = getelementptr inbounds nuw i8, ptr %123, i64 8 store ptr null, ptr %125, align 8 - %126 = getelementptr inbounds i8, ptr %123, i64 16 + %126 = getelementptr inbounds nuw i8, ptr %123, i64 16 store i32 0, ptr %126, align 8 br label %.backedge @@ -1211,7 +1211,7 @@ compile_file.exit: ; preds = %188, %191, %196 %indvars.iv238 = phi i64 [ %indvars.iv.next239, %.lr.ph191 ], [ 0, %221 ] %226 = load ptr, ptr @init_module_list.0, align 8 %227 = getelementptr %struct.namelist_entry_t, ptr %226, i64 %indvars.iv238 - %228 = getelementptr inbounds i8, ptr %227, i64 8 + %228 = getelementptr inbounds nuw i8, ptr %227, i64 8 %229 = load ptr, ptr %228, align 8 %230 = load ptr, ptr %227, align 8 %231 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %146, ptr noundef nonnull @.str.23, ptr noundef %229, ptr noundef %229, ptr noundef %230) #17 @@ -1226,7 +1226,7 @@ compile_file.exit: ; preds = %188, %191, %196 %236 = phi ptr [ %.pre252, %.lr.ph193.preheader ], [ %245, %243 ] %indvars.iv241 = phi i64 [ 0, %.lr.ph193.preheader ], [ %indvars.iv.next242, %243 ] %237 = getelementptr %struct.namelist_entry_t, ptr %236, i64 %indvars.iv241 - %238 = getelementptr inbounds i8, ptr %237, i64 16 + %238 = getelementptr inbounds nuw i8, ptr %237, i64 16 %239 = load i32, ptr %238, align 8 %.not131 = icmp eq i32 %239, 0 br i1 %.not131, label %243, label %240 @@ -1282,7 +1282,7 @@ compile_file.exit: ; preds = %188, %191, %196 %263 = phi ptr [ %.pre255, %.lr.ph197.preheader ], [ %272, %270 ] %indvars.iv244 = phi i64 [ 0, %.lr.ph197.preheader ], [ %indvars.iv.next245, %270 ] %264 = getelementptr %struct.namelist_entry_t, ptr %263, i64 %indvars.iv244 - %265 = getelementptr inbounds i8, ptr %264, i64 16 + %265 = getelementptr inbounds nuw i8, ptr %264, i64 16 %266 = load i32, ptr %265, align 8 %.not130 = icmp eq i32 %266, 0 br i1 %.not130, label %267, label %270 @@ -1350,27 +1350,27 @@ compile_file.exit: ; preds = %188, %191, %196 br label %291 291: ; preds = %288, %287 - %292 = getelementptr inbounds i8, ptr %4, i64 8 + %292 = getelementptr inbounds nuw i8, ptr %4, i64 8 store ptr @.str.66, ptr %4, align 16 - %293 = getelementptr inbounds i8, ptr %4, i64 16 + %293 = getelementptr inbounds nuw i8, ptr %4, i64 16 store ptr @.str.67, ptr %292, align 8 - %294 = getelementptr inbounds i8, ptr %4, i64 24 + %294 = getelementptr inbounds nuw i8, ptr %4, i64 24 store ptr @.str.68, ptr %293, align 16 - %295 = getelementptr inbounds i8, ptr %4, i64 32 + %295 = getelementptr inbounds nuw i8, ptr %4, i64 32 store ptr @.str.69, ptr %294, align 8 - %296 = getelementptr inbounds i8, ptr %4, i64 40 + %296 = getelementptr inbounds nuw i8, ptr %4, i64 40 store ptr @.str.70, ptr %295, align 16 - %297 = getelementptr inbounds i8, ptr %4, i64 48 + %297 = getelementptr inbounds nuw i8, ptr %4, i64 48 store ptr %7, ptr %296, align 8 - %298 = getelementptr inbounds i8, ptr %4, i64 56 + %298 = getelementptr inbounds nuw i8, ptr %4, i64 56 store ptr @.str.71, ptr %297, align 16 - %299 = getelementptr inbounds i8, ptr %4, i64 64 + %299 = getelementptr inbounds nuw i8, ptr %4, i64 64 store ptr %.299, ptr %298, align 8 %.b.i = load i1, ptr @dynamic_export, align 4 br i1 %.b.i, label %300, label %302 300: ; preds = %291 - %301 = getelementptr inbounds i8, ptr %4, i64 72 + %301 = getelementptr inbounds nuw i8, ptr %4, i64 72 store ptr @.str.72, ptr %299, align 16 br label %302 @@ -1464,7 +1464,7 @@ output_executable.exit: ; preds = %322 %336 = getelementptr %struct.namelist_entry_t, ptr %332, i64 %335 %337 = load ptr, ptr %336, align 8 call void @free(ptr noundef %337) #17 - %338 = getelementptr inbounds i8, ptr %336, i64 8 + %338 = getelementptr inbounds nuw i8, ptr %336, i64 8 %339 = load ptr, ptr %338, align 8 call void @free(ptr noundef %339) #17 %340 = icmp sgt i32 %334, 0 @@ -1494,7 +1494,7 @@ namelist_free.exit: ; preds = %namelist_free.exit. %348 = getelementptr %struct.namelist_entry_t, ptr %344, i64 %347 %349 = load ptr, ptr %348, align 8 call void @free(ptr noundef %349) #17 - %350 = getelementptr inbounds i8, ptr %348, i64 8 + %350 = getelementptr inbounds nuw i8, ptr %348, i64 8 %351 = load ptr, ptr %350, align 8 call void @free(ptr noundef %351) #17 %352 = icmp sgt i32 %346, 0 @@ -1524,7 +1524,7 @@ namelist_free.exit150: ; preds = %namelist_free.exit1 %360 = getelementptr %struct.namelist_entry_t, ptr %356, i64 %359 %361 = load ptr, ptr %360, align 8 call void @free(ptr noundef %361) #17 - %362 = getelementptr inbounds i8, ptr %360, i64 8 + %362 = getelementptr inbounds nuw i8, ptr %360, i64 8 %363 = load ptr, ptr %362, align 8 call void @free(ptr noundef %363) #17 %364 = icmp sgt i32 %358, 0 diff --git a/bench/re2/optimized/rune.cc.ll b/bench/re2/optimized/rune.cc.ll index 2850eb89b39..1345cfb44ce 100644 --- a/bench/re2/optimized/rune.cc.ll +++ b/bench/re2/optimized/rune.cc.ll @@ -12,7 +12,7 @@ entry: br i1 %cmp, label %return, label %if.end if.end: ; preds = %entry - %add.ptr = getelementptr inbounds i8, ptr %str, i64 1 + %add.ptr = getelementptr inbounds nuw i8, ptr %str, i64 1 %1 = load i8, ptr %add.ptr, align 1 %2 = xor i8 %1, -128 %xor = zext i8 %2 to i32 @@ -35,7 +35,7 @@ if.end8: ; preds = %if.then5 br i1 %cmp10, label %bad, label %return if.end13: ; preds = %if.end3 - %add.ptr14 = getelementptr inbounds i8, ptr %str, i64 2 + %add.ptr14 = getelementptr inbounds nuw i8, ptr %str, i64 2 %3 = load i8, ptr %add.ptr14, align 1 %4 = xor i8 %3, -128 %xor16 = zext i8 %4 to i32 @@ -59,7 +59,7 @@ if.end30: ; preds = %if.then22 br label %return if.end31: ; preds = %if.end20 - %add.ptr32 = getelementptr inbounds i8, ptr %str, i64 3 + %add.ptr32 = getelementptr inbounds nuw i8, ptr %str, i64 3 %7 = load i8, ptr %add.ptr32, align 1 %8 = xor i8 %7, -128 %tobool36 = icmp ult i8 %8, 64 @@ -116,7 +116,7 @@ if.then2: ; preds = %if.end %2 = trunc i32 %0 to i8 %3 = and i8 %2, 63 %conv8 = or disjoint i8 %3, -128 - %arrayidx9 = getelementptr inbounds i8, ptr %str, i64 1 + %arrayidx9 = getelementptr inbounds nuw i8, ptr %str, i64 1 store i8 %conv8, ptr %arrayidx9, align 1 br label %return @@ -124,7 +124,7 @@ if.end10: ; preds = %if.end %cmp11 = icmp ugt i32 %0, 1114111 %spec.store.select = select i1 %cmp11, i32 65533, i32 %0 %cmp14 = icmp ult i32 %spec.store.select, 65536 - %arrayidx26 = getelementptr inbounds i8, ptr %str, i64 1 + %arrayidx26 = getelementptr inbounds nuw i8, ptr %str, i64 1 br i1 %cmp14, label %if.then15, label %if.end31 if.then15: ; preds = %if.end10 @@ -140,7 +140,7 @@ if.then15: ; preds = %if.end10 %7 = trunc i32 %spec.store.select to i8 %8 = and i8 %7, 63 %conv29 = or disjoint i8 %8, -128 - %arrayidx30 = getelementptr inbounds i8, ptr %str, i64 2 + %arrayidx30 = getelementptr inbounds nuw i8, ptr %str, i64 2 store i8 %conv29, ptr %arrayidx30, align 1 br label %return @@ -158,12 +158,12 @@ if.end31: ; preds = %if.end10 %13 = trunc i32 %shr43 to i8 %14 = and i8 %13, 63 %conv46 = or disjoint i8 %14, -128 - %arrayidx47 = getelementptr inbounds i8, ptr %str, i64 2 + %arrayidx47 = getelementptr inbounds nuw i8, ptr %str, i64 2 store i8 %conv46, ptr %arrayidx47, align 1 %15 = trunc i32 %spec.store.select to i8 %16 = and i8 %15, 63 %conv50 = or disjoint i8 %16, -128 - %arrayidx51 = getelementptr inbounds i8, ptr %str, i64 3 + %arrayidx51 = getelementptr inbounds nuw i8, ptr %str, i64 3 store i8 %conv50, ptr %arrayidx51, align 1 br label %return @@ -251,7 +251,7 @@ if.then2: ; preds = %if.then if.end.i: ; preds = %for.cond %conv.i = zext i8 %0 to i32 - %add.ptr.i = getelementptr inbounds i8, ptr %s.addr.0, i64 1 + %add.ptr.i = getelementptr inbounds nuw i8, ptr %s.addr.0, i64 1 %1 = load i8, ptr %add.ptr.i, align 1 %2 = xor i8 %1, -128 %xor.i = zext i8 %2 to i32 @@ -274,7 +274,7 @@ if.end8.i: ; preds = %if.then5.i br i1 %cmp10.i, label %bad.i, label %if.end3 if.end13.i: ; preds = %if.end3.i - %add.ptr14.i = getelementptr inbounds i8, ptr %s.addr.0, i64 2 + %add.ptr14.i = getelementptr inbounds nuw i8, ptr %s.addr.0, i64 2 %3 = load i8, ptr %add.ptr14.i, align 1 %tobool18.not.i = icmp slt i8 %3, -64 br i1 %tobool18.not.i, label %if.end20.i, label %bad.i @@ -292,7 +292,7 @@ if.then22.i: ; preds = %if.end20.i br i1 %cmp28.i, label %bad.i, label %if.end3 if.end31.i: ; preds = %if.end20.i - %add.ptr32.i = getelementptr inbounds i8, ptr %s.addr.0, i64 3 + %add.ptr32.i = getelementptr inbounds nuw i8, ptr %s.addr.0, i64 3 %6 = load i8, ptr %add.ptr32.i, align 1 %tobool36.i = icmp slt i8 %6, -64 %cmp39.i = icmp ult i8 %0, -8 @@ -348,7 +348,7 @@ for.cond.backedge: ; preds = %if.end5, %_ZN3re210 br label %for.cond, !llvm.loop !6 if.end.i: ; preds = %for.cond - %add.ptr.i = getelementptr inbounds i8, ptr %s.addr.0, i64 1 + %add.ptr.i = getelementptr inbounds nuw i8, ptr %s.addr.0, i64 1 %1 = load i8, ptr %add.ptr.i, align 1 %2 = xor i8 %1, -128 %xor.i = zext i8 %2 to i32 @@ -371,7 +371,7 @@ if.end8.i: ; preds = %if.then5.i br i1 %cmp10.i, label %bad.i, label %_ZN3re210chartoruneEPiPKc.exit if.end13.i: ; preds = %if.end3.i - %add.ptr14.i = getelementptr inbounds i8, ptr %s.addr.0, i64 2 + %add.ptr14.i = getelementptr inbounds nuw i8, ptr %s.addr.0, i64 2 %3 = load i8, ptr %add.ptr14.i, align 1 %4 = xor i8 %3, -128 %xor16.i = zext i8 %4 to i32 @@ -395,7 +395,7 @@ if.end30.i: ; preds = %if.then22.i br label %_ZN3re210chartoruneEPiPKc.exit if.end31.i: ; preds = %if.end20.i - %add.ptr32.i = getelementptr inbounds i8, ptr %s.addr.0, i64 3 + %add.ptr32.i = getelementptr inbounds nuw i8, ptr %s.addr.0, i64 3 %7 = load i8, ptr %add.ptr32.i, align 1 %8 = xor i8 %7, -128 %tobool36.i = icmp ult i8 %8, 64 diff --git a/bench/readerwriterqueue/optimized/simplethread.cpp.ll b/bench/readerwriterqueue/optimized/simplethread.cpp.ll index 71c231a0646..d3fd60924e3 100644 --- a/bench/readerwriterqueue/optimized/simplethread.cpp.ll +++ b/bench/readerwriterqueue/optimized/simplethread.cpp.ll @@ -43,18 +43,18 @@ entry: %ref.tmp = alloca %"class.std::thread", align 8 %call = tail call noalias noundef nonnull dereferenceable(24) ptr @_Znwm(i64 noundef 24) #9 store i64 0, ptr %call, align 8 - %callbackObj2.i = getelementptr inbounds i8, ptr %call, i64 8 + %callbackObj2.i = getelementptr inbounds nuw i8, ptr %call, i64 8 store ptr %callbackObj, ptr %callbackObj2.i, align 8 - %callbackFunc3.i = getelementptr inbounds i8, ptr %call, i64 16 + %callbackFunc3.i = getelementptr inbounds nuw i8, ptr %call, i64 16 store ptr %callbackFunc, ptr %callbackFunc3.i, align 8 store ptr %call, ptr %this, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %agg.tmp.i) store i64 0, ptr %ref.tmp, align 8 %call.i = tail call noalias noundef nonnull dereferenceable(24) ptr @_Znwm(i64 noundef 24) #9 store ptr getelementptr inbounds (i8, ptr @_ZTVNSt6thread11_State_implINS_8_InvokerISt5tupleIJPFvPN12SimpleThread9ThreadRefEES5_EEEEEE, i64 16), ptr %call.i, align 8 - %_M_func.i.i = getelementptr inbounds i8, ptr %call.i, i64 8 + %_M_func.i.i = getelementptr inbounds nuw i8, ptr %call.i, i64 8 store ptr %call, ptr %_M_func.i.i, align 8 - %0 = getelementptr inbounds i8, ptr %call.i, i64 16 + %0 = getelementptr inbounds nuw i8, ptr %call.i, i64 16 store ptr @_ZN12SimpleThread9ThreadRef10threadProcEPS0_, ptr %0, align 8 store ptr %call.i, ptr %agg.tmp.i, align 8 invoke void @_ZNSt6thread15_M_start_threadESt10unique_ptrINS_6_StateESt14default_deleteIS1_EEPFvvE(ptr noundef nonnull align 8 dereferenceable(8) %ref.tmp, ptr noundef nonnull %agg.tmp.i, ptr noundef null) @@ -67,7 +67,7 @@ invoke.cont3.i: ; preds = %entry _ZNKSt14default_deleteINSt6thread6_StateEEclEPS1_.exit.i.i: ; preds = %invoke.cont3.i %vtable.i.i.i = load ptr, ptr %1, align 8 - %vfn.i.i.i = getelementptr inbounds i8, ptr %vtable.i.i.i, i64 8 + %vfn.i.i.i = getelementptr inbounds nuw i8, ptr %vtable.i.i.i, i64 8 %2 = load ptr, ptr %vfn.i.i.i, align 8 call void %2(ptr noundef nonnull align 8 dereferenceable(8) %1) #10 br label %_ZNSt6threadC2IPFvPN12SimpleThread9ThreadRefEEJRS3_EvEEOT_DpOT0_.exit @@ -81,7 +81,7 @@ lpad2.i: ; preds = %entry _ZNKSt14default_deleteINSt6thread6_StateEEclEPS1_.exit.i3.i: ; preds = %lpad2.i %vtable.i.i4.i = load ptr, ptr %4, align 8 - %vfn.i.i5.i = getelementptr inbounds i8, ptr %vtable.i.i4.i, i64 8 + %vfn.i.i5.i = getelementptr inbounds nuw i8, ptr %vtable.i.i4.i, i64 8 %5 = load ptr, ptr %vfn.i.i5.i, align 8 call void %5(ptr noundef nonnull align 8 dereferenceable(8) %4) #10 br label %_ZNSt10unique_ptrINSt6thread6_StateESt14default_deleteIS1_EED2Ev.exit6.i @@ -117,9 +117,9 @@ declare void @_ZdlPv(ptr noundef) local_unnamed_addr #2 ; Function Attrs: mustprogress uwtable define linkonce_odr dso_local void @_ZN12SimpleThread9ThreadRef10threadProcEPS0_(ptr noundef %threadRef) #0 comdat align 2 { entry: - %callbackFunc = getelementptr inbounds i8, ptr %threadRef, i64 16 + %callbackFunc = getelementptr inbounds nuw i8, ptr %threadRef, i64 16 %0 = load ptr, ptr %callbackFunc, align 8 - %callbackObj = getelementptr inbounds i8, ptr %threadRef, i64 8 + %callbackObj = getelementptr inbounds nuw i8, ptr %threadRef, i64 8 %1 = load ptr, ptr %callbackObj, align 8 tail call void %0(ptr noundef %1) ret void @@ -228,8 +228,8 @@ entry: ; Function Attrs: mustprogress uwtable define linkonce_odr dso_local void @_ZNSt6thread11_State_implINS_8_InvokerISt5tupleIJPFvPN12SimpleThread9ThreadRefEES5_EEEEE6_M_runEv(ptr noundef nonnull align 8 dereferenceable(24) %this) unnamed_addr #0 comdat align 2 { entry: - %_M_func = getelementptr inbounds i8, ptr %this, i64 8 - %add.ptr.i.i.i.i.i = getelementptr inbounds i8, ptr %this, i64 16 + %_M_func = getelementptr inbounds nuw i8, ptr %this, i64 8 + %add.ptr.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %this, i64 16 %0 = load ptr, ptr %add.ptr.i.i.i.i.i, align 8 %1 = load ptr, ptr %_M_func, align 8 tail call void %0(ptr noundef %1) diff --git a/bench/recastnavigation/optimized/Filelist.cpp.ll b/bench/recastnavigation/optimized/Filelist.cpp.ll index edeefc5ccb8..219f84bf178 100644 --- a/bench/recastnavigation/optimized/Filelist.cpp.ll +++ b/bench/recastnavigation/optimized/Filelist.cpp.ll @@ -54,13 +54,13 @@ define dso_local void @_Z19scanDirectoryAppendRKNSt7__cxx1112basic_stringIcSt11c .lr.ph: ; preds = %8 %12 = sub i64 0, %10 - %13 = getelementptr inbounds i8, ptr %2, i64 8 - %14 = getelementptr inbounds i8, ptr %2, i64 16 + %13 = getelementptr inbounds nuw i8, ptr %2, i64 8 + %14 = getelementptr inbounds nuw i8, ptr %2, i64 16 br label %15 15: ; preds = %.lr.ph, %42 %16 = phi ptr [ %11, %.lr.ph ], [ %43, %42 ] - %17 = getelementptr inbounds i8, ptr %16, i64 19 + %17 = getelementptr inbounds nuw i8, ptr %16, i64 19 %18 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %17) #15 %19 = icmp ugt i64 %18, %10 br i1 %19, label %20, label %42 @@ -103,7 +103,7 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.exit: ; pr 34: ; preds = %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.exit call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EOS4_(ptr noundef nonnull align 8 dereferenceable(32) %32, ptr noundef nonnull align 8 dereferenceable(32) %4) #14 %35 = load ptr, ptr %13, align 8 - %36 = getelementptr inbounds i8, ptr %35, i64 32 + %36 = getelementptr inbounds nuw i8, ptr %35, i64 32 store ptr %36, ptr %13, align 8 br label %_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_.exit @@ -140,7 +140,7 @@ _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_b ._crit_edge: ; preds = %42, %8 %44 = call i32 @closedir(ptr noundef nonnull %7) %45 = load ptr, ptr %2, align 8 - %46 = getelementptr inbounds i8, ptr %2, i64 8 + %46 = getelementptr inbounds nuw i8, ptr %2, i64 8 %47 = load ptr, ptr %46, align 8 %.not.i.i28 = icmp eq ptr %45, %47 br i1 %.not.i.i28, label %_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS7_SaIS7_EEEEEvT_SD_.exit, label %48 @@ -192,7 +192,7 @@ declare noundef i32 @closedir(ptr nocapture noundef) local_unnamed_addr #1 ; Function Attrs: mustprogress uwtable define dso_local void @_Z13scanDirectoryRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_RSt6vectorIS4_SaIS4_EE(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 { %4 = load ptr, ptr %2, align 8 - %5 = getelementptr inbounds i8, ptr %2, i64 8 + %5 = getelementptr inbounds nuw i8, ptr %2, i64 8 %6 = load ptr, ptr %5, align 8 %.not.i.i = icmp eq ptr %6, %4 br i1 %.not.i.i, label %_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5clearEv.exit, label %.lr.ph.i.i.i.i.i @@ -215,7 +215,7 @@ _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5clearE ; Function Attrs: mustprogress uwtable define linkonce_odr dso_local void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr %1, ptr noundef nonnull align 8 dereferenceable(32) %2) local_unnamed_addr #0 comdat align 2 personality ptr @__gxx_personality_v0 { - %4 = getelementptr inbounds i8, ptr %0, i64 8 + %4 = getelementptr inbounds nuw i8, ptr %0, i64 8 %5 = load ptr, ptr %4, align 8 %6 = load ptr, ptr %0, align 8 %7 = ptrtoint ptr %5 to i64 @@ -265,7 +265,7 @@ _ZNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE11_S_relocateEPS5_S8_S8_RS6_.exit: ; preds = %.lr.ph.i.i.i, %_ZNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE11_M_allocateEm.exit %.0.lcssa.i.i.i = phi ptr [ %23, %_ZNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE11_M_allocateEm.exit ], [ %26, %.lr.ph.i.i.i ] - %27 = getelementptr inbounds i8, ptr %.0.lcssa.i.i.i, i64 32 + %27 = getelementptr inbounds nuw i8, ptr %.0.lcssa.i.i.i, i64 32 %.not10.i.i.i16 = icmp eq ptr %1, %5 br i1 %.not10.i.i.i16, label %_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE11_S_relocateEPS5_S8_S8_RS6_.exit22, label %.lr.ph.i.i.i17 @@ -289,7 +289,7 @@ _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE11_S_re br label %_ZNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE13_M_deallocateEPS5_m.exit _ZNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE13_M_deallocateEPS5_m.exit: ; preds = %_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE11_S_relocateEPS5_S8_S8_RS6_.exit22, %30 - %31 = getelementptr inbounds i8, ptr %0, i64 16 + %31 = getelementptr inbounds nuw i8, ptr %0, i64 16 store ptr %23, ptr %0, align 8 store ptr %.0.lcssa.i.i.i21, ptr %4, align 8 %32 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %23, i64 %16 @@ -474,7 +474,7 @@ define linkonce_odr dso_local void @_ZSt22__final_insertion_sortIN9__gnu_cxx17__ br i1 %7, label %8, label %20 8: ; preds = %2 - %9 = getelementptr inbounds i8, ptr %0, i64 512 + %9 = getelementptr inbounds nuw i8, ptr %0, i64 512 tail call void @_ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS7_SaIS7_EEEENS0_5__ops15_Iter_less_iterEEvT_SF_T0_(ptr %0, ptr nonnull %9) %.not5.i = icmp eq ptr %9, %1 br i1 %.not5.i, label %_ZSt26__unguarded_insertion_sortIN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS7_SaIS7_EEEENS0_5__ops15_Iter_less_iterEEvT_SF_T0_.exit, label %.lr.ph.i @@ -510,7 +510,7 @@ _ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112bas %18 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %.sroa.03.0.i.i, ptr noundef nonnull align 8 dereferenceable(32) %3) #14 call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #14 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) - %19 = getelementptr inbounds i8, ptr %.sroa.0.06.i, i64 32 + %19 = getelementptr inbounds nuw i8, ptr %.sroa.0.06.i, i64 32 %.not.i = icmp eq ptr %19, %1 br i1 %.not.i, label %_ZSt26__unguarded_insertion_sortIN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS7_SaIS7_EEEENS0_5__ops15_Iter_less_iterEEvT_SF_T0_.exit, label %.lr.ph.i, !llvm.loop !12 @@ -530,7 +530,7 @@ define linkonce_odr dso_local ptr @_ZSt27__unguarded_partition_pivotIN9__gnu_cxx %6 = ashr exact i64 %5, 5 %7 = sdiv i64 %6, 2 %8 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %0, i64 %7 - %9 = getelementptr inbounds i8, ptr %0, i64 32 + %9 = getelementptr inbounds nuw i8, ptr %0, i64 32 %10 = getelementptr inbounds i8, ptr %1, i64 -32 tail call void @_ZSt22__move_median_to_firstIN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS7_SaIS7_EEEENS0_5__ops15_Iter_less_iterEEvT_SF_SF_SF_T0_(ptr %0, ptr nonnull %9, ptr %8, ptr nonnull %10) br label %11 @@ -557,7 +557,7 @@ _ZNK9__gnu_cxx5__ops15_Iter_less_iterclINS_17__normal_iteratorIPNSt7__cxx1112bas br i1 %17, label %18, label %.preheader.i 18: ; preds = %_ZNK9__gnu_cxx5__ops15_Iter_less_iterclINS_17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS9_SaIS9_EEEESE_EEbT_T0_.exit.i - %19 = getelementptr inbounds i8, ptr %.sroa.011.1.i, i64 32 + %19 = getelementptr inbounds nuw i8, ptr %.sroa.011.1.i, i64 32 br label %12, !llvm.loop !13 .preheader.i: ; preds = %_ZNK9__gnu_cxx5__ops15_Iter_less_iterclINS_17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS9_SaIS9_EEEESE_EEbT_T0_.exit.i, %_ZNK9__gnu_cxx5__ops15_Iter_less_iterclINS_17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS9_SaIS9_EEEESE_EEbT_T0_.exit8.i @@ -583,7 +583,7 @@ _ZNK9__gnu_cxx5__ops15_Iter_less_iterclINS_17__normal_iteratorIPNSt7__cxx1112bas 27: ; preds = %25 tail call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4swapERS4_(ptr noundef nonnull align 8 dereferenceable(32) %.sroa.011.1.i, ptr noundef nonnull align 8 dereferenceable(32) %.sroa.0.1.i) #14 - %28 = getelementptr inbounds i8, ptr %.sroa.011.1.i, i64 32 + %28 = getelementptr inbounds nuw i8, ptr %.sroa.011.1.i, i64 32 br label %11, !llvm.loop !15 _ZSt21__unguarded_partitionIN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS7_SaIS7_EEEENS0_5__ops15_Iter_less_iterEET_SF_SF_SF_T0_.exit: ; preds = %25 @@ -855,7 +855,7 @@ define linkonce_odr dso_local void @_ZSt16__insertion_sortIN9__gnu_cxx17__normal br i1 %5, label %.loopexit15, label %.preheader .preheader: ; preds = %2 - %.sroa.0.017 = getelementptr inbounds i8, ptr %0, i64 32 + %.sroa.0.017 = getelementptr inbounds nuw i8, ptr %0, i64 32 %.not18 = icmp eq ptr %.sroa.0.017, %1 br i1 %.not18, label %.loopexit15, label %.lr.ph @@ -941,7 +941,7 @@ _ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112bas br label %35 35: ; preds = %.loopexit, %_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS7_SaIS7_EEEENS0_5__ops14_Val_less_iterEEvT_T0_.exit - %.sroa.0.0 = getelementptr inbounds i8, ptr %.sroa.0.020, i64 32 + %.sroa.0.0 = getelementptr inbounds nuw i8, ptr %.sroa.0.020, i64 32 %.not = icmp eq ptr %.sroa.0.0, %1 br i1 %.not, label %.loopexit15, label %7, !llvm.loop !19 diff --git a/bench/redis/optimized/intset.ll b/bench/redis/optimized/intset.ll index fb1c9a64731..19ff4ae37a2 100644 --- a/bench/redis/optimized/intset.ll +++ b/bench/redis/optimized/intset.ll @@ -11,7 +11,7 @@ define dso_local noalias noundef ptr @intsetNew() local_unnamed_addr #0 { entry: %call = tail call noalias dereferenceable_or_null(8) ptr @zmalloc(i64 noundef 8) #12 store i32 2, ptr %call, align 4 - %length = getelementptr inbounds i8, ptr %call, i64 4 + %length = getelementptr inbounds nuw i8, ptr %call, i64 4 store i32 0, ptr %length, align 4 ret ptr %call } @@ -42,7 +42,7 @@ if.end: ; preds = %if.then, %entry br i1 %cmp, label %if.then2, label %if.else if.then2: ; preds = %if.end - %length1.i = getelementptr inbounds i8, ptr %is, i64 4 + %length1.i = getelementptr inbounds nuw i8, ptr %is, i64 4 %4 = load i32, ptr %length1.i, align 4 %cmp.i = icmp slt i64 %value, 0 %value.lobit.i = lshr i64 %value, 63 @@ -58,7 +58,7 @@ if.then2: ; preds = %if.end br i1 %tobool.not48.i, label %while.end.i, label %while.body.lr.ph.i while.body.lr.ph.i: ; preds = %if.then2 - %contents12.i.i = getelementptr inbounds i8, ptr %call.i.i, i64 8 + %contents12.i.i = getelementptr inbounds nuw i8, ptr %call.i.i, i64 8 %7 = sext i32 %4 to i64 %cond = icmp eq i32 %3, 4 br i1 %cond, label %while.body.us51.i, label %while.body.i @@ -140,24 +140,24 @@ if.then.i: ; preds = %while.end.i ] if.then.i25.i: ; preds = %if.then.i - %contents.i26.i = getelementptr inbounds i8, ptr %call.i.i, i64 8 + %contents.i26.i = getelementptr inbounds nuw i8, ptr %call.i.i, i64 8 store i64 %value, ptr %contents.i26.i, align 4 br label %intsetUpgradeAndAdd.exit if.then6.i21.i: ; preds = %if.then.i %conv7.i22.i = trunc i64 %value to i32 - %contents8.i23.i = getelementptr inbounds i8, ptr %call.i.i, i64 8 + %contents8.i23.i = getelementptr inbounds nuw i8, ptr %call.i.i, i64 8 store i32 %conv7.i22.i, ptr %contents8.i23.i, align 4 br label %intsetUpgradeAndAdd.exit if.else12.i28.i: ; preds = %if.then.i %conv13.i29.i = trunc i64 %value to i16 - %contents14.i30.i = getelementptr inbounds i8, ptr %call.i.i, i64 8 + %contents14.i30.i = getelementptr inbounds nuw i8, ptr %call.i.i, i64 8 store i16 %conv13.i29.i, ptr %contents14.i30.i, align 2 br label %intsetUpgradeAndAdd.exit if.else.i: ; preds = %while.end.i - %length10.i = getelementptr inbounds i8, ptr %call.i.i, i64 4 + %length10.i = getelementptr inbounds nuw i8, ptr %call.i.i, i64 4 %13 = load i32, ptr %length10.i, align 4 %14 = load i32, ptr %call.i.i, align 4 switch i32 %14, label %if.else12.i42.i [ @@ -166,7 +166,7 @@ if.else.i: ; preds = %while.end.i ] if.then.i38.i: ; preds = %if.else.i - %contents.i39.i = getelementptr inbounds i8, ptr %call.i.i, i64 8 + %contents.i39.i = getelementptr inbounds nuw i8, ptr %call.i.i, i64 8 %idxprom.i40.i = sext i32 %13 to i64 %arrayidx.i41.i = getelementptr inbounds i64, ptr %contents.i39.i, i64 %idxprom.i40.i store i64 %value, ptr %arrayidx.i41.i, align 4 @@ -174,7 +174,7 @@ if.then.i38.i: ; preds = %if.else.i if.then6.i33.i: ; preds = %if.else.i %conv7.i34.i = trunc i64 %value to i32 - %contents8.i35.i = getelementptr inbounds i8, ptr %call.i.i, i64 8 + %contents8.i35.i = getelementptr inbounds nuw i8, ptr %call.i.i, i64 8 %idxprom10.i36.i = sext i32 %13 to i64 %arrayidx11.i37.i = getelementptr inbounds i32, ptr %contents8.i35.i, i64 %idxprom10.i36.i store i32 %conv7.i34.i, ptr %arrayidx11.i37.i, align 4 @@ -182,14 +182,14 @@ if.then6.i33.i: ; preds = %if.else.i if.else12.i42.i: ; preds = %if.else.i %conv13.i43.i = trunc i64 %value to i16 - %contents14.i44.i = getelementptr inbounds i8, ptr %call.i.i, i64 8 + %contents14.i44.i = getelementptr inbounds nuw i8, ptr %call.i.i, i64 8 %idxprom16.i45.i = sext i32 %13 to i64 %arrayidx17.i46.i = getelementptr inbounds i16, ptr %contents14.i44.i, i64 %idxprom16.i45.i store i16 %conv13.i43.i, ptr %arrayidx17.i46.i, align 2 br label %intsetUpgradeAndAdd.exit intsetUpgradeAndAdd.exit: ; preds = %if.then.i25.i, %if.then6.i21.i, %if.else12.i28.i, %if.then.i38.i, %if.then6.i33.i, %if.else12.i42.i - %length11.i = getelementptr inbounds i8, ptr %call.i.i, i64 4 + %length11.i = getelementptr inbounds nuw i8, ptr %call.i.i, i64 4 %15 = load i32, ptr %length11.i, align 4 %add12.i = add i32 %15, 1 store i32 %add12.i, ptr %length11.i, align 4 @@ -208,7 +208,7 @@ if.then8: ; preds = %if.then6 br label %return if.end10: ; preds = %if.else - %length = getelementptr inbounds i8, ptr %is, i64 4 + %length = getelementptr inbounds nuw i8, ptr %is, i64 4 %16 = load i32, ptr %length, align 4 %add = add i32 %16, 1 %conv.i18 = zext i32 %add to i64 @@ -217,35 +217,35 @@ if.end10: ; preds = %if.else %add.i19 = add nuw i64 %mul.i, 8 %call.i = call ptr @zrealloc(ptr noundef nonnull %is, i64 noundef %add.i19) #13 %17 = load i32, ptr %pos, align 4 - %length12 = getelementptr inbounds i8, ptr %call.i, i64 4 + %length12 = getelementptr inbounds nuw i8, ptr %call.i, i64 4 %18 = load i32, ptr %length12, align 4 %cmp13 = icmp ult i32 %17, %18 + %.pre24 = load i32, ptr %call.i, align 4 br i1 %cmp13, label %if.then15, label %if.end18 if.then15: ; preds = %if.end10 %add16 = add nuw i32 %17, 1 - %19 = load i32, ptr %call.i, align 4 - %contents25.i = getelementptr inbounds i8, ptr %call.i, i64 8 + %contents25.i = getelementptr inbounds nuw i8, ptr %call.i, i64 8 %idx.ext27.i = zext i32 %17 to i64 %idx.ext31.i = zext i32 %add16 to i64 - switch i32 %19, label %if.else24.i [ + switch i32 %.pre24, label %if.else24.i [ i32 8, label %if.then.i20 i32 4, label %if.then12.i ] if.then.i20: ; preds = %if.then15 - %add.ptr.i = getelementptr inbounds i64, ptr %contents25.i, i64 %idx.ext27.i - %add.ptr6.i = getelementptr inbounds i64, ptr %contents25.i, i64 %idx.ext31.i + %add.ptr.i = getelementptr inbounds nuw i64, ptr %contents25.i, i64 %idx.ext27.i + %add.ptr6.i = getelementptr inbounds nuw i64, ptr %contents25.i, i64 %idx.ext31.i br label %intsetMoveTail.exit if.then12.i: ; preds = %if.then15 - %add.ptr16.i = getelementptr inbounds i32, ptr %contents25.i, i64 %idx.ext27.i - %add.ptr20.i = getelementptr inbounds i32, ptr %contents25.i, i64 %idx.ext31.i + %add.ptr16.i = getelementptr inbounds nuw i32, ptr %contents25.i, i64 %idx.ext27.i + %add.ptr20.i = getelementptr inbounds nuw i32, ptr %contents25.i, i64 %idx.ext31.i br label %intsetMoveTail.exit if.else24.i: ; preds = %if.then15 - %add.ptr28.i = getelementptr inbounds i16, ptr %contents25.i, i64 %idx.ext27.i - %add.ptr32.i = getelementptr inbounds i16, ptr %contents25.i, i64 %idx.ext31.i + %add.ptr28.i = getelementptr inbounds nuw i16, ptr %contents25.i, i64 %idx.ext27.i + %add.ptr32.i = getelementptr inbounds nuw i16, ptr %contents25.i, i64 %idx.ext31.i br label %intsetMoveTail.exit intsetMoveTail.exit: ; preds = %if.then.i20, %if.then12.i, %if.else24.i @@ -260,39 +260,38 @@ intsetMoveTail.exit: ; preds = %if.then.i20, %if.th br label %if.end18 if.end18: ; preds = %if.end10, %intsetMoveTail.exit - %20 = phi i32 [ %17, %if.end10 ], [ %.pre, %intsetMoveTail.exit ] - %21 = load i32, ptr %call.i, align 4 - switch i32 %21, label %if.else12.i [ + %19 = phi i32 [ %17, %if.end10 ], [ %.pre, %intsetMoveTail.exit ] + switch i32 %.pre24, label %if.else12.i [ i32 8, label %if.then.i21 i32 4, label %if.then6.i ] if.then.i21: ; preds = %if.end18 - %contents.i = getelementptr inbounds i8, ptr %call.i, i64 8 - %idxprom.i = sext i32 %20 to i64 + %contents.i = getelementptr inbounds nuw i8, ptr %call.i, i64 8 + %idxprom.i = sext i32 %19 to i64 %arrayidx.i = getelementptr inbounds i64, ptr %contents.i, i64 %idxprom.i store i64 %value, ptr %arrayidx.i, align 4 br label %_intsetSet.exit if.then6.i: ; preds = %if.end18 %conv7.i = trunc i64 %value to i32 - %contents8.i = getelementptr inbounds i8, ptr %call.i, i64 8 - %idxprom10.i = sext i32 %20 to i64 + %contents8.i = getelementptr inbounds nuw i8, ptr %call.i, i64 8 + %idxprom10.i = sext i32 %19 to i64 %arrayidx11.i = getelementptr inbounds i32, ptr %contents8.i, i64 %idxprom10.i store i32 %conv7.i, ptr %arrayidx11.i, align 4 br label %_intsetSet.exit if.else12.i: ; preds = %if.end18 %conv13.i = trunc i64 %value to i16 - %contents14.i = getelementptr inbounds i8, ptr %call.i, i64 8 - %idxprom16.i = sext i32 %20 to i64 + %contents14.i = getelementptr inbounds nuw i8, ptr %call.i, i64 8 + %idxprom16.i = sext i32 %19 to i64 %arrayidx17.i = getelementptr inbounds i16, ptr %contents14.i, i64 %idxprom16.i store i16 %conv13.i, ptr %arrayidx17.i, align 2 br label %_intsetSet.exit _intsetSet.exit: ; preds = %if.then.i21, %if.then6.i, %if.else12.i - %22 = load i32, ptr %length12, align 4 - %add20 = add i32 %22, 1 + %20 = load i32, ptr %length12, align 4 + %add20 = add i32 %20, 1 store i32 %add20, ptr %length12, align 4 br label %return @@ -304,7 +303,7 @@ return: ; preds = %if.then6, %if.then8 ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable define internal fastcc zeroext range(i8 0, 2) i8 @intsetSearch(ptr nocapture noundef readonly %is, i64 noundef %value, ptr noundef writeonly %pos) unnamed_addr #2 { entry: - %length = getelementptr inbounds i8, ptr %is, i64 4 + %length = getelementptr inbounds nuw i8, ptr %is, i64 4 %0 = load i32, ptr %length, align 4 %sub = add i32 %0, -1 %cmp = icmp eq i32 %0, 0 @@ -317,7 +316,7 @@ if.then: ; preds = %entry if.else: ; preds = %entry %1 = load i32, ptr %is, align 4 %conv.i = trunc i32 %1 to i8 - %contents12.i.i = getelementptr inbounds i8, ptr %is, i64 8 + %contents12.i.i = getelementptr inbounds nuw i8, ptr %is, i64 8 %idx.ext14.i.i = sext i32 %sub to i64 switch i8 %conv.i, label %if.else11.i.i [ i8 8, label %if.then.i.i @@ -391,7 +390,7 @@ while.body.us: ; preds = %while.body.lr.ph, % %add.us = add i32 %max.061.us, %min.060.us %shr.us = lshr i32 %add.us, 1 %idx.ext14.i.i45.us = zext nneg i32 %shr.us to i64 - %add.ptr.i.i52.us = getelementptr inbounds i64, ptr %contents12.i.i, i64 %idx.ext14.i.i45.us + %add.ptr.i.i52.us = getelementptr inbounds nuw i64, ptr %contents12.i.i, i64 %idx.ext14.i.i45.us %v64.0.copyload.i.i53.us = load i64, ptr %add.ptr.i.i52.us, align 8 %cmp21.us = icmp sgt i64 %value, %v64.0.copyload.i.i53.us br i1 %cmp21.us, label %if.then22.us, label %if.else24.us @@ -420,7 +419,7 @@ while.body.us73: ; preds = %while.body.lr.ph, % %add.us76 = add i32 %max.061.us74, %min.060.us75 %shr.us77 = lshr i32 %add.us76, 1 %idx.ext14.i.i45.us78 = zext nneg i32 %shr.us77 to i64 - %add.ptr9.i.i47.us = getelementptr inbounds i32, ptr %contents12.i.i, i64 %idx.ext14.i.i45.us78 + %add.ptr9.i.i47.us = getelementptr inbounds nuw i32, ptr %contents12.i.i, i64 %idx.ext14.i.i45.us78 %v32.0.copyload.i.i48.us = load i32, ptr %add.ptr9.i.i47.us, align 4 %conv10.i.i49.us = sext i32 %v32.0.copyload.i.i48.us to i64 %cmp21.us81 = icmp sgt i64 %value, %conv10.i.i49.us @@ -454,7 +453,7 @@ while.body: ; preds = %while.body.lr.ph, % %add = add i32 %max.061, %min.060 %shr = lshr i32 %add, 1 %idx.ext14.i.i45 = zext nneg i32 %shr to i64 - %add.ptr15.i.i55 = getelementptr inbounds i16, ptr %contents12.i.i, i64 %idx.ext14.i.i45 + %add.ptr15.i.i55 = getelementptr inbounds nuw i16, ptr %contents12.i.i, i64 %idx.ext14.i.i45 %v16.0.copyload.i.i56 = load i16, ptr %add.ptr15.i.i55, align 2 %conv16.i.i57 = sext i16 %v16.0.copyload.i.i56 to i64 %cmp21 = icmp sgt i64 %value, %conv16.i.i57 @@ -527,17 +526,17 @@ land.lhs.true: ; preds = %if.end br i1 %tobool4.not, label %if.end17, label %if.then5 if.then5: ; preds = %land.lhs.true - %length = getelementptr inbounds i8, ptr %is, i64 4 + %length = getelementptr inbounds nuw i8, ptr %is, i64 4 %4 = load i32, ptr %length, align 4 br i1 %tobool.not, label %if.end8, label %if.then7 if.then7: ; preds = %if.then5 store i32 1, ptr %success, align 4 - %.pre13.pre = load i32, ptr %is, align 4 + %.pre.pre = load i32, ptr %is, align 4 br label %if.end8 if.end8: ; preds = %if.then7, %if.then5 - %.pre13 = phi i32 [ %.pre13.pre, %if.then7 ], [ %3, %if.then5 ] + %.pre = phi i32 [ %.pre.pre, %if.then7 ], [ %3, %if.then5 ] %5 = load i32, ptr %pos, align 4 %sub = add i32 %4, -1 %cmp9 = icmp ult i32 %5, %sub @@ -546,27 +545,27 @@ if.end8: ; preds = %if.then7, %if.then5 if.then11: ; preds = %if.end8 %add = add nuw i32 %5, 1 %6 = load i32, ptr %length, align 4 - %contents25.i = getelementptr inbounds i8, ptr %is, i64 8 + %contents25.i = getelementptr inbounds nuw i8, ptr %is, i64 8 %idx.ext27.i = zext i32 %add to i64 %idx.ext31.i = zext i32 %5 to i64 - switch i32 %.pre13, label %if.else24.i [ + switch i32 %.pre, label %if.else24.i [ i32 8, label %if.then.i i32 4, label %if.then12.i ] if.then.i: ; preds = %if.then11 - %add.ptr.i = getelementptr inbounds i64, ptr %contents25.i, i64 %idx.ext27.i - %add.ptr6.i = getelementptr inbounds i64, ptr %contents25.i, i64 %idx.ext31.i + %add.ptr.i = getelementptr inbounds nuw i64, ptr %contents25.i, i64 %idx.ext27.i + %add.ptr6.i = getelementptr inbounds nuw i64, ptr %contents25.i, i64 %idx.ext31.i br label %intsetMoveTail.exit if.then12.i: ; preds = %if.then11 - %add.ptr16.i = getelementptr inbounds i32, ptr %contents25.i, i64 %idx.ext27.i - %add.ptr20.i = getelementptr inbounds i32, ptr %contents25.i, i64 %idx.ext31.i + %add.ptr16.i = getelementptr inbounds nuw i32, ptr %contents25.i, i64 %idx.ext27.i + %add.ptr20.i = getelementptr inbounds nuw i32, ptr %contents25.i, i64 %idx.ext31.i br label %intsetMoveTail.exit if.else24.i: ; preds = %if.then11 - %add.ptr28.i = getelementptr inbounds i16, ptr %contents25.i, i64 %idx.ext27.i - %add.ptr32.i = getelementptr inbounds i16, ptr %contents25.i, i64 %idx.ext31.i + %add.ptr28.i = getelementptr inbounds nuw i16, ptr %contents25.i, i64 %idx.ext27.i + %add.ptr32.i = getelementptr inbounds nuw i16, ptr %contents25.i, i64 %idx.ext31.i br label %intsetMoveTail.exit intsetMoveTail.exit: ; preds = %if.then.i, %if.then12.i, %if.else24.i @@ -577,17 +576,15 @@ intsetMoveTail.exit: ; preds = %if.then.i, %if.then %mul22.i = shl i32 %sub.i, %.sink.i %conv37.i = zext i32 %mul22.i to i64 call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %dst.0.i, ptr nonnull align 1 %src.0.i, i64 %conv37.i, i1 false) - %.pre = load i32, ptr %is, align 4 br label %if.end12 if.end12: ; preds = %intsetMoveTail.exit, %if.end8 - %7 = phi i32 [ %.pre, %intsetMoveTail.exit ], [ %.pre13, %if.end8 ] %conv.i = zext i32 %sub to i64 - %conv1.i = zext i32 %7 to i64 + %conv1.i = zext i32 %.pre to i64 %mul.i = mul nuw i64 %conv1.i, %conv.i %add.i = add nuw i64 %mul.i, 8 %call.i = call ptr @zrealloc(ptr noundef nonnull %is, i64 noundef %add.i) #13 - %length16 = getelementptr inbounds i8, ptr %call.i, i64 4 + %length16 = getelementptr inbounds nuw i8, ptr %call.i, i64 4 store i32 %sub, ptr %length16, align 4 br label %if.end17 @@ -621,7 +618,7 @@ land.end: ; preds = %land.rhs, %entry ; Function Attrs: nounwind uwtable define dso_local i64 @intsetRandom(ptr nocapture noundef readonly %is) local_unnamed_addr #0 { entry: - %length = getelementptr inbounds i8, ptr %is, i64 4 + %length = getelementptr inbounds nuw i8, ptr %is, i64 4 %0 = load i32, ptr %length, align 4 %tobool.not = icmp eq i32 %0, 0 br i1 %tobool.not, label %cond.false, label %cond.end @@ -636,7 +633,7 @@ cond.end: ; preds = %entry %rem = urem i32 %call, %0 %1 = load i32, ptr %is, align 4 %conv.i = trunc i32 %1 to i8 - %contents12.i.i = getelementptr inbounds i8, ptr %is, i64 8 + %contents12.i.i = getelementptr inbounds nuw i8, ptr %is, i64 8 %idx.ext14.i.i = sext i32 %rem to i64 switch i8 %conv.i, label %if.else11.i.i [ i8 8, label %if.then.i.i @@ -676,12 +673,12 @@ declare i32 @rand() local_unnamed_addr #6 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i64 @intsetMax(ptr nocapture noundef readonly %is) local_unnamed_addr #7 { entry: - %length = getelementptr inbounds i8, ptr %is, i64 4 + %length = getelementptr inbounds nuw i8, ptr %is, i64 4 %0 = load i32, ptr %length, align 4 %sub = add i32 %0, -1 %1 = load i32, ptr %is, align 4 %conv.i = trunc i32 %1 to i8 - %contents12.i.i = getelementptr inbounds i8, ptr %is, i64 8 + %contents12.i.i = getelementptr inbounds nuw i8, ptr %is, i64 8 %idx.ext14.i.i = sext i32 %sub to i64 switch i8 %conv.i, label %if.else11.i.i [ i8 8, label %if.then.i.i @@ -715,7 +712,7 @@ define dso_local i64 @intsetMin(ptr nocapture noundef readonly %is) local_unname entry: %0 = load i32, ptr %is, align 4 %conv.i = trunc i32 %0 to i8 - %contents12.i.i = getelementptr inbounds i8, ptr %is, i64 8 + %contents12.i.i = getelementptr inbounds nuw i8, ptr %is, i64 8 switch i8 %conv.i, label %if.else11.i.i [ i8 8, label %if.then.i.i i8 4, label %if.then5.i.i @@ -743,7 +740,7 @@ _intsetGet.exit: ; preds = %if.then.i.i, %if.th ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local zeroext range(i8 0, 2) i8 @intsetGet(ptr nocapture noundef readonly %is, i32 noundef %pos, ptr nocapture noundef writeonly %value) local_unnamed_addr #8 { entry: - %length = getelementptr inbounds i8, ptr %is, i64 4 + %length = getelementptr inbounds nuw i8, ptr %is, i64 4 %0 = load i32, ptr %length, align 4 %cmp = icmp ult i32 %pos, %0 br i1 %cmp, label %if.then, label %return @@ -751,7 +748,7 @@ entry: if.then: ; preds = %entry %1 = load i32, ptr %is, align 4 %conv.i = trunc i32 %1 to i8 - %contents12.i.i = getelementptr inbounds i8, ptr %is, i64 8 + %contents12.i.i = getelementptr inbounds nuw i8, ptr %is, i64 8 %idx.ext14.i.i = sext i32 %pos to i64 switch i8 %conv.i, label %if.else11.i.i [ i8 8, label %if.then.i.i @@ -788,7 +785,7 @@ return: ; preds = %entry, %_intsetGet. ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @intsetLen(ptr nocapture noundef readonly %is) local_unnamed_addr #7 { entry: - %length = getelementptr inbounds i8, ptr %is, i64 4 + %length = getelementptr inbounds nuw i8, ptr %is, i64 4 %0 = load i32, ptr %length, align 4 ret i32 %0 } @@ -796,7 +793,7 @@ entry: ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local range(i64 8, -8589934582) i64 @intsetBlobLen(ptr nocapture noundef readonly %is) local_unnamed_addr #7 { entry: - %length = getelementptr inbounds i8, ptr %is, i64 4 + %length = getelementptr inbounds nuw i8, ptr %is, i64 4 %0 = load i32, ptr %length, align 4 %conv = zext i32 %0 to i64 %1 = load i32, ptr %is, align 4 @@ -828,7 +825,7 @@ if.then13: ; preds = %if.end if.end17: ; preds = %if.end, %if.then8, %if.then13 %record_size.0 = phi i64 [ 4, %if.then8 ], [ 2, %if.then13 ], [ 8, %if.end ] - %length = getelementptr inbounds i8, ptr %p, i64 4 + %length = getelementptr inbounds nuw i8, ptr %p, i64 4 %1 = load i32, ptr %length, align 4 %conv18 = zext i32 %1 to i64 %mul = mul nuw nsw i64 %record_size.0, %conv18 @@ -844,7 +841,7 @@ if.end26: ; preds = %if.end17 if.end28: ; preds = %if.end26 %conv.i = trunc i32 %0 to i8 - %contents12.i.i = getelementptr inbounds i8, ptr %p, i64 8 + %contents12.i.i = getelementptr inbounds nuw i8, ptr %p, i64 8 switch i8 %conv.i, label %if.else11.i.i [ i8 8, label %if.then.i.i i8 4, label %if.then5.i.i diff --git a/bench/redis/optimized/sha1.ll b/bench/redis/optimized/sha1.ll index b90ecf8522c..722c16a7324 100644 --- a/bench/redis/optimized/sha1.ll +++ b/bench/redis/optimized/sha1.ll @@ -7,44 +7,44 @@ target triple = "x86_64-unknown-linux-gnu" define dso_local void @SHA1Transform(ptr nocapture noundef %state, ptr nocapture noundef readonly %buffer) local_unnamed_addr #0 { entry: %block.sroa.0.0.copyload = load i32, ptr %buffer, align 1 - %block.sroa.43.0..sroa_idx = getelementptr inbounds i8, ptr %buffer, i64 4 + %block.sroa.43.0..sroa_idx = getelementptr inbounds nuw i8, ptr %buffer, i64 4 %block.sroa.43.0.copyload = load i32, ptr %block.sroa.43.0..sroa_idx, align 1 - %block.sroa.84.0..sroa_idx = getelementptr inbounds i8, ptr %buffer, i64 8 + %block.sroa.84.0..sroa_idx = getelementptr inbounds nuw i8, ptr %buffer, i64 8 %block.sroa.84.0.copyload = load i32, ptr %block.sroa.84.0..sroa_idx, align 1 - %block.sroa.125.0..sroa_idx = getelementptr inbounds i8, ptr %buffer, i64 12 + %block.sroa.125.0..sroa_idx = getelementptr inbounds nuw i8, ptr %buffer, i64 12 %block.sroa.125.0.copyload = load i32, ptr %block.sroa.125.0..sroa_idx, align 1 - %block.sroa.166.0..sroa_idx = getelementptr inbounds i8, ptr %buffer, i64 16 + %block.sroa.166.0..sroa_idx = getelementptr inbounds nuw i8, ptr %buffer, i64 16 %block.sroa.166.0.copyload = load i32, ptr %block.sroa.166.0..sroa_idx, align 1 - %block.sroa.207.0..sroa_idx = getelementptr inbounds i8, ptr %buffer, i64 20 + %block.sroa.207.0..sroa_idx = getelementptr inbounds nuw i8, ptr %buffer, i64 20 %block.sroa.207.0.copyload = load i32, ptr %block.sroa.207.0..sroa_idx, align 1 - %block.sroa.248.0..sroa_idx = getelementptr inbounds i8, ptr %buffer, i64 24 + %block.sroa.248.0..sroa_idx = getelementptr inbounds nuw i8, ptr %buffer, i64 24 %block.sroa.248.0.copyload = load i32, ptr %block.sroa.248.0..sroa_idx, align 1 - %block.sroa.289.0..sroa_idx = getelementptr inbounds i8, ptr %buffer, i64 28 + %block.sroa.289.0..sroa_idx = getelementptr inbounds nuw i8, ptr %buffer, i64 28 %block.sroa.289.0.copyload = load i32, ptr %block.sroa.289.0..sroa_idx, align 1 - %block.sroa.330.0..sroa_idx = getelementptr inbounds i8, ptr %buffer, i64 32 + %block.sroa.330.0..sroa_idx = getelementptr inbounds nuw i8, ptr %buffer, i64 32 %block.sroa.330.0.copyload = load i32, ptr %block.sroa.330.0..sroa_idx, align 1 - %block.sroa.371.0..sroa_idx = getelementptr inbounds i8, ptr %buffer, i64 36 + %block.sroa.371.0..sroa_idx = getelementptr inbounds nuw i8, ptr %buffer, i64 36 %block.sroa.371.0.copyload = load i32, ptr %block.sroa.371.0..sroa_idx, align 1 - %block.sroa.412.0..sroa_idx = getelementptr inbounds i8, ptr %buffer, i64 40 + %block.sroa.412.0..sroa_idx = getelementptr inbounds nuw i8, ptr %buffer, i64 40 %block.sroa.412.0.copyload = load i32, ptr %block.sroa.412.0..sroa_idx, align 1 - %block.sroa.453.0..sroa_idx = getelementptr inbounds i8, ptr %buffer, i64 44 + %block.sroa.453.0..sroa_idx = getelementptr inbounds nuw i8, ptr %buffer, i64 44 %block.sroa.453.0.copyload = load i32, ptr %block.sroa.453.0..sroa_idx, align 1 - %block.sroa.494.0..sroa_idx = getelementptr inbounds i8, ptr %buffer, i64 48 + %block.sroa.494.0..sroa_idx = getelementptr inbounds nuw i8, ptr %buffer, i64 48 %block.sroa.494.0.copyload = load i32, ptr %block.sroa.494.0..sroa_idx, align 1 - %block.sroa.535.0..sroa_idx = getelementptr inbounds i8, ptr %buffer, i64 52 + %block.sroa.535.0..sroa_idx = getelementptr inbounds nuw i8, ptr %buffer, i64 52 %block.sroa.535.0.copyload = load i32, ptr %block.sroa.535.0..sroa_idx, align 1 - %block.sroa.576.0..sroa_idx = getelementptr inbounds i8, ptr %buffer, i64 56 + %block.sroa.576.0..sroa_idx = getelementptr inbounds nuw i8, ptr %buffer, i64 56 %block.sroa.576.0.copyload = load i32, ptr %block.sroa.576.0..sroa_idx, align 1 - %block.sroa.617.0..sroa_idx = getelementptr inbounds i8, ptr %buffer, i64 60 + %block.sroa.617.0..sroa_idx = getelementptr inbounds nuw i8, ptr %buffer, i64 60 %block.sroa.617.0.copyload = load i32, ptr %block.sroa.617.0..sroa_idx, align 1 %0 = load i32, ptr %state, align 4 - %arrayidx1 = getelementptr inbounds i8, ptr %state, i64 4 + %arrayidx1 = getelementptr inbounds nuw i8, ptr %state, i64 4 %1 = load i32, ptr %arrayidx1, align 4 - %arrayidx2 = getelementptr inbounds i8, ptr %state, i64 8 + %arrayidx2 = getelementptr inbounds nuw i8, ptr %state, i64 8 %2 = load i32, ptr %arrayidx2, align 4 - %arrayidx3 = getelementptr inbounds i8, ptr %state, i64 12 + %arrayidx3 = getelementptr inbounds nuw i8, ptr %state, i64 12 %3 = load i32, ptr %arrayidx3, align 4 - %arrayidx4 = getelementptr inbounds i8, ptr %state, i64 16 + %arrayidx4 = getelementptr inbounds nuw i8, ptr %state, i64 16 %4 = load i32, ptr %arrayidx4, align 4 %xor = xor i32 %3, %2 %and = and i32 %xor, %1 @@ -1041,16 +1041,16 @@ declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2 define dso_local void @SHA1Init(ptr nocapture noundef writeonly %context) local_unnamed_addr #3 { entry: store i32 1732584193, ptr %context, align 4 - %arrayidx2 = getelementptr inbounds i8, ptr %context, i64 4 + %arrayidx2 = getelementptr inbounds nuw i8, ptr %context, i64 4 store i32 -271733879, ptr %arrayidx2, align 4 - %arrayidx4 = getelementptr inbounds i8, ptr %context, i64 8 + %arrayidx4 = getelementptr inbounds nuw i8, ptr %context, i64 8 store i32 -1732584194, ptr %arrayidx4, align 4 - %arrayidx6 = getelementptr inbounds i8, ptr %context, i64 12 + %arrayidx6 = getelementptr inbounds nuw i8, ptr %context, i64 12 store i32 271733878, ptr %arrayidx6, align 4 - %arrayidx8 = getelementptr inbounds i8, ptr %context, i64 16 + %arrayidx8 = getelementptr inbounds nuw i8, ptr %context, i64 16 store i32 -1009589776, ptr %arrayidx8, align 4 - %count = getelementptr inbounds i8, ptr %context, i64 20 - %arrayidx9 = getelementptr inbounds i8, ptr %context, i64 24 + %count = getelementptr inbounds nuw i8, ptr %context, i64 20 + %arrayidx9 = getelementptr inbounds nuw i8, ptr %context, i64 24 store i32 0, ptr %arrayidx9, align 4 store i32 0, ptr %count, align 4 ret void @@ -1059,18 +1059,18 @@ entry: ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable define dso_local void @SHA1Update(ptr nocapture noundef %context, ptr nocapture noundef readonly %data, i32 noundef %len) local_unnamed_addr #4 { entry: - %count = getelementptr inbounds i8, ptr %context, i64 20 + %count = getelementptr inbounds nuw i8, ptr %context, i64 20 %0 = load i32, ptr %count, align 4 %shl = shl i32 %len, 3 %add = add i32 %0, %shl store i32 %add, ptr %count, align 4 %cmp = icmp ult i32 %add, %0 - %arrayidx4 = getelementptr inbounds i8, ptr %context, i64 24 + %arrayidx4 = getelementptr inbounds nuw i8, ptr %context, i64 24 %1 = load i32, ptr %arrayidx4, align 4 %inc = zext i1 %cmp to i32 %2 = add i32 %1, %inc %shr = lshr i32 %len, 29 - %arrayidx6 = getelementptr inbounds i8, ptr %context, i64 24 + %arrayidx6 = getelementptr inbounds nuw i8, ptr %context, i64 24 %add7 = add i32 %2, %shr store i32 %add7, ptr %arrayidx6, align 4 %shr8 = lshr i32 %0, 3 @@ -1080,9 +1080,9 @@ entry: br i1 %cmp10, label %if.then11, label %if.else if.then11: ; preds = %entry - %buffer = getelementptr inbounds i8, ptr %context, i64 28 + %buffer = getelementptr inbounds nuw i8, ptr %context, i64 28 %idxprom = zext nneg i32 %and to i64 - %arrayidx12 = getelementptr inbounds [64 x i8], ptr %buffer, i64 0, i64 %idxprom + %arrayidx12 = getelementptr inbounds nuw [64 x i8], ptr %buffer, i64 0, i64 %idxprom %sub = sub nuw nsw i32 64, %and %conv = zext nneg i32 %sub to i64 tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %arrayidx12, ptr noundef nonnull align 1 dereferenceable(1) %data, i64 %conv, i1 false) @@ -1094,7 +1094,7 @@ if.then11: ; preds = %entry for.body: ; preds = %if.then11, %for.body %i.026 = phi i32 [ %add22, %for.body ], [ %sub, %if.then11 ] %idxprom20 = zext i32 %i.026 to i64 - %arrayidx21 = getelementptr inbounds i8, ptr %data, i64 %idxprom20 + %arrayidx21 = getelementptr inbounds nuw i8, ptr %data, i64 %idxprom20 tail call void @SHA1Transform(ptr noundef %context, ptr noundef %arrayidx21) %add22 = add i32 %i.026, 64 %add15 = add i32 %i.026, 127 @@ -1108,10 +1108,10 @@ if.else: ; preds = %entry if.end23: ; preds = %for.body, %if.then11, %if.else %i.1 = phi i32 [ 0, %if.else ], [ %sub, %if.then11 ], [ %add22, %for.body ] %j.0 = phi i64 [ %3, %if.else ], [ 0, %if.then11 ], [ 0, %for.body ] - %buffer24 = getelementptr inbounds i8, ptr %context, i64 28 - %arrayidx26 = getelementptr inbounds [64 x i8], ptr %buffer24, i64 0, i64 %j.0 + %buffer24 = getelementptr inbounds nuw i8, ptr %context, i64 28 + %arrayidx26 = getelementptr inbounds nuw [64 x i8], ptr %buffer24, i64 0, i64 %j.0 %idxprom27 = zext i32 %i.1 to i64 - %arrayidx28 = getelementptr inbounds i8, ptr %data, i64 %idxprom27 + %arrayidx28 = getelementptr inbounds nuw i8, ptr %data, i64 %idxprom27 %sub29 = sub i32 %len, %i.1 %conv30 = zext i32 %sub29 to i64 tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %arrayidx26, ptr align 1 %arrayidx28, i64 %conv30, i1 false) @@ -1123,14 +1123,14 @@ define dso_local void @SHA1Final(ptr nocapture noundef writeonly %digest, ptr no entry: %finalcount = alloca [8 x i8], align 8 %c = alloca i8, align 1 - %count = getelementptr inbounds i8, ptr %context, i64 20 + %count = getelementptr inbounds nuw i8, ptr %context, i64 20 br label %for.body for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %cmp1 = icmp ult i64 %indvars.iv, 4 %idxprom = zext i1 %cmp1 to i64 - %arrayidx = getelementptr inbounds [2 x i32], ptr %count, i64 0, i64 %idxprom + %arrayidx = getelementptr inbounds nuw [2 x i32], ptr %count, i64 0, i64 %idxprom %0 = load i32, ptr %arrayidx, align 4 %indvars.iv.tr = trunc i64 %indvars.iv to i32 %1 = shl i32 %indvars.iv.tr, 3 @@ -1138,7 +1138,7 @@ for.body: ; preds = %entry, %for.body %mul = xor i32 %sub, 24 %shr = lshr i32 %0, %mul %conv = trunc i32 %shr to i8 - %arrayidx4 = getelementptr inbounds [8 x i8], ptr %finalcount, i64 0, i64 %indvars.iv + %arrayidx4 = getelementptr inbounds nuw [8 x i8], ptr %finalcount, i64 0, i64 %indvars.iv store i8 %conv, ptr %arrayidx4, align 1 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 8 @@ -1150,7 +1150,7 @@ for.end: ; preds = %for.body %add.i = add i32 %2, 8 store i32 %add.i, ptr %count, align 4 %cmp.i = icmp ugt i32 %2, -9 - %arrayidx4.i = getelementptr inbounds i8, ptr %context, i64 24 + %arrayidx4.i = getelementptr inbounds nuw i8, ptr %context, i64 24 %3 = load i32, ptr %arrayidx4.i, align 4 %inc.i = zext i1 %cmp.i to i32 %4 = add i32 %3, %inc.i @@ -1161,11 +1161,12 @@ for.end: ; preds = %for.body br i1 %cmp10.i, label %if.then11.i, label %if.else.i if.then11.i: ; preds = %for.end - %buffer.i = getelementptr inbounds i8, ptr %context, i64 28 - %arrayidx12.i = getelementptr inbounds i8, ptr %context, i64 91 + %buffer.i = getelementptr inbounds nuw i8, ptr %context, i64 28 + %arrayidx12.i = getelementptr inbounds nuw i8, ptr %context, i64 91 %5 = load i8, ptr %c, align 1 store i8 %5, ptr %arrayidx12.i, align 1 tail call void @SHA1Transform(ptr noundef nonnull %context, ptr noundef nonnull %buffer.i) + %.pre = load i32, ptr %count, align 4 br label %SHA1Update.exit if.else.i: ; preds = %for.end @@ -1173,22 +1174,22 @@ if.else.i: ; preds = %for.end br label %SHA1Update.exit SHA1Update.exit: ; preds = %if.then11.i, %if.else.i + %7 = phi i32 [ %add.i, %if.else.i ], [ %.pre, %if.then11.i ] %i.1.i = phi i32 [ 0, %if.else.i ], [ 1, %if.then11.i ] %j.0.i = phi i64 [ %6, %if.else.i ], [ 0, %if.then11.i ] - %buffer24.i = getelementptr inbounds i8, ptr %context, i64 28 - %arrayidx26.i = getelementptr inbounds [64 x i8], ptr %buffer24.i, i64 0, i64 %j.0.i + %buffer24.i = getelementptr inbounds nuw i8, ptr %context, i64 28 + %arrayidx26.i = getelementptr inbounds nuw [64 x i8], ptr %buffer24.i, i64 0, i64 %j.0.i %idxprom27.i = zext nneg i32 %i.1.i to i64 - %arrayidx28.i = getelementptr inbounds i8, ptr %c, i64 %idxprom27.i + %arrayidx28.i = getelementptr inbounds nuw i8, ptr %c, i64 %idxprom27.i %sub29.i = xor i32 %i.1.i, 1 %conv30.i = zext nneg i32 %sub29.i to i64 call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %arrayidx26.i, ptr nonnull readonly align 1 %arrayidx28.i, i64 %conv30.i, i1 false) - %7 = load i32, ptr %count, align 4 %and787 = and i32 %7, 504 %cmp8.not88 = icmp eq i32 %and787, 448 br i1 %cmp8.not88, label %while.end, label %while.body.preheader while.body.preheader: ; preds = %SHA1Update.exit - %arrayidx12.i38 = getelementptr inbounds i8, ptr %context, i64 91 + %arrayidx12.i38 = getelementptr inbounds nuw i8, ptr %context, i64 91 br label %while.body while.body: ; preds = %while.body.preheader, %SHA1Update.exit50 @@ -1209,6 +1210,7 @@ while.body: ; preds = %while.body.preheade if.then11.i35: ; preds = %while.body store i8 0, ptr %arrayidx12.i38, align 1 tail call void @SHA1Transform(ptr noundef nonnull %context, ptr noundef nonnull %buffer24.i) + %.pre98 = load i32, ptr %count, align 4 br label %SHA1Update.exit50 if.else.i26: ; preds = %while.body @@ -1216,15 +1218,15 @@ if.else.i26: ; preds = %while.body br label %SHA1Update.exit50 SHA1Update.exit50: ; preds = %if.then11.i35, %if.else.i26 + %12 = phi i32 [ %add.i17, %if.else.i26 ], [ %.pre98, %if.then11.i35 ] %i.1.i27 = phi i32 [ 0, %if.else.i26 ], [ 1, %if.then11.i35 ] %j.0.i28 = phi i64 [ %11, %if.else.i26 ], [ 0, %if.then11.i35 ] - %arrayidx26.i30 = getelementptr inbounds [64 x i8], ptr %buffer24.i, i64 0, i64 %j.0.i28 + %arrayidx26.i30 = getelementptr inbounds nuw [64 x i8], ptr %buffer24.i, i64 0, i64 %j.0.i28 %idxprom27.i31 = zext nneg i32 %i.1.i27 to i64 - %arrayidx28.i32 = getelementptr inbounds i8, ptr %c, i64 %idxprom27.i31 + %arrayidx28.i32 = getelementptr inbounds nuw i8, ptr %c, i64 %idxprom27.i31 %sub29.i33 = xor i32 %i.1.i27, 1 %conv30.i34 = zext nneg i32 %sub29.i33 to i64 call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %arrayidx26.i30, ptr nonnull readonly align 1 %arrayidx28.i32, i64 %conv30.i34, i1 false) - %12 = load i32, ptr %count, align 4 %and7 = and i32 %12, 504 %cmp8.not = icmp eq i32 %and7, 448 br i1 %cmp8.not, label %while.end, label %while.body, !llvm.loop !8 @@ -1238,7 +1240,7 @@ while.end: ; preds = %SHA1Update.exit50, %inc.i55 = zext i1 %cmp.i53 to i32 %14 = add i32 %13, %inc.i55 store i32 %14, ptr %arrayidx4.i, align 4 - %arrayidx12.i73 = getelementptr inbounds i8, ptr %context, i64 84 + %arrayidx12.i73 = getelementptr inbounds nuw i8, ptr %context, i64 84 %15 = load i64, ptr %finalcount, align 8 store i64 %15, ptr %arrayidx12.i73, align 1 tail call void @SHA1Transform(ptr noundef nonnull %context, ptr noundef nonnull %buffer24.i) @@ -1248,7 +1250,7 @@ for.body13: ; preds = %while.end, %for.bod %indvars.iv93 = phi i64 [ 0, %while.end ], [ %indvars.iv.next94, %for.body13 ] %shr14 = lshr i64 %indvars.iv93, 2 %idxprom15 = and i64 %shr14, 1073741823 - %arrayidx16 = getelementptr inbounds [5 x i32], ptr %context, i64 0, i64 %idxprom15 + %arrayidx16 = getelementptr inbounds nuw [5 x i32], ptr %context, i64 0, i64 %idxprom15 %16 = load i32, ptr %arrayidx16, align 4 %indvars.iv93.tr = trunc i64 %indvars.iv93 to i32 %17 = shl i32 %indvars.iv93.tr, 3 @@ -1256,7 +1258,7 @@ for.body13: ; preds = %while.end, %for.bod %mul19 = xor i32 %sub18, 24 %shr20 = lshr i32 %16, %mul19 %conv22 = trunc i32 %shr20 to i8 - %arrayidx24 = getelementptr inbounds i8, ptr %digest, i64 %indvars.iv93 + %arrayidx24 = getelementptr inbounds nuw i8, ptr %digest, i64 %indvars.iv93 store i8 %conv22, ptr %arrayidx24, align 1 %indvars.iv.next94 = add nuw nsw i64 %indvars.iv93, 1 %exitcond97.not = icmp eq i64 %indvars.iv.next94, 20 diff --git a/bench/ring-rs/optimized/33fkftca8afosh1u.ll b/bench/ring-rs/optimized/33fkftca8afosh1u.ll index 1391f133cf0..76131c582e0 100644 --- a/bench/ring-rs/optimized/33fkftca8afosh1u.ll +++ b/bench/ring-rs/optimized/33fkftca8afosh1u.ll @@ -36,7 +36,7 @@ define hidden void @"_ZN4core5array40_$LT$impl$u20$$u5b$T$u3b$$u20$N$u5d$$GT$3ma call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3), !noalias !18 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %3, ptr noundef nonnull align 4 dereferenceable(16) %1, i64 16, i1 false), !noalias !22 - %5 = getelementptr inbounds i8, ptr %3, i64 16 + %5 = getelementptr inbounds nuw i8, ptr %3, i64 16 call void @_ZN4core5array25try_from_trusted_iterator17h55af298352255ed7E.llvm.5814777820638942741(ptr noalias nocapture noundef nonnull sret({ [4 x [4 x i8]] }) align 1 dereferenceable(16) %4, ptr noundef nonnull %3, ptr noundef nonnull %5), !noalias !23 call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3), !noalias !18 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(16) %0, ptr noundef nonnull align 1 dereferenceable(16) %4, i64 16, i1 false) @@ -208,7 +208,7 @@ define hidden { i64, i64 } @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14grow_amorti %.0.sroa.speculated.i = tail call noundef i64 @llvm.umax.i64(i64 %9, i64 %5) %.0.sroa.speculated.i29 = tail call noundef i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i, i64 8) %10 = icmp slt i64 %.0.sroa.speculated.i29, 0 - %11 = getelementptr inbounds i8, ptr %0, i64 8 + %11 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val28 = load ptr, ptr %11, align 8 %12 = icmp eq i64 %8, 0 br i1 %12, label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h0afa8bac86c6b554E.exit", label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h0afa8bac86c6b554E.exit.thread" @@ -266,7 +266,7 @@ define hidden { i64, i64 } @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14grow_amorti %.0.sroa.speculated.i29 = tail call noundef i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i, i64 4) %10 = icmp ugt i64 %.0.sroa.speculated.i, 576460752303423487 %11 = shl nuw nsw i64 %.0.sroa.speculated.i29, 4 - %12 = getelementptr inbounds i8, ptr %0, i64 8 + %12 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val28 = load ptr, ptr %12, align 8 %13 = icmp eq i64 %8, 0 br i1 %13, label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h59c2fbb2645a050eE.exit", label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h59c2fbb2645a050eE.exit.thread" @@ -325,7 +325,7 @@ define hidden { i64, i64 } @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14grow_amorti %.0.sroa.speculated.i29 = tail call noundef i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i, i64 4) %10 = icmp ugt i64 %.0.sroa.speculated.i, 1152921504606846975 %11 = shl nuw nsw i64 %.0.sroa.speculated.i29, 3 - %12 = getelementptr inbounds i8, ptr %0, i64 8 + %12 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val28 = load ptr, ptr %12, align 8 %13 = icmp eq i64 %8, 0 br i1 %13, label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h0a2f3d91e85e1fe5E.exit", label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h0a2f3d91e85e1fe5E.exit.thread" @@ -384,7 +384,7 @@ define hidden void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$16reserve_for_push17h %.0.sroa.speculated.i.i = tail call noundef i64 @llvm.umax.i64(i64 %8, i64 %6) %.0.sroa.speculated.i29.i = tail call noundef i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i.i, i64 8) %9 = icmp slt i64 %.0.sroa.speculated.i29.i, 0 - %10 = getelementptr inbounds i8, ptr %0, i64 8 + %10 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val28.i = load ptr, ptr %10, align 8, !alias.scope !36 %11 = icmp eq i64 %7, 0 br i1 %11, label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h0afa8bac86c6b554E.exit.i", label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h0afa8bac86c6b554E.exit.thread.i" @@ -453,7 +453,7 @@ define hidden void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$16reserve_for_push17h %.0.sroa.speculated.i29.i = tail call noundef i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i.i, i64 4) %9 = icmp ugt i64 %.0.sroa.speculated.i.i, 164703072086692425 %10 = mul nuw nsw i64 %.0.sroa.speculated.i29.i, 56 - %11 = getelementptr inbounds i8, ptr %0, i64 8 + %11 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val28.i = load ptr, ptr %11, align 8, !alias.scope !43 %12 = icmp eq i64 %7, 0 br i1 %12, label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h75006c019592645dE.exit.i", label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h75006c019592645dE.exit.thread.i" @@ -507,19 +507,19 @@ define hidden { i64, i64 } @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$6shrink17h49f 5: ; preds = %2 call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) store ptr @anon.adac646b3b9121addee0cceb98d6625b.10, ptr %3, align 8 - %6 = getelementptr inbounds i8, ptr %3, i64 8 + %6 = getelementptr inbounds nuw i8, ptr %3, i64 8 store i64 1, ptr %6, align 8 - %7 = getelementptr inbounds i8, ptr %3, i64 32 + %7 = getelementptr inbounds nuw i8, ptr %3, i64 32 store ptr null, ptr %7, align 8 - %8 = getelementptr inbounds i8, ptr %3, i64 16 + %8 = getelementptr inbounds nuw i8, ptr %3, i64 16 store ptr @anon.adac646b3b9121addee0cceb98d6625b.0, ptr %8, align 8 - %9 = getelementptr inbounds i8, ptr %3, i64 24 + %9 = getelementptr inbounds nuw i8, ptr %3, i64 24 store i64 0, ptr %9, align 8 call void @_ZN4core9panicking9panic_fmt17h784f20a50eaab275E(ptr noalias nocapture noundef nonnull align 8 dereferenceable(48) %3, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.adac646b3b9121addee0cceb98d6625b.12) #23 unreachable 10: ; preds = %2 - %11 = getelementptr inbounds i8, ptr %0, i64 8 + %11 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val23 = load ptr, ptr %11, align 8 %12 = icmp eq i64 %4, 0 br i1 %12, label %19, label %13 @@ -564,19 +564,19 @@ define hidden { i64, i64 } @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$6shrink17h838 5: ; preds = %2 call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) store ptr @anon.adac646b3b9121addee0cceb98d6625b.10, ptr %3, align 8 - %6 = getelementptr inbounds i8, ptr %3, i64 8 + %6 = getelementptr inbounds nuw i8, ptr %3, i64 8 store i64 1, ptr %6, align 8 - %7 = getelementptr inbounds i8, ptr %3, i64 32 + %7 = getelementptr inbounds nuw i8, ptr %3, i64 32 store ptr null, ptr %7, align 8 - %8 = getelementptr inbounds i8, ptr %3, i64 16 + %8 = getelementptr inbounds nuw i8, ptr %3, i64 16 store ptr @anon.adac646b3b9121addee0cceb98d6625b.0, ptr %8, align 8 - %9 = getelementptr inbounds i8, ptr %3, i64 24 + %9 = getelementptr inbounds nuw i8, ptr %3, i64 24 store i64 0, ptr %9, align 8 call void @_ZN4core9panicking9panic_fmt17h784f20a50eaab275E(ptr noalias nocapture noundef nonnull align 8 dereferenceable(48) %3, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.adac646b3b9121addee0cceb98d6625b.12) #23 unreachable 10: ; preds = %2 - %11 = getelementptr inbounds i8, ptr %0, i64 8 + %11 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val23 = load ptr, ptr %11, align 8 %12 = icmp eq i64 %4, 0 br i1 %12, label %22, label %13 @@ -631,7 +631,7 @@ define hidden void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$7reserve21do_reserve_ %.0.sroa.speculated.i29.i = tail call noundef i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i.i, i64 4) %10 = icmp ugt i64 %.0.sroa.speculated.i.i, 1152921504606846975 %11 = shl nuw nsw i64 %.0.sroa.speculated.i29.i, 3 - %12 = getelementptr inbounds i8, ptr %0, i64 8 + %12 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val28.i = load ptr, ptr %12, align 8, !alias.scope !50 %13 = icmp eq i64 %8, 0 br i1 %13, label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h0a2f3d91e85e1fe5E.exit.i", label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h0a2f3d91e85e1fe5E.exit.thread.i" @@ -689,7 +689,7 @@ define hidden void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$7reserve21do_reserve_ %.0.sroa.speculated.i.i = tail call noundef i64 @llvm.umax.i64(i64 %9, i64 %7) %.0.sroa.speculated.i29.i = tail call noundef i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i.i, i64 8) %10 = icmp slt i64 %.0.sroa.speculated.i29.i, 0 - %11 = getelementptr inbounds i8, ptr %0, i64 8 + %11 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val28.i = load ptr, ptr %11, align 8, !alias.scope !57 %12 = icmp eq i64 %8, 0 br i1 %12, label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h0afa8bac86c6b554E.exit.i", label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h0afa8bac86c6b554E.exit.thread.i" @@ -758,7 +758,7 @@ define hidden void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$7reserve21do_reserve_ %.0.sroa.speculated.i29.i = tail call noundef i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i.i, i64 4) %10 = icmp ugt i64 %.0.sroa.speculated.i.i, 576460752303423487 %11 = shl nuw nsw i64 %.0.sroa.speculated.i29.i, 4 - %12 = getelementptr inbounds i8, ptr %0, i64 8 + %12 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val28.i = load ptr, ptr %12, align 8, !alias.scope !64 %13 = icmp eq i64 %8, 0 br i1 %13, label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h59c2fbb2645a050eE.exit.i", label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h59c2fbb2645a050eE.exit.thread.i" @@ -806,9 +806,9 @@ _ZN5alloc7raw_vec11finish_grow17he9c572a7ba3297a7E.exit.i: ; preds = %19, %15 define hidden void @"_ZN90_$LT$core..option..IntoIter$LT$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$9size_hint17h898bfe47992ec56bE.llvm.13593472205236004856"(ptr noalias nocapture noundef writeonly sret({ i64, { i64, i64 } }) align 8 dereferenceable(24) %0, ptr noalias nocapture noundef readonly align 8 dereferenceable(16) %1) unnamed_addr #7 { %3 = load i64, ptr %1, align 8, !range !4, !noundef !12 store i64 %3, ptr %0, align 8 - %4 = getelementptr inbounds i8, ptr %0, i64 8 + %4 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 1, ptr %4, align 8 - %5 = getelementptr inbounds i8, ptr %0, i64 16 + %5 = getelementptr inbounds nuw i8, ptr %0, i64 16 store i64 %3, ptr %5, align 8 ret void } @@ -820,7 +820,7 @@ define noundef zeroext i1 @_ZN4ring2ec10curve255196x2551930x25519_check_private_ ; Function Attrs: nonlazybind uwtable define noundef zeroext i1 @_ZN4ring2ec10curve255196x2551927x25519_generate_private_key17h03389574d17909b0E(ptr noundef nonnull align 1 %0, ptr noalias nocapture noundef readonly align 8 dereferenceable(24) %1, ptr noalias noundef nonnull align 1 %2, i64 noundef %3) unnamed_addr #2 { - %5 = getelementptr inbounds i8, ptr %1, i64 40 + %5 = getelementptr inbounds nuw i8, ptr %1, i64 40 %6 = load ptr, ptr %5, align 8, !invariant.load !12, !nonnull !12 %7 = tail call noundef zeroext i1 %6(ptr noundef nonnull align 1 %0, ptr noalias noundef nonnull align 1 %2, i64 noundef %3) ret i1 %7 @@ -836,7 +836,7 @@ define noundef zeroext i1 @_ZN4ring2ec10curve255196x2551926x25519_public_from_pr 6: ; preds = %3 tail call void @llvm.experimental.noalias.scope.decl(metadata !71) %7 = load ptr, ptr %2, align 8, !alias.scope !71, !nonnull !12, !align !74, !noundef !12 - %8 = getelementptr inbounds i8, ptr %7, i64 32 + %8 = getelementptr inbounds nuw i8, ptr %7, i64 32 %9 = load i64, ptr %8, align 8, !noalias !71, !noundef !12 %10 = icmp ugt i64 %9, 48 br i1 %10, label %11, label %_ZN4ring2ec4keys4Seed15bytes_less_safe17hd49c92e671dab9ceE.exit @@ -850,7 +850,7 @@ _ZN4ring2ec4keys4Seed15bytes_less_safe17hd49c92e671dab9ceE.exit: ; preds = %6 br i1 %.not16, label %12, label %18 12: ; preds = %_ZN4ring2ec4keys4Seed15bytes_less_safe17hd49c92e671dab9ceE.exit - %13 = getelementptr inbounds i8, ptr %2, i64 8 + %13 = getelementptr inbounds nuw i8, ptr %2, i64 8 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) %14 = load <32 x i8>, ptr %13, align 8 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4), !noalias !78 @@ -880,7 +880,7 @@ define noundef zeroext i1 @_ZN4ring2ec10curve255196x2551911x25519_ecdh17hf317766 %8 = alloca { [32 x i8] }, align 1 tail call void @llvm.experimental.noalias.scope.decl(metadata !83) %9 = load ptr, ptr %2, align 8, !alias.scope !83, !nonnull !12, !align !74, !noundef !12 - %10 = getelementptr inbounds i8, ptr %9, i64 32 + %10 = getelementptr inbounds nuw i8, ptr %9, i64 32 %11 = load i64, ptr %10, align 8, !noalias !83, !noundef !12 %12 = icmp ugt i64 %11, 48 br i1 %12, label %13, label %_ZN4ring2ec4keys4Seed15bytes_less_safe17hd49c92e671dab9ceE.exit @@ -894,7 +894,7 @@ _ZN4ring2ec4keys4Seed15bytes_less_safe17hd49c92e671dab9ceE.exit: ; preds = %5 br i1 %.not, label %14, label %23 14: ; preds = %_ZN4ring2ec4keys4Seed15bytes_less_safe17hd49c92e671dab9ceE.exit - %15 = getelementptr inbounds i8, ptr %2, i64 8 + %15 = getelementptr inbounds nuw i8, ptr %2, i64 8 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) %16 = load <32 x i8>, ptr %15, align 8 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6), !noalias !89 @@ -950,7 +950,7 @@ define noundef zeroext i1 @"_ZN4ring3rsa12verification93_$LT$impl$u20$ring..sign call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) store ptr %1, ptr %8, align 8, !noalias !99 - %11 = getelementptr inbounds i8, ptr %8, i64 8 + %11 = getelementptr inbounds nuw i8, ptr %8, i64 8 store i64 %2, ptr %11, align 8, !noalias !99 call void @_ZN9untrusted5input5Input8read_all17h43ed9def5937e2b1E(ptr noalias nocapture noundef nonnull sret({ ptr, [3 x i64] }) align 8 dereferenceable(32) %10, ptr noalias noundef nonnull readonly align 8 dereferenceable(16) %8) call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) @@ -963,20 +963,20 @@ define noundef zeroext i1 @"_ZN4ring3rsa12verification93_$LT$impl$u20$ring..sign br label %23 14: ; preds = %7 - %.sroa.46.0..sroa_idx = getelementptr inbounds i8, ptr %10, i64 8 + %.sroa.46.0..sroa_idx = getelementptr inbounds nuw i8, ptr %10, i64 8 %.sroa.46.0.copyload = load i64, ptr %.sroa.46.0..sroa_idx, align 8 - %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %10, i64 16 + %.sroa.5.0..sroa_idx = getelementptr inbounds nuw i8, ptr %10, i64 16 %.sroa.5.0.copyload = load ptr, ptr %.sroa.5.0..sroa_idx, align 8, !nonnull !12, !noundef !12 - %.sroa.6.0..sroa_idx = getelementptr inbounds i8, ptr %10, i64 24 + %.sroa.6.0..sroa_idx = getelementptr inbounds nuw i8, ptr %10, i64 24 %.sroa.6.0.copyload = load i64, ptr %.sroa.6.0..sroa_idx, align 8 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) store ptr %12, ptr %9, align 8 - %15 = getelementptr inbounds i8, ptr %9, i64 8 + %15 = getelementptr inbounds nuw i8, ptr %9, i64 8 store i64 %.sroa.46.0.copyload, ptr %15, align 8 - %16 = getelementptr inbounds i8, ptr %9, i64 16 + %16 = getelementptr inbounds nuw i8, ptr %9, i64 16 store ptr %.sroa.5.0.copyload, ptr %16, align 8 - %17 = getelementptr inbounds i8, ptr %9, i64 24 + %17 = getelementptr inbounds nuw i8, ptr %9, i64 24 store i64 %.sroa.6.0.copyload, ptr %17, align 8 %18 = call noundef i8 @_ZN4core4sync6atomic11atomic_load17h757d58c2fa035f26E.llvm.8403485840513791397(ptr noundef nonnull @_ZN4ring3cpu8features4INIT17hdec16924e286df23E, i8 noundef 2) %19 = icmp ult i8 %18, 4 diff --git a/bench/ruby/optimized/sha1.ll b/bench/ruby/optimized/sha1.ll index dd376382519..2f6bd755496 100644 --- a/bench/ruby/optimized/sha1.ll +++ b/bench/ruby/optimized/sha1.ll @@ -14,44 +14,44 @@ define weak i64 @ruby_abi_version() local_unnamed_addr #0 { ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define void @rb_Digest_SHA1_Transform(ptr nocapture noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #1 { %.sroa.0.0.copyload = load i32, ptr %1, align 1 - %.sroa.42.0..sroa_idx = getelementptr inbounds i8, ptr %1, i64 4 + %.sroa.42.0..sroa_idx = getelementptr inbounds nuw i8, ptr %1, i64 4 %.sroa.42.0.copyload = load i32, ptr %.sroa.42.0..sroa_idx, align 1 - %.sroa.83.0..sroa_idx = getelementptr inbounds i8, ptr %1, i64 8 + %.sroa.83.0..sroa_idx = getelementptr inbounds nuw i8, ptr %1, i64 8 %.sroa.83.0.copyload = load i32, ptr %.sroa.83.0..sroa_idx, align 1 - %.sroa.124.0..sroa_idx = getelementptr inbounds i8, ptr %1, i64 12 + %.sroa.124.0..sroa_idx = getelementptr inbounds nuw i8, ptr %1, i64 12 %.sroa.124.0.copyload = load i32, ptr %.sroa.124.0..sroa_idx, align 1 - %.sroa.165.0..sroa_idx = getelementptr inbounds i8, ptr %1, i64 16 + %.sroa.165.0..sroa_idx = getelementptr inbounds nuw i8, ptr %1, i64 16 %.sroa.165.0.copyload = load i32, ptr %.sroa.165.0..sroa_idx, align 1 - %.sroa.206.0..sroa_idx = getelementptr inbounds i8, ptr %1, i64 20 + %.sroa.206.0..sroa_idx = getelementptr inbounds nuw i8, ptr %1, i64 20 %.sroa.206.0.copyload = load i32, ptr %.sroa.206.0..sroa_idx, align 1 - %.sroa.247.0..sroa_idx = getelementptr inbounds i8, ptr %1, i64 24 + %.sroa.247.0..sroa_idx = getelementptr inbounds nuw i8, ptr %1, i64 24 %.sroa.247.0.copyload = load i32, ptr %.sroa.247.0..sroa_idx, align 1 - %.sroa.288.0..sroa_idx = getelementptr inbounds i8, ptr %1, i64 28 + %.sroa.288.0..sroa_idx = getelementptr inbounds nuw i8, ptr %1, i64 28 %.sroa.288.0.copyload = load i32, ptr %.sroa.288.0..sroa_idx, align 1 - %.sroa.329.0..sroa_idx = getelementptr inbounds i8, ptr %1, i64 32 + %.sroa.329.0..sroa_idx = getelementptr inbounds nuw i8, ptr %1, i64 32 %.sroa.329.0.copyload = load i32, ptr %.sroa.329.0..sroa_idx, align 1 - %.sroa.370.0..sroa_idx = getelementptr inbounds i8, ptr %1, i64 36 + %.sroa.370.0..sroa_idx = getelementptr inbounds nuw i8, ptr %1, i64 36 %.sroa.370.0.copyload = load i32, ptr %.sroa.370.0..sroa_idx, align 1 - %.sroa.411.0..sroa_idx = getelementptr inbounds i8, ptr %1, i64 40 + %.sroa.411.0..sroa_idx = getelementptr inbounds nuw i8, ptr %1, i64 40 %.sroa.411.0.copyload = load i32, ptr %.sroa.411.0..sroa_idx, align 1 - %.sroa.452.0..sroa_idx = getelementptr inbounds i8, ptr %1, i64 44 + %.sroa.452.0..sroa_idx = getelementptr inbounds nuw i8, ptr %1, i64 44 %.sroa.452.0.copyload = load i32, ptr %.sroa.452.0..sroa_idx, align 1 - %.sroa.493.0..sroa_idx = getelementptr inbounds i8, ptr %1, i64 48 + %.sroa.493.0..sroa_idx = getelementptr inbounds nuw i8, ptr %1, i64 48 %.sroa.493.0.copyload = load i32, ptr %.sroa.493.0..sroa_idx, align 1 - %.sroa.534.0..sroa_idx = getelementptr inbounds i8, ptr %1, i64 52 + %.sroa.534.0..sroa_idx = getelementptr inbounds nuw i8, ptr %1, i64 52 %.sroa.534.0.copyload = load i32, ptr %.sroa.534.0..sroa_idx, align 1 - %.sroa.575.0..sroa_idx = getelementptr inbounds i8, ptr %1, i64 56 + %.sroa.575.0..sroa_idx = getelementptr inbounds nuw i8, ptr %1, i64 56 %.sroa.575.0.copyload = load i32, ptr %.sroa.575.0..sroa_idx, align 1 - %.sroa.616.0..sroa_idx = getelementptr inbounds i8, ptr %1, i64 60 + %.sroa.616.0..sroa_idx = getelementptr inbounds nuw i8, ptr %1, i64 60 %.sroa.616.0.copyload = load i32, ptr %.sroa.616.0..sroa_idx, align 1 %3 = load i32, ptr %0, align 4 - %4 = getelementptr inbounds i8, ptr %0, i64 4 + %4 = getelementptr inbounds nuw i8, ptr %0, i64 4 %5 = load i32, ptr %4, align 4 - %6 = getelementptr inbounds i8, ptr %0, i64 8 + %6 = getelementptr inbounds nuw i8, ptr %0, i64 8 %7 = load i32, ptr %6, align 4 - %8 = getelementptr inbounds i8, ptr %0, i64 12 + %8 = getelementptr inbounds nuw i8, ptr %0, i64 12 %9 = load i32, ptr %8, align 4 - %10 = getelementptr inbounds i8, ptr %0, i64 16 + %10 = getelementptr inbounds nuw i8, ptr %0, i64 16 %11 = load i32, ptr %10, align 4 %12 = xor i32 %9, %7 %13 = and i32 %12, %5 @@ -1044,16 +1044,16 @@ declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: write) uwtable define noundef i32 @rb_Digest_SHA1_Init(ptr nocapture noundef writeonly %0) local_unnamed_addr #3 { store i32 1732584193, ptr %0, align 4 - %2 = getelementptr inbounds i8, ptr %0, i64 4 + %2 = getelementptr inbounds nuw i8, ptr %0, i64 4 store i32 -271733879, ptr %2, align 4 - %3 = getelementptr inbounds i8, ptr %0, i64 8 + %3 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i32 -1732584194, ptr %3, align 4 - %4 = getelementptr inbounds i8, ptr %0, i64 12 + %4 = getelementptr inbounds nuw i8, ptr %0, i64 12 store i32 271733878, ptr %4, align 4 - %5 = getelementptr inbounds i8, ptr %0, i64 16 + %5 = getelementptr inbounds nuw i8, ptr %0, i64 16 store i32 -1009589776, ptr %5, align 4 - %6 = getelementptr inbounds i8, ptr %0, i64 20 - %7 = getelementptr inbounds i8, ptr %0, i64 24 + %6 = getelementptr inbounds nuw i8, ptr %0, i64 20 + %7 = getelementptr inbounds nuw i8, ptr %0, i64 24 store i32 0, ptr %7, align 4 store i32 0, ptr %6, align 4 ret i32 1 @@ -1061,7 +1061,7 @@ define noundef i32 @rb_Digest_SHA1_Init(ptr nocapture noundef writeonly %0) loca ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable define void @rb_Digest_SHA1_Update(ptr nocapture noundef %0, ptr nocapture noundef readonly %1, i64 noundef %2) local_unnamed_addr #4 { - %4 = getelementptr inbounds i8, ptr %0, i64 20 + %4 = getelementptr inbounds nuw i8, ptr %0, i64 20 %5 = load i32, ptr %4, align 4 %.tr = trunc i64 %2 to i32 %6 = shl i32 %.tr, 3 @@ -1072,7 +1072,7 @@ define void @rb_Digest_SHA1_Update(ptr nocapture noundef %0, ptr nocapture nound 9: ; preds = %3 %10 = lshr i64 %2, 29 - %11 = getelementptr inbounds i8, ptr %0, i64 24 + %11 = getelementptr inbounds nuw i8, ptr %0, i64 24 %12 = load i32, ptr %11, align 4 %13 = trunc i64 %10 to i32 %14 = add i32 %13, 1 @@ -1089,8 +1089,8 @@ define void @rb_Digest_SHA1_Update(ptr nocapture noundef %0, ptr nocapture nound br i1 %21, label %22, label %._crit_edge 22: ; preds = %16 - %23 = getelementptr inbounds i8, ptr %0, i64 28 - %24 = getelementptr inbounds [64 x i8], ptr %23, i64 0, i64 %19 + %23 = getelementptr inbounds nuw i8, ptr %0, i64 28 + %24 = getelementptr inbounds nuw [64 x i8], ptr %23, i64 0, i64 %19 %25 = sub nuw nsw i32 64, %18 %26 = zext nneg i32 %25 to i64 tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %24, ptr noundef nonnull align 1 dereferenceable(1) %1, i64 %26, i1 false) @@ -1103,7 +1103,7 @@ define void @rb_Digest_SHA1_Update(ptr nocapture noundef %0, ptr nocapture nound .lr.ph: ; preds = %22, %.lr.ph %.02627 = phi i32 [ %32, %.lr.ph ], [ %25, %22 ] %30 = zext i32 %.02627 to i64 - %31 = getelementptr inbounds i8, ptr %1, i64 %30 + %31 = getelementptr inbounds nuw i8, ptr %1, i64 %30 tail call void @rb_Digest_SHA1_Transform(ptr noundef %0, ptr noundef %31) %32 = add i32 %.02627, 64 %33 = add i32 %.02627, 127 @@ -1118,9 +1118,9 @@ define void @rb_Digest_SHA1_Update(ptr nocapture noundef %0, ptr nocapture nound ._crit_edge: ; preds = %22, %._crit_edge.loopexit, %16 %.1 = phi i64 [ 0, %16 ], [ %.pre, %._crit_edge.loopexit ], [ %26, %22 ] %.0 = phi i64 [ %19, %16 ], [ 0, %._crit_edge.loopexit ], [ 0, %22 ] - %36 = getelementptr inbounds i8, ptr %0, i64 28 - %37 = getelementptr inbounds [64 x i8], ptr %36, i64 0, i64 %.0 - %38 = getelementptr inbounds i8, ptr %1, i64 %.1 + %36 = getelementptr inbounds nuw i8, ptr %0, i64 28 + %37 = getelementptr inbounds nuw [64 x i8], ptr %36, i64 0, i64 %.0 + %38 = getelementptr inbounds nuw i8, ptr %1, i64 %.1 %39 = sub i64 %2, %.1 tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %37, ptr align 1 %38, i64 %39, i1 false) ret void @@ -1129,14 +1129,14 @@ define void @rb_Digest_SHA1_Update(ptr nocapture noundef %0, ptr nocapture nound ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable define noundef i32 @rb_Digest_SHA1_Finish(ptr nocapture noundef %0, ptr noundef writeonly %1) local_unnamed_addr #4 { %3 = alloca [8 x i8], align 8 - %4 = getelementptr inbounds i8, ptr %0, i64 20 + %4 = getelementptr inbounds nuw i8, ptr %0, i64 20 br label %5 5: ; preds = %2, %5 %.033 = phi i64 [ 0, %2 ], [ %16, %5 ] %6 = icmp ult i64 %.033, 4 %7 = zext i1 %6 to i64 - %8 = getelementptr inbounds [2 x i32], ptr %4, i64 0, i64 %7 + %8 = getelementptr inbounds nuw [2 x i32], ptr %4, i64 0, i64 %7 %9 = load i32, ptr %8, align 4 %.0.tr = trunc nuw i64 %.033 to i32 %10 = shl nuw nsw i32 %.0.tr, 3 @@ -1144,7 +1144,7 @@ define noundef i32 @rb_Digest_SHA1_Finish(ptr nocapture noundef %0, ptr noundef %12 = xor i32 %11, 24 %13 = lshr i32 %9, %12 %14 = trunc i32 %13 to i8 - %15 = getelementptr inbounds [8 x i8], ptr %3, i64 0, i64 %.033 + %15 = getelementptr inbounds nuw [8 x i8], ptr %3, i64 0, i64 %.033 store i8 %14, ptr %15, align 1 %16 = add nuw nsw i64 %.033, 1 %exitcond.not = icmp eq i64 %16, 8 @@ -1158,7 +1158,7 @@ define noundef i32 @rb_Digest_SHA1_Finish(ptr nocapture noundef %0, ptr noundef br i1 %20, label %21, label %25 21: ; preds = %17 - %22 = getelementptr inbounds i8, ptr %0, i64 24 + %22 = getelementptr inbounds nuw i8, ptr %0, i64 24 %23 = load i32, ptr %22, align 4 %24 = add i32 %23, 1 store i32 %24, ptr %22, align 4 @@ -1172,31 +1172,32 @@ define noundef i32 @rb_Digest_SHA1_Finish(ptr nocapture noundef %0, ptr noundef br i1 %29, label %30, label %rb_Digest_SHA1_Update.exit 30: ; preds = %25 - %31 = getelementptr inbounds i8, ptr %0, i64 28 - %32 = getelementptr inbounds [64 x i8], ptr %31, i64 0, i64 %28 + %31 = getelementptr inbounds nuw i8, ptr %0, i64 28 + %32 = getelementptr inbounds nuw [64 x i8], ptr %31, i64 0, i64 %28 store i8 -128, ptr %32, align 1 tail call void @rb_Digest_SHA1_Transform(ptr noundef nonnull %0, ptr noundef nonnull %31) + %.pre = load i32, ptr %4, align 4 br label %rb_Digest_SHA1_Update.exit rb_Digest_SHA1_Update.exit: ; preds = %30, %25 + %33 = phi i32 [ %19, %25 ], [ %.pre, %30 ] %.1.i = phi i64 [ 0, %25 ], [ 1, %30 ] %.0.i = phi i64 [ %28, %25 ], [ 0, %30 ] - %33 = getelementptr inbounds i8, ptr %0, i64 28 - %34 = getelementptr inbounds [64 x i8], ptr %33, i64 0, i64 %.0.i - %35 = getelementptr inbounds i8, ptr @.str, i64 %.1.i - %36 = xor i64 %.1.i, 1 - tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %34, ptr nonnull readonly align 1 %35, i64 %36, i1 false) - %37 = load i32, ptr %4, align 4 - %38 = and i32 %37, 504 + %34 = getelementptr inbounds nuw i8, ptr %0, i64 28 + %35 = getelementptr inbounds nuw [64 x i8], ptr %34, i64 0, i64 %.0.i + %36 = getelementptr inbounds nuw i8, ptr @.str, i64 %.1.i + %37 = xor i64 %.1.i, 1 + tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %35, ptr nonnull readonly align 1 %36, i64 %37, i1 false) + %38 = and i32 %33, 504 %.not34 = icmp eq i32 %38, 448 br i1 %.not34, label %._crit_edge, label %.lr.ph .lr.ph: ; preds = %rb_Digest_SHA1_Update.exit - %39 = getelementptr inbounds i8, ptr %0, i64 24 + %39 = getelementptr inbounds nuw i8, ptr %0, i64 24 br label %40 40: ; preds = %.lr.ph, %rb_Digest_SHA1_Update.exit25 - %41 = phi i32 [ %37, %.lr.ph ], [ %57, %rb_Digest_SHA1_Update.exit25 ] + %41 = phi i32 [ %33, %.lr.ph ], [ %54, %rb_Digest_SHA1_Update.exit25 ] %42 = add i32 %41, 8 store i32 %42, ptr %4, align 4 %43 = icmp ugt i32 %41, -9 @@ -1216,49 +1217,50 @@ rb_Digest_SHA1_Update.exit: ; preds = %30, %25 br i1 %51, label %52, label %rb_Digest_SHA1_Update.exit25 52: ; preds = %47 - %53 = getelementptr inbounds [64 x i8], ptr %33, i64 0, i64 %50 + %53 = getelementptr inbounds nuw [64 x i8], ptr %34, i64 0, i64 %50 store i8 0, ptr %53, align 1 - tail call void @rb_Digest_SHA1_Transform(ptr noundef nonnull %0, ptr noundef nonnull %33) + tail call void @rb_Digest_SHA1_Transform(ptr noundef nonnull %0, ptr noundef nonnull %34) + %.pre38 = load i32, ptr %4, align 4 br label %rb_Digest_SHA1_Update.exit25 rb_Digest_SHA1_Update.exit25: ; preds = %52, %47 + %54 = phi i32 [ %42, %47 ], [ %.pre38, %52 ] %.1.i19 = phi i64 [ 0, %47 ], [ 1, %52 ] %.0.i20 = phi i64 [ %50, %47 ], [ 0, %52 ] - %54 = getelementptr inbounds [64 x i8], ptr %33, i64 0, i64 %.0.i20 - %55 = getelementptr inbounds i8, ptr @.str.1, i64 %.1.i19 - %56 = xor i64 %.1.i19, 1 - tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %54, ptr nonnull readonly align 1 %55, i64 %56, i1 false) - %57 = load i32, ptr %4, align 4 - %58 = and i32 %57, 504 + %55 = getelementptr inbounds nuw [64 x i8], ptr %34, i64 0, i64 %.0.i20 + %56 = getelementptr inbounds nuw i8, ptr @.str.1, i64 %.1.i19 + %57 = xor i64 %.1.i19, 1 + tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %55, ptr nonnull readonly align 1 %56, i64 %57, i1 false) + %58 = and i32 %54, 504 %.not = icmp eq i32 %58, 448 br i1 %.not, label %._crit_edge, label %40, !llvm.loop !9 ._crit_edge: ; preds = %rb_Digest_SHA1_Update.exit25, %rb_Digest_SHA1_Update.exit - %.lcssa = phi i32 [ %37, %rb_Digest_SHA1_Update.exit ], [ %57, %rb_Digest_SHA1_Update.exit25 ] + %.lcssa = phi i32 [ %33, %rb_Digest_SHA1_Update.exit ], [ %54, %rb_Digest_SHA1_Update.exit25 ] %59 = add i32 %.lcssa, 64 store i32 %59, ptr %4, align 4 %60 = icmp ugt i32 %.lcssa, -65 br i1 %60, label %61, label %rb_Digest_SHA1_Update.exit32 61: ; preds = %._crit_edge - %62 = getelementptr inbounds i8, ptr %0, i64 24 + %62 = getelementptr inbounds nuw i8, ptr %0, i64 24 %63 = load i32, ptr %62, align 4 %64 = add i32 %63, 1 store i32 %64, ptr %62, align 4 br label %rb_Digest_SHA1_Update.exit32 rb_Digest_SHA1_Update.exit32: ; preds = %._crit_edge, %61 - %65 = getelementptr inbounds i8, ptr %0, i64 84 + %65 = getelementptr inbounds nuw i8, ptr %0, i64 84 %66 = load i64, ptr %3, align 8 store i64 %66, ptr %65, align 1 - tail call void @rb_Digest_SHA1_Transform(ptr noundef nonnull %0, ptr noundef nonnull %33) + tail call void @rb_Digest_SHA1_Transform(ptr noundef nonnull %0, ptr noundef nonnull %34) %.not18 = icmp eq ptr %1, null br i1 %.not18, label %.loopexit, label %.preheader .preheader: ; preds = %rb_Digest_SHA1_Update.exit32, %.preheader %.135 = phi i64 [ %76, %.preheader ], [ 0, %rb_Digest_SHA1_Update.exit32 ] %67 = lshr i64 %.135, 2 - %68 = getelementptr inbounds [5 x i32], ptr %0, i64 0, i64 %67 + %68 = getelementptr inbounds nuw [5 x i32], ptr %0, i64 0, i64 %67 %69 = load i32, ptr %68, align 4 %.1.tr = trunc nuw i64 %.135 to i32 %70 = shl nuw nsw i32 %.1.tr, 3 @@ -1266,7 +1268,7 @@ rb_Digest_SHA1_Update.exit32: ; preds = %._crit_edge, %61 %72 = xor i32 %71, 24 %73 = lshr i32 %69, %72 %74 = trunc i32 %73 to i8 - %75 = getelementptr inbounds i8, ptr %1, i64 %.135 + %75 = getelementptr inbounds nuw i8, ptr %1, i64 %.135 store i8 %74, ptr %75, align 1 %76 = add nuw nsw i64 %.135, 1 %exitcond37.not = icmp eq i64 %76, 20 diff --git a/bench/smol-rs/optimized/21eidrukyvr99qqv.ll b/bench/smol-rs/optimized/21eidrukyvr99qqv.ll index 93492876f6e..c5aa2196ac1 100644 --- a/bench/smol-rs/optimized/21eidrukyvr99qqv.ll +++ b/bench/smol-rs/optimized/21eidrukyvr99qqv.ll @@ -18,7 +18,7 @@ target triple = "x86_64-unknown-linux-gnu" ; Function Attrs: nofree norecurse nounwind nonlazybind memory(argmem: readwrite) uwtable define hidden noundef range(i64 -288230376151711774, -9223372036854775808) i64 @"_ZN16concurrent_queue9unbounded18Unbounded$LT$T$GT$3len17hf62debd4aa91de24E"(ptr nocapture noundef nonnull readonly align 128 %0) unnamed_addr #0 { - %2 = getelementptr inbounds i8, ptr %0, i64 128 + %2 = getelementptr inbounds nuw i8, ptr %0, i64 128 br label %3 3: ; preds = %3, %1 @@ -54,9 +54,9 @@ define hidden noundef range(i64 -288230376151711774, -9223372036854775808) i64 @ define hidden void @"_ZN16concurrent_queue9unbounded18Unbounded$LT$T$GT$3pop17h43f03a82c69d4189E"(ptr noalias nocapture noundef writeonly sret({ i8, [15 x i8] }) align 8 dereferenceable(16) %0, ptr nocapture noundef nonnull align 128 %1) unnamed_addr #1 personality ptr @rust_eh_personality { %3 = alloca i64, align 8 %4 = load atomic i64, ptr %1 acquire, align 128 - %5 = getelementptr inbounds i8, ptr %1, i64 8 + %5 = getelementptr inbounds nuw i8, ptr %1, i64 8 %6 = load atomic i64, ptr %5 acquire, align 8 - %7 = getelementptr inbounds i8, ptr %1, i64 128 + %7 = getelementptr inbounds nuw i8, ptr %1, i64 128 br label %8 8: ; preds = %.backedge, %2 @@ -103,7 +103,7 @@ define hidden void @"_ZN16concurrent_queue9unbounded18Unbounded$LT$T$GT$3pop17h4 25: ; preds = %19 %26 = and i64 %20, 1 %27 = icmp eq i64 %26, 0 - %28 = getelementptr inbounds i8, ptr %0, i64 1 + %28 = getelementptr inbounds nuw i8, ptr %0, i64 1 br i1 %27, label %31, label %32 29: ; preds = %23, %12 @@ -145,7 +145,7 @@ define hidden void @"_ZN16concurrent_queue9unbounded18Unbounded$LT$T$GT$3pop17h4 br label %.backedge 44: ; preds = %39 - %45 = getelementptr inbounds i8, ptr %.0.le, i64 496 + %45 = getelementptr inbounds nuw i8, ptr %.0.le, i64 496 %46 = load atomic i64, ptr %45 acquire, align 8 %47 = icmp eq i64 %46, 0 br i1 %47, label %.lr.ph.i, label %"_ZN16concurrent_queue9unbounded14Block$LT$T$GT$9wait_next17h7e4718c820f60d76E.exit" @@ -161,7 +161,7 @@ define hidden void @"_ZN16concurrent_queue9unbounded18Unbounded$LT$T$GT$3pop17h4 %.0.i.i = inttoptr i64 %.lcssa.i to ptr %50 = and i64 %.019, -2 %51 = add i64 %50, 2 - %52 = getelementptr inbounds i8, ptr %.0.i.i, i64 496 + %52 = getelementptr inbounds nuw i8, ptr %.0.i.i, i64 496 %53 = load atomic i64, ptr %52 monotonic, align 8 %54 = icmp ne i64 %53, 0 %55 = zext i1 %54 to i64 @@ -171,8 +171,8 @@ define hidden void @"_ZN16concurrent_queue9unbounded18Unbounded$LT$T$GT$3pop17h4 br label %56 56: ; preds = %39, %"_ZN16concurrent_queue9unbounded14Block$LT$T$GT$9wait_next17h7e4718c820f60d76E.exit" - %57 = getelementptr inbounds { ptr, { i64 } }, ptr %.0.le, i64 %10 - %58 = getelementptr inbounds i8, ptr %57, i64 8 + %57 = getelementptr inbounds nuw { ptr, { i64 } }, ptr %.0.le, i64 %10 + %58 = getelementptr inbounds nuw i8, ptr %57, i64 8 %59 = load atomic i64, ptr %58 acquire, align 8 %60 = and i64 %59, 1 %61 = icmp eq i64 %60, 0 @@ -198,7 +198,7 @@ define hidden void @"_ZN16concurrent_queue9unbounded18Unbounded$LT$T$GT$3pop17h4 .lr.ph.i34: ; preds = %"_ZN16concurrent_queue9unbounded13Slot$LT$T$GT$10wait_write17hc0bbce794cc99c69E.exit", %79 %.sroa.01.010.i = phi i64 [ %70, %79 ], [ 0, %"_ZN16concurrent_queue9unbounded13Slot$LT$T$GT$10wait_write17hc0bbce794cc99c69E.exit" ] %70 = add nuw nsw i64 %.sroa.01.010.i, 1 - %71 = getelementptr inbounds { ptr, { i64 } }, ptr %.0.le, i64 %.sroa.01.010.i, i32 1 + %71 = getelementptr inbounds nuw { ptr, { i64 } }, ptr %.0.le, i64 %.sroa.01.010.i, i32 1 %72 = load atomic i64, ptr %71 acquire, align 8 %73 = and i64 %72, 2 %74 = icmp eq i64 %73, 0 @@ -221,7 +221,7 @@ define hidden void @"_ZN16concurrent_queue9unbounded18Unbounded$LT$T$GT$3pop17h4 .lr.ph.i36: ; preds = %80, %91 %.sroa.01.010.i37 = phi i64 [ %82, %91 ], [ %40, %80 ] %82 = add nuw nsw i64 %.sroa.01.010.i37, 1 - %83 = getelementptr inbounds { ptr, { i64 } }, ptr %.0.le, i64 %.sroa.01.010.i37, i32 1 + %83 = getelementptr inbounds nuw { ptr, { i64 } }, ptr %.0.le, i64 %.sroa.01.010.i37, i32 1 %84 = load atomic i64, ptr %83 acquire, align 8 %85 = and i64 %84, 2 %86 = icmp eq i64 %85, 0 @@ -244,7 +244,7 @@ define hidden void @"_ZN16concurrent_queue9unbounded18Unbounded$LT$T$GT$3pop17h4 "_ZN16concurrent_queue9unbounded14Block$LT$T$GT$7destroy17h0d81b4a9a06c8c79E.exit": ; preds = %87, %75, %"_ZN16concurrent_queue9unbounded14Block$LT$T$GT$7destroy17h0d81b4a9a06c8c79E.exit.sink.split", %66 %92 = icmp ne ptr %65, null call void @llvm.assume(i1 %92) - %93 = getelementptr inbounds i8, ptr %0, i64 8 + %93 = getelementptr inbounds nuw i8, ptr %0, i64 8 store ptr %65, ptr %93, align 8 br label %33 } @@ -257,16 +257,16 @@ define hidden { i64, ptr } @"_ZN16concurrent_queue9unbounded18Unbounded$LT$T$GT$ %.sroa.0 = alloca [31 x { ptr, { i64 } }], align 8 %5 = alloca ptr, align 8 store ptr %1, ptr %5, align 8 - %6 = getelementptr inbounds i8, ptr %0, i64 128 + %6 = getelementptr inbounds nuw i8, ptr %0, i64 128 %7 = load atomic i64, ptr %6 acquire, align 128 - %8 = getelementptr inbounds i8, ptr %0, i64 136 + %8 = getelementptr inbounds nuw i8, ptr %0, i64 136 %9 = load atomic i64, ptr %8 acquire, align 8 %10 = and i64 %7, 1 %11 = icmp eq i64 %10, 0 br i1 %11, label %.lr.ph.lr.ph, label %.thread92 .lr.ph.lr.ph: ; preds = %2 - %12 = getelementptr inbounds i8, ptr %0, i64 8 + %12 = getelementptr inbounds nuw i8, ptr %0, i64 8 br label %.lr.ph .lr.ph: ; preds = %.lr.ph.lr.ph, %.outer.backedge @@ -315,7 +315,7 @@ define hidden { i64, ptr } @"_ZN16concurrent_queue9unbounded18Unbounded$LT$T$GT$ 24: ; preds = %23, %24 %25 = phi i64 [ 0, %23 ], [ %27, %24 ] - %26 = getelementptr inbounds [31 x { ptr, { i64 } }], ptr %4, i64 0, i64 %25 + %26 = getelementptr inbounds nuw [31 x { ptr, { i64 } }], ptr %4, i64 0, i64 %25 call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %26, i8 0, i64 16, i1 false) %27 = add nuw nsw i64 %25, 1 %exitcond.not = icmp eq i64 %27, 31 @@ -343,7 +343,7 @@ define hidden { i64, ptr } @"_ZN16concurrent_queue9unbounded18Unbounded$LT$T$GT$ 34: ; preds = %28 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(496) %30, ptr noundef nonnull align 8 dereferenceable(496) %.sroa.0, i64 496, i1 false) - %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %30, i64 496 + %.sroa.4.0..sroa_idx = getelementptr inbounds nuw i8, ptr %30, i64 496 store ptr null, ptr %.sroa.4.0..sroa_idx, align 8 call void @llvm.lifetime.end.p0(i64 496, ptr nonnull %.sroa.0) br label %21 @@ -355,7 +355,7 @@ define hidden { i64, ptr } @"_ZN16concurrent_queue9unbounded18Unbounded$LT$T$GT$ 36: ; preds = %35, %36 %37 = phi i64 [ 0, %35 ], [ %39, %36 ] - %38 = getelementptr inbounds [31 x { ptr, { i64 } }], ptr %3, i64 0, i64 %37 + %38 = getelementptr inbounds nuw [31 x { ptr, { i64 } }], ptr %3, i64 0, i64 %37 call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %38, i8 0, i64 16, i1 false) %39 = add nuw nsw i64 %37, 1 %exitcond153.not = icmp eq i64 %39, 31 @@ -378,7 +378,7 @@ define hidden { i64, ptr } @"_ZN16concurrent_queue9unbounded18Unbounded$LT$T$GT$ 45: ; preds = %40 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(496) %42, ptr noundef nonnull align 8 dereferenceable(496) %.sroa.074, i64 496, i1 false) - %.sroa.475.0..sroa_idx = getelementptr inbounds i8, ptr %42, i64 496 + %.sroa.475.0..sroa_idx = getelementptr inbounds nuw i8, ptr %42, i64 496 store ptr null, ptr %.sroa.475.0..sroa_idx, align 8 call void @llvm.lifetime.end.p0(i64 496, ptr nonnull %.sroa.074) %46 = ptrtoint ptr %42 to i64 @@ -416,7 +416,7 @@ define hidden { i64, ptr } @"_ZN16concurrent_queue9unbounded18Unbounded$LT$T$GT$ %60 = getelementptr inbounds { ptr, { i64 } }, ptr %.148, i64 %.lcssa %61 = load ptr, ptr %5, align 8, !nonnull !5, !noundef !5 store ptr %61, ptr %60, align 8 - %62 = getelementptr inbounds i8, ptr %60, i64 8 + %62 = getelementptr inbounds nuw i8, ptr %60, i64 8 %63 = atomicrmw or ptr %62, i64 1 release, align 8 br label %92 @@ -539,13 +539,13 @@ define hidden noundef i64 @_ZN4core4sync6atomic11atomic_load17hac1ab610c8d17e1aE 8: ; preds = %2 call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) store ptr @anon.60dc83571d0520d1461fff57d310e5fe.10, ptr %4, align 8 - %9 = getelementptr inbounds i8, ptr %4, i64 8 + %9 = getelementptr inbounds nuw i8, ptr %4, i64 8 store i64 1, ptr %9, align 8 - %10 = getelementptr inbounds i8, ptr %4, i64 32 + %10 = getelementptr inbounds nuw i8, ptr %4, i64 32 store ptr null, ptr %10, align 8 - %11 = getelementptr inbounds i8, ptr %4, i64 16 + %11 = getelementptr inbounds nuw i8, ptr %4, i64 16 store ptr @anon.60dc83571d0520d1461fff57d310e5fe.4, ptr %11, align 8 - %12 = getelementptr inbounds i8, ptr %4, i64 24 + %12 = getelementptr inbounds nuw i8, ptr %4, i64 24 store i64 0, ptr %12, align 8 call void @_ZN4core9panicking9panic_fmt17h784f20a50eaab275E(ptr noalias nocapture noundef nonnull align 8 dereferenceable(48) %4, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.60dc83571d0520d1461fff57d310e5fe.12) #12 unreachable @@ -557,13 +557,13 @@ define hidden noundef i64 @_ZN4core4sync6atomic11atomic_load17hac1ab610c8d17e1aE 15: ; preds = %2 call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) store ptr @anon.60dc83571d0520d1461fff57d310e5fe.14, ptr %3, align 8 - %16 = getelementptr inbounds i8, ptr %3, i64 8 + %16 = getelementptr inbounds nuw i8, ptr %3, i64 8 store i64 1, ptr %16, align 8 - %17 = getelementptr inbounds i8, ptr %3, i64 32 + %17 = getelementptr inbounds nuw i8, ptr %3, i64 32 store ptr null, ptr %17, align 8 - %18 = getelementptr inbounds i8, ptr %3, i64 16 + %18 = getelementptr inbounds nuw i8, ptr %3, i64 16 store ptr @anon.60dc83571d0520d1461fff57d310e5fe.4, ptr %18, align 8 - %19 = getelementptr inbounds i8, ptr %3, i64 24 + %19 = getelementptr inbounds nuw i8, ptr %3, i64 24 store i64 0, ptr %19, align 8 call void @_ZN4core9panicking9panic_fmt17h784f20a50eaab275E(ptr noalias nocapture noundef nonnull align 8 dereferenceable(48) %3, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.60dc83571d0520d1461fff57d310e5fe.15) #12 unreachable diff --git a/bench/stb/optimized/stb_hexwave.c.ll b/bench/stb/optimized/stb_hexwave.c.ll index dbb193ebd3e..e70ae47a93f 100644 --- a/bench/stb/optimized/stb_hexwave.c.ll +++ b/bench/stb/optimized/stb_hexwave.c.ll @@ -11,23 +11,23 @@ target triple = "x86_64-unknown-linux-gnu" ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: write) uwtable define void @hexwave_change(ptr nocapture noundef writeonly %hex, i32 noundef %reflect, float noundef %peak_time, float noundef %half_height, float noundef %zero_wait) local_unnamed_addr #0 { entry: - %pending = getelementptr inbounds i8, ptr %hex, i64 24 + %pending = getelementptr inbounds nuw i8, ptr %hex, i64 24 store i32 %reflect, ptr %pending, align 4 %cmp = fcmp olt float %peak_time, 0.000000e+00 %cmp2 = fcmp ogt float %peak_time, 1.000000e+00 %cond = select i1 %cmp2, float 1.000000e+00, float %peak_time %cond6 = select i1 %cmp, float 0.000000e+00, float %cond - %peak_time8 = getelementptr inbounds i8, ptr %hex, i64 28 + %peak_time8 = getelementptr inbounds nuw i8, ptr %hex, i64 28 store float %cond6, ptr %peak_time8, align 4 - %half_height10 = getelementptr inbounds i8, ptr %hex, i64 36 + %half_height10 = getelementptr inbounds nuw i8, ptr %hex, i64 36 store float %half_height, ptr %half_height10, align 4 %cmp11 = fcmp olt float %zero_wait, 0.000000e+00 %cmp14 = fcmp ogt float %zero_wait, 1.000000e+00 %cond18 = select i1 %cmp14, float 1.000000e+00, float %zero_wait %cond20 = select i1 %cmp11, float 0.000000e+00, float %cond18 - %zero_wait22 = getelementptr inbounds i8, ptr %hex, i64 32 + %zero_wait22 = getelementptr inbounds nuw i8, ptr %hex, i64 32 store float %cond20, ptr %zero_wait22, align 4 - %have_pending = getelementptr inbounds i8, ptr %hex, i64 40 + %have_pending = getelementptr inbounds nuw i8, ptr %hex, i64 40 store i32 1, ptr %have_pending, align 4 ret void } @@ -36,27 +36,27 @@ entry: define void @hexwave_create(ptr nocapture noundef %hex, i32 noundef %reflect, float noundef %peak_time, float noundef %half_height, float noundef %zero_wait) local_unnamed_addr #1 { entry: tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(300) %hex, i8 0, i64 300, i1 false) - %pending.i = getelementptr inbounds i8, ptr %hex, i64 24 + %pending.i = getelementptr inbounds nuw i8, ptr %hex, i64 24 store i32 %reflect, ptr %pending.i, align 4 %cmp.i = fcmp olt float %peak_time, 0.000000e+00 %cmp2.i = fcmp ogt float %peak_time, 1.000000e+00 %cond.i = select i1 %cmp2.i, float 1.000000e+00, float %peak_time %cond6.i = select i1 %cmp.i, float 0.000000e+00, float %cond.i - %peak_time8.i = getelementptr inbounds i8, ptr %hex, i64 28 + %peak_time8.i = getelementptr inbounds nuw i8, ptr %hex, i64 28 store float %cond6.i, ptr %peak_time8.i, align 4 - %half_height10.i = getelementptr inbounds i8, ptr %hex, i64 36 + %half_height10.i = getelementptr inbounds nuw i8, ptr %hex, i64 36 store float %half_height, ptr %half_height10.i, align 4 %cmp11.i = fcmp olt float %zero_wait, 0.000000e+00 %cmp14.i = fcmp ogt float %zero_wait, 1.000000e+00 %cond18.i = select i1 %cmp14.i, float 1.000000e+00, float %zero_wait %cond20.i = select i1 %cmp11.i, float 0.000000e+00, float %cond18.i - %zero_wait22.i = getelementptr inbounds i8, ptr %hex, i64 32 + %zero_wait22.i = getelementptr inbounds nuw i8, ptr %hex, i64 32 store float %cond20.i, ptr %zero_wait22.i, align 4 - %have_pending.i = getelementptr inbounds i8, ptr %hex, i64 40 - %current = getelementptr inbounds i8, ptr %hex, i64 8 + %have_pending.i = getelementptr inbounds nuw i8, ptr %hex, i64 40 + %current = getelementptr inbounds nuw i8, ptr %hex, i64 8 tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %current, ptr noundef nonnull align 4 dereferenceable(16) %pending.i, i64 16, i1 false) store i32 0, ptr %have_pending.i, align 4 - %prev_dt = getelementptr inbounds i8, ptr %hex, i64 4 + %prev_dt = getelementptr inbounds nuw i8, ptr %hex, i64 4 store float 0.000000e+00, ptr %prev_dt, align 4 ret void } @@ -97,13 +97,13 @@ for.body.preheader: ; preds = %entry for.body: ; preds = %for.body.preheader, %for.body %indvars.iv = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next, %for.body ] - %arrayidx13 = getelementptr inbounds float, ptr %arrayidx, i64 %indvars.iv + %arrayidx13 = getelementptr inbounds nuw float, ptr %arrayidx, i64 %indvars.iv %3 = load float, ptr %arrayidx13, align 4 - %arrayidx15 = getelementptr inbounds float, ptr %arrayidx6, i64 %indvars.iv + %arrayidx15 = getelementptr inbounds nuw float, ptr %arrayidx6, i64 %indvars.iv %4 = load float, ptr %arrayidx15, align 4 %sub18 = fsub float %4, %3 %5 = tail call float @llvm.fmuladd.f32(float %sub18, float %2, float %3) - %arrayidx22 = getelementptr inbounds float, ptr %output, i64 %indvars.iv + %arrayidx22 = getelementptr inbounds nuw float, ptr %output, i64 %indvars.iv %6 = load float, ptr %arrayidx22, align 4 %7 = tail call float @llvm.fmuladd.f32(float %scale, float %5, float %6) store float %7, ptr %arrayidx22, align 4 @@ -149,13 +149,13 @@ for.body.preheader.i: ; preds = %entry for.body.i: ; preds = %for.body.i, %for.body.preheader.i %indvars.iv.i = phi i64 [ 0, %for.body.preheader.i ], [ %indvars.iv.next.i, %for.body.i ] - %arrayidx13.i = getelementptr inbounds float, ptr %arrayidx.i, i64 %indvars.iv.i + %arrayidx13.i = getelementptr inbounds nuw float, ptr %arrayidx.i, i64 %indvars.iv.i %4 = load float, ptr %arrayidx13.i, align 4 - %arrayidx15.i = getelementptr inbounds float, ptr %arrayidx6.i, i64 %indvars.iv.i + %arrayidx15.i = getelementptr inbounds nuw float, ptr %arrayidx6.i, i64 %indvars.iv.i %5 = load float, ptr %arrayidx15.i, align 4 %sub18.i = fsub float %5, %4 %6 = tail call float @llvm.fmuladd.f32(float %sub18.i, float %3, float %4) - %arrayidx22.i = getelementptr inbounds float, ptr %output, i64 %indvars.iv.i + %arrayidx22.i = getelementptr inbounds nuw float, ptr %output, i64 %indvars.iv.i %7 = load float, ptr %arrayidx22.i, align 4 %8 = tail call float @llvm.fmuladd.f32(float %scale, float %6, float %7) store float %8, ptr %arrayidx22.i, align 4 @@ -198,13 +198,13 @@ for.body.preheader.i: ; preds = %entry for.body.i: ; preds = %for.body.i, %for.body.preheader.i %indvars.iv.i = phi i64 [ 0, %for.body.preheader.i ], [ %indvars.iv.next.i, %for.body.i ] - %arrayidx13.i = getelementptr inbounds float, ptr %arrayidx.i, i64 %indvars.iv.i + %arrayidx13.i = getelementptr inbounds nuw float, ptr %arrayidx.i, i64 %indvars.iv.i %4 = load float, ptr %arrayidx13.i, align 4 - %arrayidx15.i = getelementptr inbounds float, ptr %arrayidx6.i, i64 %indvars.iv.i + %arrayidx15.i = getelementptr inbounds nuw float, ptr %arrayidx6.i, i64 %indvars.iv.i %5 = load float, ptr %arrayidx15.i, align 4 %sub18.i = fsub float %5, %4 %6 = tail call float @llvm.fmuladd.f32(float %sub18.i, float %3, float %4) - %arrayidx22.i = getelementptr inbounds float, ptr %output, i64 %indvars.iv.i + %arrayidx22.i = getelementptr inbounds nuw float, ptr %output, i64 %indvars.iv.i %7 = load float, ptr %arrayidx22.i, align 4 %8 = tail call float @llvm.fmuladd.f32(float %scale, float %6, float %7) store float %8, ptr %arrayidx22.i, align 4 @@ -221,30 +221,30 @@ define void @hexwave_generate_linesegs(ptr nocapture noundef %vert, ptr nocaptur entry: %div = fmul float %dt, 3.906250e-03 store float 0.000000e+00, ptr %vert, align 4 - %v = getelementptr inbounds i8, ptr %vert, i64 4 + %v = getelementptr inbounds nuw i8, ptr %vert, i64 4 store float 0.000000e+00, ptr %v, align 4 - %current = getelementptr inbounds i8, ptr %hex, i64 8 - %zero_wait = getelementptr inbounds i8, ptr %hex, i64 16 + %current = getelementptr inbounds nuw i8, ptr %hex, i64 8 + %zero_wait = getelementptr inbounds nuw i8, ptr %hex, i64 16 %0 = load float, ptr %zero_wait, align 4 %mul = fmul float %0, 5.000000e-01 - %arrayidx2 = getelementptr inbounds i8, ptr %vert, i64 12 + %arrayidx2 = getelementptr inbounds nuw i8, ptr %vert, i64 12 store float %mul, ptr %arrayidx2, align 4 - %v5 = getelementptr inbounds i8, ptr %vert, i64 16 + %v5 = getelementptr inbounds nuw i8, ptr %vert, i64 16 store float 0.000000e+00, ptr %v5, align 4 - %peak_time = getelementptr inbounds i8, ptr %hex, i64 12 + %peak_time = getelementptr inbounds nuw i8, ptr %hex, i64 12 %1 = load float, ptr %peak_time, align 4 %sub = fsub float 1.000000e+00, %1 %mul12 = fmul float %mul, %sub %2 = tail call float @llvm.fmuladd.f32(float %1, float 5.000000e-01, float %mul12) - %arrayidx13 = getelementptr inbounds i8, ptr %vert, i64 24 + %arrayidx13 = getelementptr inbounds nuw i8, ptr %vert, i64 24 store float %2, ptr %arrayidx13, align 4 - %v16 = getelementptr inbounds i8, ptr %vert, i64 28 + %v16 = getelementptr inbounds nuw i8, ptr %vert, i64 28 store float 1.000000e+00, ptr %v16, align 4 - %arrayidx17 = getelementptr inbounds i8, ptr %vert, i64 36 + %arrayidx17 = getelementptr inbounds nuw i8, ptr %vert, i64 36 store float 5.000000e-01, ptr %arrayidx17, align 4 - %half_height = getelementptr inbounds i8, ptr %hex, i64 20 + %half_height = getelementptr inbounds nuw i8, ptr %hex, i64 20 %3 = load float, ptr %half_height, align 4 - %v21 = getelementptr inbounds i8, ptr %vert, i64 40 + %v21 = getelementptr inbounds nuw i8, ptr %vert, i64 40 store float %3, ptr %v21, align 4 %4 = load i32, ptr %current, align 4 %tobool.not = icmp eq i32 %4, 0 @@ -253,15 +253,15 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 4, %entry ] %5 = sub nuw nsw i64 7, %indvars.iv - %arrayidx24 = getelementptr inbounds %struct.hexvert, ptr %vert, i64 %5 + %arrayidx24 = getelementptr inbounds nuw %struct.hexvert, ptr %vert, i64 %5 %6 = load float, ptr %arrayidx24, align 4 %sub26 = fsub float 1.000000e+00, %6 - %arrayidx28 = getelementptr inbounds %struct.hexvert, ptr %vert, i64 %indvars.iv + %arrayidx28 = getelementptr inbounds nuw %struct.hexvert, ptr %vert, i64 %indvars.iv store float %sub26, ptr %arrayidx28, align 4 - %v33 = getelementptr inbounds i8, ptr %arrayidx24, i64 4 + %v33 = getelementptr inbounds nuw i8, ptr %arrayidx24, i64 4 %7 = load float, ptr %v33, align 4 %fneg = fneg float %7 - %v36 = getelementptr inbounds i8, ptr %arrayidx28, i64 4 + %v36 = getelementptr inbounds nuw i8, ptr %arrayidx28, i64 4 store float %fneg, ptr %v36, align 4 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 8 @@ -277,7 +277,7 @@ for.body39: ; preds = %entry, %for.body39 %v50 = getelementptr i8, ptr %8, i64 -44 %10 = load float, ptr %v50, align 4 %fneg51 = fneg float %10 - %v54 = getelementptr inbounds i8, ptr %8, i64 4 + %v54 = getelementptr inbounds nuw i8, ptr %8, i64 4 store float %fneg51, ptr %v54, align 4 %indvars.iv.next87 = add nuw nsw i64 %indvars.iv86, 1 %exitcond89.not = icmp eq i64 %indvars.iv.next87, 8 @@ -289,9 +289,9 @@ if.end.loopexit: ; preds = %for.body39 if.end: ; preds = %for.body, %if.end.loopexit %.pre = phi float [ %.pre.pre, %if.end.loopexit ], [ 0.000000e+00, %for.body ] - %arrayidx58 = getelementptr inbounds i8, ptr %vert, i64 96 + %arrayidx58 = getelementptr inbounds nuw i8, ptr %vert, i64 96 store float 1.000000e+00, ptr %arrayidx58, align 4 - %v61 = getelementptr inbounds i8, ptr %vert, i64 100 + %v61 = getelementptr inbounds nuw i8, ptr %vert, i64 100 store float 0.000000e+00, ptr %v61, align 4 br label %for.body64 @@ -299,7 +299,7 @@ for.body64: ; preds = %if.end, %for.inc83 %11 = phi float [ %.pre, %if.end ], [ %13, %for.inc83 ] %indvars.iv90 = phi i64 [ 0, %if.end ], [ %indvars.iv.next91, %for.inc83 ] %indvars.iv.next91 = add nuw nsw i64 %indvars.iv90, 1 - %arrayidx67 = getelementptr inbounds %struct.hexvert, ptr %vert, i64 %indvars.iv.next91 + %arrayidx67 = getelementptr inbounds nuw %struct.hexvert, ptr %vert, i64 %indvars.iv.next91 %12 = load float, ptr %arrayidx67, align 4 %add72 = fadd float %div, %11 %cmp73 = fcmp ugt float %12, %add72 @@ -317,11 +317,11 @@ for.inc83: ; preds = %for.body64, %if.the for.end85: ; preds = %for.inc83 %14 = load float, ptr %arrayidx58, align 4 %cmp88 = fcmp une float %14, 1.000000e+00 - br i1 %cmp88, label %for.body95, label %if.end108 + br i1 %cmp88, label %for.body95, label %for.body111.preheader for.body95: ; preds = %for.end85, %for.inc105 %indvars.iv94 = phi i64 [ %indvars.iv.next95, %for.inc105 ], [ 5, %for.end85 ] - %arrayidx97 = getelementptr inbounds %struct.hexvert, ptr %vert, i64 %indvars.iv94 + %arrayidx97 = getelementptr inbounds nuw %struct.hexvert, ptr %vert, i64 %indvars.iv94 %15 = load float, ptr %arrayidx97, align 4 %cmp99 = fcmp oeq float %15, %14 br i1 %cmp99, label %if.then100, label %for.inc105 @@ -333,26 +333,25 @@ if.then100: ; preds = %for.body95 for.inc105: ; preds = %for.body95, %if.then100 %indvars.iv.next95 = add nuw nsw i64 %indvars.iv94, 1 %exitcond97.not = icmp eq i64 %indvars.iv.next95, 9 - br i1 %exitcond97.not, label %if.end108, label %for.body95, !llvm.loop !9 + br i1 %exitcond97.not, label %for.body111.preheader, label %for.body95, !llvm.loop !9 -if.end108: ; preds = %for.inc105, %for.end85 - %.pre102 = load float, ptr %vert, align 4 +for.body111.preheader: ; preds = %for.inc105, %for.end85 br label %for.body111 -for.body111: ; preds = %if.end108, %for.inc145 - %16 = phi float [ %.pre102, %if.end108 ], [ %17, %for.inc145 ] - %indvars.iv98 = phi i64 [ 0, %if.end108 ], [ %indvars.iv.next99, %for.inc145 ] +for.body111: ; preds = %for.body111.preheader, %for.inc145 + %16 = phi float [ %17, %for.inc145 ], [ %.pre, %for.body111.preheader ] + %indvars.iv98 = phi i64 [ %indvars.iv.next99, %for.inc145 ], [ 0, %for.body111.preheader ] %indvars.iv.next99 = add nuw nsw i64 %indvars.iv98, 1 - %arrayidx114 = getelementptr inbounds %struct.hexvert, ptr %vert, i64 %indvars.iv.next99 + %arrayidx114 = getelementptr inbounds nuw %struct.hexvert, ptr %vert, i64 %indvars.iv.next99 %17 = load float, ptr %arrayidx114, align 4 - %arrayidx117 = getelementptr inbounds %struct.hexvert, ptr %vert, i64 %indvars.iv98 + %arrayidx117 = getelementptr inbounds nuw %struct.hexvert, ptr %vert, i64 %indvars.iv98 %cmp119 = fcmp oeq float %17, %16 br i1 %cmp119, label %for.inc145, label %if.else123 if.else123: ; preds = %for.body111 - %v127 = getelementptr inbounds i8, ptr %arrayidx114, i64 4 + %v127 = getelementptr inbounds nuw i8, ptr %arrayidx114, i64 4 %18 = load float, ptr %v127, align 4 - %v130 = getelementptr inbounds i8, ptr %arrayidx117, i64 4 + %v130 = getelementptr inbounds nuw i8, ptr %arrayidx117, i64 4 %19 = load float, ptr %v130, align 4 %sub131 = fsub float %18, %19 %sub139 = fsub float %17, %16 @@ -361,7 +360,7 @@ if.else123: ; preds = %for.body111 for.inc145: ; preds = %for.body111, %if.else123 %div140.sink = phi float [ %div140, %if.else123 ], [ 0.000000e+00, %for.body111 ] - %20 = getelementptr inbounds i8, ptr %arrayidx117, i64 8 + %20 = getelementptr inbounds nuw i8, ptr %arrayidx117, i64 8 store float %div140.sink, ptr %20, align 4 %exitcond101.not = icmp eq i64 %indvars.iv.next99, 8 br i1 %exitcond101.not, label %for.end147, label %for.body111, !llvm.loop !10 @@ -369,9 +368,9 @@ for.inc145: ; preds = %for.body111, %if.el for.end147: ; preds = %for.inc145 store float 1.000000e+00, ptr %arrayidx58, align 4 store float 0.000000e+00, ptr %v61, align 4 - %s155 = getelementptr inbounds i8, ptr %vert, i64 8 + %s155 = getelementptr inbounds nuw i8, ptr %vert, i64 8 %21 = load float, ptr %s155, align 4 - %s157 = getelementptr inbounds i8, ptr %vert, i64 104 + %s157 = getelementptr inbounds nuw i8, ptr %vert, i64 104 store float %21, ptr %s157, align 4 ret void } @@ -394,14 +393,14 @@ entry: if.end: ; preds = %entry call void @hexwave_generate_linesegs(ptr noundef nonnull %vert, ptr noundef nonnull %hex, float noundef %2) - %prev_dt = getelementptr inbounds i8, ptr %hex, i64 4 + %prev_dt = getelementptr inbounds nuw i8, ptr %hex, i64 4 %3 = load float, ptr %prev_dt, align 4 %cmp9 = fcmp une float %3, %2 br i1 %cmp9, label %for.body, label %if.end28 for.body: ; preds = %if.end, %for.inc %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 1, %if.end ] - %arrayidx = getelementptr inbounds [9 x %struct.hexvert], ptr %vert, i64 0, i64 %indvars.iv + %arrayidx = getelementptr inbounds nuw [9 x %struct.hexvert], ptr %vert, i64 0, i64 %indvars.iv %4 = load float, ptr %arrayidx, align 4 %cmp15 = fcmp olt float %0, %4 br i1 %cmp15, label %for.end, label %for.inc @@ -414,7 +413,7 @@ for.inc: ; preds = %for.body for.end: ; preds = %for.body, %for.inc %j.0.lcssa = phi i64 [ %indvars.iv, %for.body ], [ 6, %for.inc ] %idxprom19 = and i64 %j.0.lcssa, 4294967295 - %s = getelementptr inbounds [9 x %struct.hexvert], ptr %vert, i64 0, i64 %idxprom19, i32 2 + %s = getelementptr inbounds nuw [9 x %struct.hexvert], ptr %vert, i64 0, i64 %idxprom19, i32 2 %5 = load float, ptr %s, align 4 %cmp21 = fcmp une float %5, 0.000000e+00 br i1 %cmp21, label %if.then23, label %if.end26 @@ -447,13 +446,13 @@ for.body.preheader.i.i: ; preds = %if.then23 for.body.i.i: ; preds = %for.body.i.i, %for.body.preheader.i.i %indvars.iv.i.i = phi i64 [ 0, %for.body.preheader.i.i ], [ %indvars.iv.next.i.i, %for.body.i.i ] - %arrayidx13.i.i = getelementptr inbounds float, ptr %arrayidx.i.i, i64 %indvars.iv.i.i + %arrayidx13.i.i = getelementptr inbounds nuw float, ptr %arrayidx.i.i, i64 %indvars.iv.i.i %9 = load float, ptr %arrayidx13.i.i, align 4 - %arrayidx15.i.i = getelementptr inbounds float, ptr %arrayidx6.i.i, i64 %indvars.iv.i.i + %arrayidx15.i.i = getelementptr inbounds nuw float, ptr %arrayidx6.i.i, i64 %indvars.iv.i.i %10 = load float, ptr %arrayidx15.i.i, align 4 %sub18.i.i = fsub float %10, %9 %11 = tail call float @llvm.fmuladd.f32(float %sub18.i.i, float %8, float %9) - %arrayidx22.i.i = getelementptr inbounds float, ptr %output, i64 %indvars.iv.i.i + %arrayidx22.i.i = getelementptr inbounds nuw float, ptr %output, i64 %indvars.iv.i.i %12 = load float, ptr %arrayidx22.i.i, align 4 %13 = tail call float @llvm.fmuladd.f32(float %mul25, float %11, float %12) store float %13, ptr %arrayidx22.i.i, align 4 @@ -475,7 +474,7 @@ if.end28: ; preds = %if.end26, %if.end %mul34 = shl nsw i64 %conv33, 2 call void @llvm.memset.p0.i64(ptr nonnull align 16 %temp_output, i8 0, i64 %mul34, i1 false) %cmp35.not = icmp slt i32 %num_samples, %14 - %buffer41 = getelementptr inbounds i8, ptr %hex, i64 44 + %buffer41 = getelementptr inbounds nuw i8, ptr %hex, i64 44 %conv43 = sext i32 %mul to i64 br i1 %cmp35.not, label %if.else, label %if.then37 @@ -488,11 +487,11 @@ if.else: ; preds = %if.end28 br label %if.end44 if.end44: ; preds = %if.else, %if.then37 - %have_pending = getelementptr inbounds i8, ptr %hex, i64 40 - %s158 = getelementptr inbounds i8, ptr %vert, i64 8 - %v161 = getelementptr inbounds i8, ptr %vert, i64 4 - %current = getelementptr inbounds i8, ptr %hex, i64 8 - %pending = getelementptr inbounds i8, ptr %hex, i64 24 + %have_pending = getelementptr inbounds nuw i8, ptr %hex, i64 40 + %s158 = getelementptr inbounds nuw i8, ptr %vert, i64 8 + %v161 = getelementptr inbounds nuw i8, ptr %vert, i64 4 + %current = getelementptr inbounds nuw i8, ptr %hex, i64 8 + %pending = getelementptr inbounds nuw i8, ptr %hex, i64 24 %15 = sext i32 %div6 to i64 br label %for.body48 @@ -526,7 +525,7 @@ for.cond65: ; preds = %for.body68, %if.end for.body68: ; preds = %for.cond65 %indvars.iv.next244 = add nuw nsw i64 %indvars.iv243, 1 - %arrayidx70 = getelementptr inbounds [9 x %struct.hexvert], ptr %vert, i64 0, i64 %indvars.iv.next244 + %arrayidx70 = getelementptr inbounds nuw [9 x %struct.hexvert], ptr %vert, i64 0, i64 %indvars.iv.next244 %17 = load float, ptr %arrayidx70, align 4 %cmp72 = fcmp olt float %t.0233, %17 br i1 %cmp72, label %for.end78.split.loop.exit, label %for.cond65, !llvm.loop !12 @@ -558,8 +557,8 @@ for.cond79.while.end_crit_edge: ; preds = %for.cond79 br label %while.end while.body.lr.ph: ; preds = %for.cond79 - %v = getelementptr inbounds i8, ptr %arrayidx91, i64 4 - %s94 = getelementptr inbounds i8, ptr %arrayidx91, i64 8 + %v = getelementptr inbounds nuw i8, ptr %arrayidx91, i64 4 + %s94 = getelementptr inbounds nuw i8, ptr %arrayidx91, i64 8 %20 = sext i32 %i.0 to i64 br label %while.body @@ -609,9 +608,9 @@ if.then115: ; preds = %while.end %add.ptr = getelementptr inbounds float, ptr %out.0, i64 %idx.ext %sub120 = fsub float %t.3.lcssa, %19 %mul121 = fmul float %cond, %sub120 - %v125 = getelementptr inbounds i8, ptr %arrayidx82, i64 4 + %v125 = getelementptr inbounds nuw i8, ptr %arrayidx82, i64 4 %30 = load float, ptr %v125, align 4 - %v128 = getelementptr inbounds i8, ptr %arrayidx107, i64 4 + %v128 = getelementptr inbounds nuw i8, ptr %arrayidx107, i64 4 %31 = load float, ptr %v128, align 4 %sub129 = fsub float %30, %31 %32 = load ptr, ptr getelementptr inbounds (i8, ptr @hexblep, i64 8), align 8 @@ -640,13 +639,13 @@ for.body.preheader.i.i128: ; preds = %if.then115 for.body.i.i130: ; preds = %for.body.i.i130, %for.body.preheader.i.i128 %indvars.iv.i.i131 = phi i64 [ 0, %for.body.preheader.i.i128 ], [ %indvars.iv.next.i.i136, %for.body.i.i130 ] - %arrayidx13.i.i132 = getelementptr inbounds float, ptr %arrayidx.i.i120, i64 %indvars.iv.i.i131 + %arrayidx13.i.i132 = getelementptr inbounds nuw float, ptr %arrayidx.i.i120, i64 %indvars.iv.i.i131 %34 = load float, ptr %arrayidx13.i.i132, align 4 - %arrayidx15.i.i133 = getelementptr inbounds float, ptr %arrayidx6.i.i124, i64 %indvars.iv.i.i131 + %arrayidx15.i.i133 = getelementptr inbounds nuw float, ptr %arrayidx6.i.i124, i64 %indvars.iv.i.i131 %35 = load float, ptr %arrayidx15.i.i133, align 4 %sub18.i.i134 = fsub float %35, %34 %36 = tail call float @llvm.fmuladd.f32(float %sub18.i.i134, float %33, float %34) - %arrayidx22.i.i135 = getelementptr inbounds float, ptr %add.ptr, i64 %indvars.iv.i.i131 + %arrayidx22.i.i135 = getelementptr inbounds nuw float, ptr %add.ptr, i64 %indvars.iv.i.i131 %37 = load float, ptr %arrayidx22.i.i135, align 4 %38 = tail call float @llvm.fmuladd.f32(float %sub129, float %36, float %37) store float %38, ptr %arrayidx22.i.i135, align 4 @@ -664,9 +663,9 @@ if.end130: ; preds = %while.end.if.end130 %39 = phi i32 [ %.pre261, %while.end.if.end130_crit_edge ], [ %.pre260, %if.end130.loopexit ], [ %.pre261, %if.then115 ] %40 = phi i32 [ %.pre259, %while.end.if.end130_crit_edge ], [ %.pre258, %if.end130.loopexit ], [ %.pre259, %if.then115 ] %add.ptr132 = getelementptr inbounds float, ptr %out.0, i64 %idx.ext - %s142 = getelementptr inbounds i8, ptr %arrayidx82, i64 8 + %s142 = getelementptr inbounds nuw i8, ptr %arrayidx82, i64 8 %41 = load float, ptr %s142, align 4 - %s145 = getelementptr inbounds i8, ptr %arrayidx107, i64 8 + %s145 = getelementptr inbounds nuw i8, ptr %arrayidx107, i64 8 %42 = load float, ptr %s145, align 4 %sub146 = fsub float %41, %42 %mul147 = fmul float %2, %sub146 @@ -696,13 +695,13 @@ for.body.preheader.i.i154: ; preds = %if.end130 for.body.i.i156: ; preds = %for.body.i.i156, %for.body.preheader.i.i154 %indvars.iv.i.i157 = phi i64 [ 0, %for.body.preheader.i.i154 ], [ %indvars.iv.next.i.i162, %for.body.i.i156 ] - %arrayidx13.i.i158 = getelementptr inbounds float, ptr %arrayidx.i.i146, i64 %indvars.iv.i.i157 + %arrayidx13.i.i158 = getelementptr inbounds nuw float, ptr %arrayidx.i.i146, i64 %indvars.iv.i.i157 %45 = load float, ptr %arrayidx13.i.i158, align 4 - %arrayidx15.i.i159 = getelementptr inbounds float, ptr %arrayidx6.i.i150, i64 %indvars.iv.i.i157 + %arrayidx15.i.i159 = getelementptr inbounds nuw float, ptr %arrayidx6.i.i150, i64 %indvars.iv.i.i157 %46 = load float, ptr %arrayidx15.i.i159, align 4 %sub18.i.i160 = fsub float %46, %45 %47 = tail call float @llvm.fmuladd.f32(float %sub18.i.i160, float %44, float %45) - %arrayidx22.i.i161 = getelementptr inbounds float, ptr %add.ptr132, i64 %indvars.iv.i.i157 + %arrayidx22.i.i161 = getelementptr inbounds nuw float, ptr %add.ptr132, i64 %indvars.iv.i.i157 %48 = load float, ptr %arrayidx22.i.i161, align 4 %49 = tail call float @llvm.fmuladd.f32(float %mul147, float %47, float %48) store float %49, ptr %arrayidx22.i.i161, align 4 @@ -761,13 +760,13 @@ for.body.preheader.i.i181: ; preds = %if.then169 for.body.i.i183: ; preds = %for.body.i.i183, %for.body.preheader.i.i181 %indvars.iv.i.i184 = phi i64 [ 0, %for.body.preheader.i.i181 ], [ %indvars.iv.next.i.i189, %for.body.i.i183 ] - %arrayidx13.i.i185 = getelementptr inbounds float, ptr %arrayidx.i.i173, i64 %indvars.iv.i.i184 + %arrayidx13.i.i185 = getelementptr inbounds nuw float, ptr %arrayidx.i.i173, i64 %indvars.iv.i.i184 %58 = load float, ptr %arrayidx13.i.i185, align 4 - %arrayidx15.i.i186 = getelementptr inbounds float, ptr %arrayidx6.i.i177, i64 %indvars.iv.i.i184 + %arrayidx15.i.i186 = getelementptr inbounds nuw float, ptr %arrayidx6.i.i177, i64 %indvars.iv.i.i184 %59 = load float, ptr %arrayidx15.i.i186, align 4 %sub18.i.i187 = fsub float %59, %58 %60 = tail call float @llvm.fmuladd.f32(float %sub18.i.i187, float %57, float %58) - %arrayidx22.i.i188 = getelementptr inbounds float, ptr %add.ptr132, i64 %indvars.iv.i.i184 + %arrayidx22.i.i188 = getelementptr inbounds nuw float, ptr %add.ptr132, i64 %indvars.iv.i.i184 %61 = load float, ptr %arrayidx22.i.i188, align 4 %62 = tail call float @llvm.fmuladd.f32(float %sub176, float %60, float %61) store float %62, ptr %arrayidx22.i.i188, align 4 @@ -817,13 +816,13 @@ for.body.preheader.i.i208: ; preds = %if.then183 for.body.i.i210: ; preds = %for.body.i.i210, %for.body.preheader.i.i208 %indvars.iv.i.i211 = phi i64 [ 0, %for.body.preheader.i.i208 ], [ %indvars.iv.next.i.i216, %for.body.i.i210 ] - %arrayidx13.i.i212 = getelementptr inbounds float, ptr %arrayidx.i.i200, i64 %indvars.iv.i.i211 + %arrayidx13.i.i212 = getelementptr inbounds nuw float, ptr %arrayidx.i.i200, i64 %indvars.iv.i.i211 %68 = load float, ptr %arrayidx13.i.i212, align 4 - %arrayidx15.i.i213 = getelementptr inbounds float, ptr %arrayidx6.i.i204, i64 %indvars.iv.i.i211 + %arrayidx15.i.i213 = getelementptr inbounds nuw float, ptr %arrayidx6.i.i204, i64 %indvars.iv.i.i211 %69 = load float, ptr %arrayidx15.i.i213, align 4 %sub18.i.i214 = fsub float %69, %68 %70 = tail call float @llvm.fmuladd.f32(float %sub18.i.i214, float %67, float %68) - %arrayidx22.i.i215 = getelementptr inbounds float, ptr %add.ptr132, i64 %indvars.iv.i.i211 + %arrayidx22.i.i215 = getelementptr inbounds nuw float, ptr %add.ptr132, i64 %indvars.iv.i.i211 %71 = load float, ptr %arrayidx22.i.i215, align 4 %72 = tail call float @llvm.fmuladd.f32(float %mul191, float %70, float %71) store float %72, ptr %arrayidx22.i.i215, align 4 @@ -851,7 +850,7 @@ for.cond201.preheader.for.end214_crit_edge: ; preds = %for.cond201.prehead for.body204: ; preds = %for.cond201.preheader, %for.body204 %indvars.iv251 = phi i64 [ %indvars.iv.next252, %for.body204 ], [ 0, %for.cond201.preheader ] %74 = phi i32 [ %79, %for.body204 ], [ %73, %for.cond201.preheader ] - %arrayidx206 = getelementptr inbounds [128 x float], ptr %temp_output, i64 0, i64 %indvars.iv251 + %arrayidx206 = getelementptr inbounds nuw [128 x float], ptr %temp_output, i64 0, i64 %indvars.iv251 %75 = load float, ptr %arrayidx206, align 4 %76 = trunc i64 %indvars.iv251 to i32 %77 = add i32 %num_samples, %76 @@ -876,7 +875,7 @@ for.end232: ; preds = %for.end197 if.end239: ; preds = %for.body204, %for.cond201.preheader.for.end214_crit_edge, %for.end232 %conv29.sink = phi i64 [ %conv29, %for.end232 ], [ %.pre262, %for.cond201.preheader.for.end214_crit_edge ], [ %80, %for.body204 ] - %buffer233 = getelementptr inbounds i8, ptr %hex, i64 44 + %buffer233 = getelementptr inbounds nuw i8, ptr %hex, i64 44 %add.ptr237 = getelementptr inbounds float, ptr %temp_output, i64 %conv29.sink %conv238 = sext i32 %mul to i64 call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 %buffer233, ptr nonnull align 4 %add.ptr237, i64 %conv238, i1 false) @@ -1040,7 +1039,7 @@ for.end: ; preds = %for.body30, %for.bo %arrayidx = getelementptr inbounds float, ptr %cond102, i64 %indvars.iv store float %conv68, ptr %arrayidx, align 4 %conv69 = fptrunc double %.us-phi to float - %arrayidx71 = getelementptr inbounds float, ptr %add.ptr9104, i64 %indvars.iv + %arrayidx71 = getelementptr inbounds nuw float, ptr %add.ptr9104, i64 %indvars.iv store float %conv69, ptr %arrayidx71, align 4 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond150.not = icmp eq i64 %indvars.iv.next, %wide.trip.count @@ -1095,7 +1094,7 @@ for.body78: ; preds = %for.body78.lr.ph, % %conv86 = fdiv float 1.000000e+00, %21 %mul87 = fmul float %20, %conv86 store float %mul87, ptr %arrayidx80, align 4 - %arrayidx91 = getelementptr inbounds float, ptr %add.ptr9104, i64 %indvars.iv151 + %arrayidx91 = getelementptr inbounds nuw float, ptr %add.ptr9104, i64 %indvars.iv151 %22 = load float, ptr %arrayidx91, align 4 %23 = load float, ptr %arrayidx95, align 4 %div96 = fdiv float %conv92, %23 diff --git a/bench/stockfish/optimized/timeman.ll b/bench/stockfish/optimized/timeman.ll index 3859217c617..65a26a4db5b 100644 --- a/bench/stockfish/optimized/timeman.ll +++ b/bench/stockfish/optimized/timeman.ll @@ -33,21 +33,21 @@ declare i32 @__cxa_atexit(ptr, ptr, ptr) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local noundef i64 @_ZNK9Stockfish14TimeManagement7optimumEv(ptr nocapture noundef nonnull readonly align 8 dereferenceable(33) %0) local_unnamed_addr #3 align 2 { - %2 = getelementptr inbounds i8, ptr %0, i64 8 + %2 = getelementptr inbounds nuw i8, ptr %0, i64 8 %3 = load i64, ptr %2, align 8 ret i64 %3 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local noundef i64 @_ZNK9Stockfish14TimeManagement7maximumEv(ptr nocapture noundef nonnull readonly align 8 dereferenceable(33) %0) local_unnamed_addr #3 align 2 { - %2 = getelementptr inbounds i8, ptr %0, i64 16 + %2 = getelementptr inbounds nuw i8, ptr %0, i64 16 %3 = load i64, ptr %2, align 8 ret i64 %3 } ; Function Attrs: mustprogress nounwind uwtable define dso_local noundef i64 @_ZNK9Stockfish14TimeManagement7elapsedEm(ptr nocapture noundef nonnull readonly align 8 dereferenceable(33) %0, i64 noundef %1) local_unnamed_addr #4 align 2 { - %3 = getelementptr inbounds i8, ptr %0, i64 32 + %3 = getelementptr inbounds nuw i8, ptr %0, i64 32 %4 = load i8, ptr %3, align 8 %5 = trunc i8 %4 to i1 br i1 %5, label %11, label %6 @@ -66,14 +66,14 @@ define dso_local noundef i64 @_ZNK9Stockfish14TimeManagement7elapsedEm(ptr nocap ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: write) uwtable define dso_local void @_ZN9Stockfish14TimeManagement5clearEv(ptr nocapture noundef nonnull writeonly align 8 dereferenceable(33) %0) local_unnamed_addr #5 align 2 { - %2 = getelementptr inbounds i8, ptr %0, i64 24 + %2 = getelementptr inbounds nuw i8, ptr %0, i64 24 store i64 0, ptr %2, align 8 ret void } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @_ZN9Stockfish14TimeManagement18advance_nodes_timeEl(ptr nocapture noundef nonnull align 8 dereferenceable(33) %0, i64 noundef %1) local_unnamed_addr #6 align 2 { - %3 = getelementptr inbounds i8, ptr %0, i64 24 + %3 = getelementptr inbounds nuw i8, ptr %0, i64 24 %4 = load i64, ptr %3, align 8 %5 = add nsw i64 %4, %1 store i64 %5, ptr %3, align 8 @@ -95,12 +95,12 @@ define dso_local void @_ZN9Stockfish14TimeManagement4initERNS_6Search10LimitsTyp %16 = alloca %"class.Stockfish::Option", align 8 %17 = alloca %"class.std::__cxx11::basic_string", align 8 %18 = alloca %"class.std::allocator.0", align 1 - %19 = getelementptr inbounds i8, ptr %1, i64 72 + %19 = getelementptr inbounds nuw i8, ptr %1, i64 72 %20 = load i64, ptr %19, align 8 store i64 %20, ptr %0, align 8 - %21 = getelementptr inbounds i8, ptr %1, i64 24 + %21 = getelementptr inbounds nuw i8, ptr %1, i64 24 %22 = zext i32 %2 to i64 - %23 = getelementptr inbounds [2 x i64], ptr %21, i64 0, i64 %22 + %23 = getelementptr inbounds nuw [2 x i64], ptr %21, i64 0, i64 %22 %24 = load i64, ptr %23, align 8 %25 = icmp eq i64 %24, 0 br i1 %25, label %151, label %26 @@ -113,20 +113,20 @@ define dso_local void @_ZN9Stockfish14TimeManagement4initERNS_6Search10LimitsTyp call void @_ZNK9Stockfish10OptionsMapixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind nonnull writable sret(%"class.Stockfish::Option") align 8 %6, ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(32) %7) #11 %28 = call noundef i32 @_ZNK9Stockfish6OptioncviEv(ptr noundef nonnull align 8 dereferenceable(144) %6) #11 %29 = sext i32 %28 to i64 - %30 = getelementptr inbounds i8, ptr %6, i64 128 + %30 = getelementptr inbounds nuw i8, ptr %6, i64 128 %31 = load ptr, ptr %30, align 8 %.not.i.i.i = icmp eq ptr %31, null br i1 %.not.i.i.i, label %_ZN9Stockfish6OptionD2Ev.exit, label %32 32: ; preds = %26 - %33 = getelementptr inbounds i8, ptr %6, i64 112 + %33 = getelementptr inbounds nuw i8, ptr %6, i64 112 %34 = call noundef zeroext i1 %31(ptr noundef nonnull align 8 dereferenceable(16) %33, ptr noundef nonnull align 8 dereferenceable(16) %33, i32 noundef 3) #11 br label %_ZN9Stockfish6OptionD2Ev.exit _ZN9Stockfish6OptionD2Ev.exit: ; preds = %26, %32 - %35 = getelementptr inbounds i8, ptr %6, i64 64 + %35 = getelementptr inbounds nuw i8, ptr %6, i64 64 call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %35) #11 - %36 = getelementptr inbounds i8, ptr %6, i64 32 + %36 = getelementptr inbounds nuw i8, ptr %6, i64 32 call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %36) #11 call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #11 call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #11 @@ -138,20 +138,20 @@ _ZN9Stockfish6OptionD2Ev.exit: ; preds = %26, %32 call void @_ZNK9Stockfish10OptionsMapixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind nonnull writable sret(%"class.Stockfish::Option") align 8 %9, ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(32) %10) #11 %38 = call noundef i32 @_ZNK9Stockfish6OptioncviEv(ptr noundef nonnull align 8 dereferenceable(144) %9) #11 %39 = sext i32 %38 to i64 - %40 = getelementptr inbounds i8, ptr %9, i64 128 + %40 = getelementptr inbounds nuw i8, ptr %9, i64 128 %41 = load ptr, ptr %40, align 8 %.not.i.i.i60 = icmp eq ptr %41, null br i1 %.not.i.i.i60, label %_ZN9Stockfish6OptionD2Ev.exit61, label %42 42: ; preds = %_ZN9Stockfish6OptionD2Ev.exit - %43 = getelementptr inbounds i8, ptr %9, i64 112 + %43 = getelementptr inbounds nuw i8, ptr %9, i64 112 %44 = call noundef zeroext i1 %41(ptr noundef nonnull align 8 dereferenceable(16) %43, ptr noundef nonnull align 8 dereferenceable(16) %43, i32 noundef 3) #11 br label %_ZN9Stockfish6OptionD2Ev.exit61 _ZN9Stockfish6OptionD2Ev.exit61: ; preds = %_ZN9Stockfish6OptionD2Ev.exit, %42 - %45 = getelementptr inbounds i8, ptr %9, i64 64 + %45 = getelementptr inbounds nuw i8, ptr %9, i64 64 call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %45) #11 - %46 = getelementptr inbounds i8, ptr %9, i64 32 + %46 = getelementptr inbounds nuw i8, ptr %9, i64 32 call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %46) #11 call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #11 call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #11 @@ -160,9 +160,9 @@ _ZN9Stockfish6OptionD2Ev.exit61: ; preds = %_ZN9Stockfish6Optio br i1 %.not, label %61, label %47 47: ; preds = %_ZN9Stockfish6OptionD2Ev.exit61 - %48 = getelementptr inbounds i8, ptr %0, i64 32 + %48 = getelementptr inbounds nuw i8, ptr %0, i64 32 store i8 1, ptr %48, align 8 - %49 = getelementptr inbounds i8, ptr %0, i64 24 + %49 = getelementptr inbounds nuw i8, ptr %0, i64 24 %50 = load i64, ptr %49, align 8 %.not57 = icmp eq i64 %50, 0 br i1 %.not57, label %51, label %54 @@ -176,24 +176,24 @@ _ZN9Stockfish6OptionD2Ev.exit61: ; preds = %_ZN9Stockfish6Optio 54: ; preds = %51, %47 %55 = phi i64 [ %53, %51 ], [ %50, %47 ] store i64 %55, ptr %23, align 8 - %56 = getelementptr inbounds i8, ptr %1, i64 40 - %57 = getelementptr inbounds [2 x i64], ptr %56, i64 0, i64 %22 + %56 = getelementptr inbounds nuw i8, ptr %1, i64 40 + %57 = getelementptr inbounds nuw [2 x i64], ptr %56, i64 0, i64 %22 %58 = load i64, ptr %57, align 8 %59 = mul nsw i64 %58, %39 store i64 %59, ptr %57, align 8 - %60 = getelementptr inbounds i8, ptr %1, i64 56 + %60 = getelementptr inbounds nuw i8, ptr %1, i64 56 store i64 %39, ptr %60, align 8 br label %61 61: ; preds = %54, %_ZN9Stockfish6OptionD2Ev.exit61 - %62 = getelementptr inbounds i8, ptr %1, i64 80 + %62 = getelementptr inbounds nuw i8, ptr %1, i64 80 %63 = load i32, ptr %62, align 8 %.not58 = icmp eq i32 %63, 0 %.sroa.speculated107 = call i32 @llvm.smin.i32(i32 %63, i32 50) %64 = select i1 %.not58, i32 50, i32 %.sroa.speculated107 %65 = load i64, ptr %23, align 8 - %66 = getelementptr inbounds i8, ptr %1, i64 40 - %67 = getelementptr inbounds [2 x i64], ptr %66, i64 0, i64 %22 + %66 = getelementptr inbounds nuw i8, ptr %1, i64 40 + %67 = getelementptr inbounds nuw [2 x i64], ptr %66, i64 0, i64 %22 %68 = load i64, ptr %67, align 8 %69 = add nsw i32 %64, -1 %70 = sext i32 %69 to i64 @@ -274,7 +274,7 @@ _ZN9Stockfish6OptionD2Ev.exit61: ; preds = %_ZN9Stockfish6Optio %.055 = load double, ptr %.055.in, align 8 %124 = fmul double %.0, %.pre-phi %125 = fptosi double %124 to i64 - %126 = getelementptr inbounds i8, ptr %0, i64 8 + %126 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 %125, ptr %126, align 8 %127 = load i64, ptr %23, align 8 %128 = sitofp i64 %127 to double @@ -287,7 +287,7 @@ _ZN9Stockfish6OptionD2Ev.exit61: ; preds = %_ZN9Stockfish6Optio %.sroa.speculated = select i1 %134, double %133, double %131 %135 = fptosi double %.sroa.speculated to i64 %136 = add nsw i64 %135, -10 - %137 = getelementptr inbounds i8, ptr %0, i64 16 + %137 = getelementptr inbounds nuw i8, ptr %0, i64 16 store i64 %136, ptr %137, align 8 call void @_ZNSaIcEC1Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #11 %138 = call noundef ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE13_M_local_dataEv(ptr noundef nonnull align 8 dereferenceable(32) %17) #11 @@ -296,20 +296,20 @@ _ZN9Stockfish6OptionD2Ev.exit61: ; preds = %_ZN9Stockfish6Optio call void @_ZNK9Stockfish10OptionsMapixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind nonnull writable sret(%"class.Stockfish::Option") align 8 %16, ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(32) %17) #11 %139 = call noundef i32 @_ZNK9Stockfish6OptioncviEv(ptr noundef nonnull align 8 dereferenceable(144) %16) #11 %.not59 = icmp eq i32 %139, 0 - %140 = getelementptr inbounds i8, ptr %16, i64 128 + %140 = getelementptr inbounds nuw i8, ptr %16, i64 128 %141 = load ptr, ptr %140, align 8 %.not.i.i.i70 = icmp eq ptr %141, null br i1 %.not.i.i.i70, label %_ZN9Stockfish6OptionD2Ev.exit71, label %142 142: ; preds = %123 - %143 = getelementptr inbounds i8, ptr %16, i64 112 + %143 = getelementptr inbounds nuw i8, ptr %16, i64 112 %144 = call noundef zeroext i1 %141(ptr noundef nonnull align 8 dereferenceable(16) %143, ptr noundef nonnull align 8 dereferenceable(16) %143, i32 noundef 3) #11 br label %_ZN9Stockfish6OptionD2Ev.exit71 _ZN9Stockfish6OptionD2Ev.exit71: ; preds = %123, %142 - %145 = getelementptr inbounds i8, ptr %16, i64 64 + %145 = getelementptr inbounds nuw i8, ptr %16, i64 64 call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %145) #11 - %146 = getelementptr inbounds i8, ptr %16, i64 32 + %146 = getelementptr inbounds nuw i8, ptr %16, i64 32 call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %146) #11 call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #11 call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #11 diff --git a/bench/sundials/optimized/sundials_errors.c.ll b/bench/sundials/optimized/sundials_errors.c.ll index b7ec29a57b7..908a0e4d51b 100644 --- a/bench/sundials/optimized/sundials_errors.c.ll +++ b/bench/sundials/optimized/sundials_errors.c.ll @@ -47,9 +47,9 @@ define range(i32 -9988, 1) i32 @SUNErrHandler_Create(ptr noundef %0, ptr noundef 5: ; preds = %3 store ptr null, ptr %4, align 8 - %6 = getelementptr inbounds i8, ptr %4, i64 8 + %6 = getelementptr inbounds nuw i8, ptr %4, i64 8 store ptr %0, ptr %6, align 8 - %7 = getelementptr inbounds i8, ptr %4, i64 16 + %7 = getelementptr inbounds nuw i8, ptr %4, i64 16 store ptr %1, ptr %7, align 8 store ptr %4, ptr %2, align 8 br label %8 @@ -92,7 +92,7 @@ define noundef nonnull ptr @SUNGetErrMsg(i32 noundef %0) local_unnamed_addr #4 { switch.lookup: ; preds = %1 %3 = zext nneg i32 %switch.tableidx to i64 - %switch.gep = getelementptr inbounds [25 x ptr], ptr @switch.table.SUNGlobalFallbackErrHandler, i64 0, i64 %3 + %switch.gep = getelementptr inbounds nuw [25 x ptr], ptr @switch.table.SUNGlobalFallbackErrHandler, i64 0, i64 %3 %switch.load = load ptr, ptr %switch.gep, align 8 br label %4 @@ -117,13 +117,13 @@ define void @SUNLogErrHandlerFn(i32 noundef %0, ptr noundef %1, ptr noundef %2, switch.lookup: ; preds = %13 %15 = zext nneg i32 %switch.tableidx to i64 - %switch.gep = getelementptr inbounds [25 x ptr], ptr @switch.table.SUNGlobalFallbackErrHandler, i64 0, i64 %15 + %switch.gep = getelementptr inbounds nuw [25 x ptr], ptr @switch.table.SUNGlobalFallbackErrHandler, i64 0, i64 %15 %switch.load = load ptr, ptr %switch.gep, align 8 br label %SUNGetErrMsg.exit SUNGetErrMsg.exit: ; preds = %13, %switch.lookup, %7 %.0 = phi ptr [ %3, %7 ], [ %switch.load, %switch.lookup ], [ @.str.25, %13 ] - %16 = getelementptr inbounds i8, ptr %6, i64 16 + %16 = getelementptr inbounds nuw i8, ptr %6, i64 16 %17 = load ptr, ptr %16, align 8 %18 = tail call i32 (ptr, i32, ptr, ptr, ptr, ...) @SUNLogger_QueueMsg(ptr noundef %17, i32 noundef 1, ptr noundef %10, ptr noundef %1, ptr noundef nonnull %.0) #16 tail call void @free(ptr noundef %10) #16 @@ -144,7 +144,7 @@ declare i32 @SUNLogger_QueueMsg(ptr noundef, i32 noundef, ptr noundef, ptr nound ; Function Attrs: cold noreturn nounwind uwtable define void @SUNAbortErrHandlerFn(i32 noundef %0, ptr noundef %1, ptr noundef %2, ptr nocapture noundef readnone %3, i32 noundef %4, ptr nocapture noundef readnone %5, ptr nocapture noundef readonly %6) local_unnamed_addr #8 { %8 = tail call fastcc ptr @sunCombineFileAndLine(i32 noundef %0, ptr noundef %2) - %9 = getelementptr inbounds i8, ptr %6, i64 16 + %9 = getelementptr inbounds nuw i8, ptr %6, i64 16 %10 = load ptr, ptr %9, align 8 %11 = tail call i32 (ptr, i32, ptr, ptr, ptr, ...) @SUNLogger_QueueMsg(ptr noundef %10, i32 noundef 1, ptr noundef %8, ptr noundef %1, ptr noundef nonnull @.str.26) #16 tail call void @free(ptr noundef %8) #16 @@ -184,7 +184,7 @@ define void @SUNGlobalFallbackErrHandler(i32 noundef %0, ptr noundef %1, ptr nou switch.lookup: ; preds = %18 %20 = zext nneg i32 %switch.tableidx to i64 - %switch.gep = getelementptr inbounds [25 x ptr], ptr @switch.table.SUNGlobalFallbackErrHandler, i64 0, i64 %20 + %switch.gep = getelementptr inbounds nuw [25 x ptr], ptr @switch.table.SUNGlobalFallbackErrHandler, i64 0, i64 %20 %switch.load = load ptr, ptr %switch.gep, align 8 br label %SUNGetErrMsg.exit diff --git a/bench/syn/optimized/56htwb1zk20ney2o.ll b/bench/syn/optimized/56htwb1zk20ney2o.ll index 11bc4502d19..099f96614f5 100644 --- a/bench/syn/optimized/56htwb1zk20ney2o.ll +++ b/bench/syn/optimized/56htwb1zk20ney2o.ll @@ -847,7 +847,7 @@ define hidden { i64, i64 } @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14grow_amorti %.0.sroa.speculated.i29 = tail call noundef i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i, i64 4) %10 = icmp ugt i64 %.0.sroa.speculated.i, 230584300921369395 %11 = mul nuw nsw i64 %.0.sroa.speculated.i29, 40 - %12 = getelementptr inbounds i8, ptr %0, i64 8 + %12 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val28 = load ptr, ptr %12, align 8 %13 = icmp eq i64 %8, 0 br i1 %13, label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h2b4238230dae1785E.exit", label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h2b4238230dae1785E.exit.thread" @@ -906,7 +906,7 @@ define hidden { i64, i64 } @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14grow_amorti %.0.sroa.speculated.i29 = tail call noundef i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i, i64 4) %10 = icmp ugt i64 %.0.sroa.speculated.i, 28120036697727975 %11 = mul nuw nsw i64 %.0.sroa.speculated.i29, 328 - %12 = getelementptr inbounds i8, ptr %0, i64 8 + %12 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val28 = load ptr, ptr %12, align 8 %13 = icmp eq i64 %8, 0 br i1 %13, label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17he9162ffeadd1107bE.exit", label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17he9162ffeadd1107bE.exit.thread" @@ -964,7 +964,7 @@ define hidden { i64, i64 } @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14grow_amorti %.0.sroa.speculated.i = tail call noundef i64 @llvm.umax.i64(i64 %9, i64 %5) %.0.sroa.speculated.i29 = tail call noundef i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i, i64 8) %10 = icmp slt i64 %.0.sroa.speculated.i29, 0 - %11 = getelementptr inbounds i8, ptr %0, i64 8 + %11 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val28 = load ptr, ptr %11, align 8 %12 = icmp eq i64 %8, 0 br i1 %12, label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17hd25df77e33a469b4E.exit", label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17hd25df77e33a469b4E.exit.thread" @@ -1022,7 +1022,7 @@ define hidden { i64, i64 } @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14grow_amorti %.0.sroa.speculated.i29 = tail call noundef i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i, i64 4) %10 = icmp ugt i64 %.0.sroa.speculated.i, 76861433640456465 %11 = mul nuw nsw i64 %.0.sroa.speculated.i29, 120 - %12 = getelementptr inbounds i8, ptr %0, i64 8 + %12 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val28 = load ptr, ptr %12, align 8 %13 = icmp eq i64 %8, 0 br i1 %13, label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h16af45a7fc622769E.exit", label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h16af45a7fc622769E.exit.thread" @@ -1081,7 +1081,7 @@ define hidden { i64, i64 } @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14grow_amorti %.0.sroa.speculated.i29 = tail call noundef i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i, i64 4) %10 = icmp ugt i64 %.0.sroa.speculated.i, 288230376151711743 %11 = shl nuw nsw i64 %.0.sroa.speculated.i29, 5 - %12 = getelementptr inbounds i8, ptr %0, i64 8 + %12 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val28 = load ptr, ptr %12, align 8 %13 = icmp eq i64 %8, 0 br i1 %13, label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17hd35187f5b23c86adE.exit", label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17hd35187f5b23c86adE.exit.thread" @@ -1140,7 +1140,7 @@ define hidden void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$16reserve_for_push17h %.0.sroa.speculated.i.i = tail call noundef i64 @llvm.umax.i64(i64 %8, i64 %6) %.0.sroa.speculated.i29.i = tail call noundef i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i.i, i64 8) %9 = icmp slt i64 %.0.sroa.speculated.i29.i, 0 - %10 = getelementptr inbounds i8, ptr %0, i64 8 + %10 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val28.i = load ptr, ptr %10, align 8, !alias.scope !25 %11 = icmp eq i64 %7, 0 br i1 %11, label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17hd25df77e33a469b4E.exit.i", label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17hd25df77e33a469b4E.exit.thread.i" @@ -1209,7 +1209,7 @@ define hidden void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$16reserve_for_push17h %.0.sroa.speculated.i29.i = tail call noundef i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i.i, i64 4) %9 = icmp ugt i64 %.0.sroa.speculated.i.i, 50127021939428129 %10 = mul nuw nsw i64 %.0.sroa.speculated.i29.i, 184 - %11 = getelementptr inbounds i8, ptr %0, i64 8 + %11 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val28.i = load ptr, ptr %11, align 8, !alias.scope !32 %12 = icmp eq i64 %7, 0 br i1 %12, label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17hc8cc85812cc54ebdE.exit.i", label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17hc8cc85812cc54ebdE.exit.thread.i" @@ -1268,7 +1268,7 @@ define hidden void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$16reserve_for_push17h %.0.sroa.speculated.i29.i = tail call noundef i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i.i, i64 4) %9 = icmp ugt i64 %.0.sroa.speculated.i.i, 18900352534538475 %10 = mul nuw nsw i64 %.0.sroa.speculated.i29.i, 488 - %11 = getelementptr inbounds i8, ptr %0, i64 8 + %11 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val28.i = load ptr, ptr %11, align 8, !alias.scope !39 %12 = icmp eq i64 %7, 0 br i1 %12, label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h04215a55d552cdadE.exit.i", label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h04215a55d552cdadE.exit.thread.i" @@ -1327,7 +1327,7 @@ define hidden void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$16reserve_for_push17h %.0.sroa.speculated.i29.i = tail call noundef i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i.i, i64 4) %9 = icmp ugt i64 %.0.sroa.speculated.i.i, 27450512014448737 %10 = mul nuw nsw i64 %.0.sroa.speculated.i29.i, 336 - %11 = getelementptr inbounds i8, ptr %0, i64 8 + %11 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val28.i = load ptr, ptr %11, align 8, !alias.scope !46 %12 = icmp eq i64 %7, 0 br i1 %12, label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h74fb339f3a253e01E.exit.i", label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h74fb339f3a253e01E.exit.thread.i" @@ -1386,7 +1386,7 @@ define hidden void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$16reserve_for_push17h %.0.sroa.speculated.i29.i = tail call noundef i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i.i, i64 4) %9 = icmp ugt i64 %.0.sroa.speculated.i.i, 88686269585142075 %10 = mul nuw nsw i64 %.0.sroa.speculated.i29.i, 104 - %11 = getelementptr inbounds i8, ptr %0, i64 8 + %11 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val28.i = load ptr, ptr %11, align 8, !alias.scope !53 %12 = icmp eq i64 %7, 0 br i1 %12, label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h48187d7b5087bc73E.exit.i", label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h48187d7b5087bc73E.exit.thread.i" @@ -1445,7 +1445,7 @@ define hidden void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$16reserve_for_push17h %.0.sroa.speculated.i29.i = tail call noundef i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i.i, i64 4) %9 = icmp ugt i64 %.0.sroa.speculated.i.i, 576460752303423487 %10 = shl nuw nsw i64 %.0.sroa.speculated.i29.i, 4 - %11 = getelementptr inbounds i8, ptr %0, i64 8 + %11 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val28.i = load ptr, ptr %11, align 8, !alias.scope !60 %12 = icmp eq i64 %7, 0 br i1 %12, label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17hd4920898a7442099E.exit.i", label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17hd4920898a7442099E.exit.thread.i" @@ -1504,7 +1504,7 @@ define hidden void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$16reserve_for_push17h %.0.sroa.speculated.i29.i = tail call noundef i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i.i, i64 4) %9 = icmp ugt i64 %.0.sroa.speculated.i.i, 192153584101141162 %10 = mul nuw nsw i64 %.0.sroa.speculated.i29.i, 48 - %11 = getelementptr inbounds i8, ptr %0, i64 8 + %11 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val28.i = load ptr, ptr %11, align 8, !alias.scope !67 %12 = icmp eq i64 %7, 0 br i1 %12, label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17he052445385ea3f80E.exit.i", label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17he052445385ea3f80E.exit.thread.i" @@ -1563,7 +1563,7 @@ define hidden void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$16reserve_for_push17h %.0.sroa.speculated.i29.i = tail call noundef i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i.i, i64 4) %9 = icmp ugt i64 %.0.sroa.speculated.i.i, 36028797018963967 %10 = shl nuw nsw i64 %.0.sroa.speculated.i29.i, 8 - %11 = getelementptr inbounds i8, ptr %0, i64 8 + %11 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val28.i = load ptr, ptr %11, align 8, !alias.scope !74 %12 = icmp eq i64 %7, 0 br i1 %12, label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17hf319599a3957d8e9E.exit.i", label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17hf319599a3957d8e9E.exit.thread.i" @@ -1622,7 +1622,7 @@ define hidden void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$16reserve_for_push17h %.0.sroa.speculated.i29.i = tail call noundef i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i.i, i64 4) %9 = icmp ugt i64 %.0.sroa.speculated.i.i, 28120036697727975 %10 = mul nuw nsw i64 %.0.sroa.speculated.i29.i, 328 - %11 = getelementptr inbounds i8, ptr %0, i64 8 + %11 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val28.i = load ptr, ptr %11, align 8, !alias.scope !81 %12 = icmp eq i64 %7, 0 br i1 %12, label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h1548510899f0af2cE.exit.i", label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h1548510899f0af2cE.exit.thread.i" @@ -1681,7 +1681,7 @@ define hidden void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$16reserve_for_push17h %.0.sroa.speculated.i29.i = tail call noundef i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i.i, i64 4) %9 = icmp ugt i64 %.0.sroa.speculated.i.i, 230584300921369395 %10 = mul nuw nsw i64 %.0.sroa.speculated.i29.i, 40 - %11 = getelementptr inbounds i8, ptr %0, i64 8 + %11 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val28.i = load ptr, ptr %11, align 8, !alias.scope !88 %12 = icmp eq i64 %7, 0 br i1 %12, label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17hd13928087591eaa3E.exit.i", label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17hd13928087591eaa3E.exit.thread.i" @@ -1740,7 +1740,7 @@ define hidden void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$16reserve_for_push17h %.0.sroa.speculated.i29.i = tail call noundef i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i.i, i64 4) %9 = icmp ugt i64 %.0.sroa.speculated.i.i, 30340039594917025 %10 = mul nuw nsw i64 %.0.sroa.speculated.i29.i, 304 - %11 = getelementptr inbounds i8, ptr %0, i64 8 + %11 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val28.i = load ptr, ptr %11, align 8, !alias.scope !95 %12 = icmp eq i64 %7, 0 br i1 %12, label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h145e2da2c3bdddb4E.exit.i", label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h145e2da2c3bdddb4E.exit.thread.i" @@ -1799,7 +1799,7 @@ define hidden void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$16reserve_for_push17h %.0.sroa.speculated.i29.i = tail call noundef i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i.i, i64 4) %9 = icmp ugt i64 %.0.sroa.speculated.i.i, 38430716820228232 %10 = mul nuw nsw i64 %.0.sroa.speculated.i29.i, 240 - %11 = getelementptr inbounds i8, ptr %0, i64 8 + %11 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val28.i = load ptr, ptr %11, align 8, !alias.scope !102 %12 = icmp eq i64 %7, 0 br i1 %12, label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h8789837b841abf9dE.exit.i", label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h8789837b841abf9dE.exit.thread.i" @@ -1858,7 +1858,7 @@ define hidden void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$16reserve_for_push17h %.0.sroa.speculated.i29.i = tail call noundef i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i.i, i64 4) %9 = icmp ugt i64 %.0.sroa.speculated.i.i, 288230376151711743 %10 = shl nuw nsw i64 %.0.sroa.speculated.i29.i, 5 - %11 = getelementptr inbounds i8, ptr %0, i64 8 + %11 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val28.i = load ptr, ptr %11, align 8, !alias.scope !109 %12 = icmp eq i64 %7, 0 br i1 %12, label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17hd35187f5b23c86adE.exit.i", label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17hd35187f5b23c86adE.exit.thread.i" @@ -1917,7 +1917,7 @@ define hidden void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$16reserve_for_push17h %.0.sroa.speculated.i29.i = tail call noundef i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i.i, i64 4) %9 = icmp ugt i64 %.0.sroa.speculated.i.i, 27450512014448737 %10 = mul nuw nsw i64 %.0.sroa.speculated.i29.i, 336 - %11 = getelementptr inbounds i8, ptr %0, i64 8 + %11 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val28.i = load ptr, ptr %11, align 8, !alias.scope !116 %12 = icmp eq i64 %7, 0 br i1 %12, label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17he028a7e786fb9ba9E.exit.i", label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17he028a7e786fb9ba9E.exit.thread.i" @@ -1976,7 +1976,7 @@ define hidden void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$16reserve_for_push17h %.0.sroa.speculated.i29.i = tail call noundef i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i.i, i64 4) %9 = icmp ugt i64 %.0.sroa.speculated.i.i, 37191016277640225 %10 = mul nuw nsw i64 %.0.sroa.speculated.i29.i, 248 - %11 = getelementptr inbounds i8, ptr %0, i64 8 + %11 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val28.i = load ptr, ptr %11, align 8, !alias.scope !123 %12 = icmp eq i64 %7, 0 br i1 %12, label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h76c0abe3889f849fE.exit.i", label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h76c0abe3889f849fE.exit.thread.i" @@ -2035,7 +2035,7 @@ define hidden void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$16reserve_for_push17h %.0.sroa.speculated.i29.i = tail call noundef i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i.i, i64 4) %9 = icmp ugt i64 %.0.sroa.speculated.i.i, 30340039594917025 %10 = mul nuw nsw i64 %.0.sroa.speculated.i29.i, 304 - %11 = getelementptr inbounds i8, ptr %0, i64 8 + %11 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val28.i = load ptr, ptr %11, align 8, !alias.scope !130 %12 = icmp eq i64 %7, 0 br i1 %12, label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h8824619294ef387bE.exit.i", label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h8824619294ef387bE.exit.thread.i" @@ -2094,7 +2094,7 @@ define hidden void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$16reserve_for_push17h %.0.sroa.speculated.i29.i = tail call noundef i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i.i, i64 4) %9 = icmp ugt i64 %.0.sroa.speculated.i.i, 72057594037927935 %10 = shl nuw nsw i64 %.0.sroa.speculated.i29.i, 7 - %11 = getelementptr inbounds i8, ptr %0, i64 8 + %11 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val28.i = load ptr, ptr %11, align 8, !alias.scope !137 %12 = icmp eq i64 %7, 0 br i1 %12, label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17hff36f0e0a71ff8b7E.exit.i", label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17hff36f0e0a71ff8b7E.exit.thread.i" @@ -2153,7 +2153,7 @@ define hidden void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$16reserve_for_push17h %.0.sroa.speculated.i29.i = tail call noundef i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i.i, i64 4) %9 = icmp ugt i64 %.0.sroa.speculated.i.i, 461168601842738790 %10 = mul nuw nsw i64 %.0.sroa.speculated.i29.i, 20 - %11 = getelementptr inbounds i8, ptr %0, i64 8 + %11 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val28.i = load ptr, ptr %11, align 8, !alias.scope !144 %12 = icmp eq i64 %7, 0 br i1 %12, label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17he149a6b088da1c73E.exit.i", label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17he149a6b088da1c73E.exit.thread.i" @@ -2207,19 +2207,19 @@ define hidden { i64, i64 } @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$6shrink17h8b0 5: ; preds = %2 call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) store ptr @anon.7cd0eca00d2337d0e119069360fedf80.8, ptr %3, align 8 - %6 = getelementptr inbounds i8, ptr %3, i64 8 + %6 = getelementptr inbounds nuw i8, ptr %3, i64 8 store i64 1, ptr %6, align 8 - %7 = getelementptr inbounds i8, ptr %3, i64 32 + %7 = getelementptr inbounds nuw i8, ptr %3, i64 32 store ptr null, ptr %7, align 8 - %8 = getelementptr inbounds i8, ptr %3, i64 16 + %8 = getelementptr inbounds nuw i8, ptr %3, i64 16 store ptr @anon.7cd0eca00d2337d0e119069360fedf80.0, ptr %8, align 8 - %9 = getelementptr inbounds i8, ptr %3, i64 24 + %9 = getelementptr inbounds nuw i8, ptr %3, i64 24 store i64 0, ptr %9, align 8 call void @_ZN4core9panicking9panic_fmt17h784f20a50eaab275E(ptr noalias nocapture noundef nonnull align 8 dereferenceable(48) %3, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.7cd0eca00d2337d0e119069360fedf80.10) #16 unreachable 10: ; preds = %2 - %11 = getelementptr inbounds i8, ptr %0, i64 8 + %11 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val23 = load ptr, ptr %11, align 8 %12 = icmp eq i64 %4, 0 br i1 %12, label %21, label %13 @@ -2267,19 +2267,19 @@ define hidden { i64, i64 } @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$6shrink17hfc6 5: ; preds = %2 call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) store ptr @anon.7cd0eca00d2337d0e119069360fedf80.8, ptr %3, align 8 - %6 = getelementptr inbounds i8, ptr %3, i64 8 + %6 = getelementptr inbounds nuw i8, ptr %3, i64 8 store i64 1, ptr %6, align 8 - %7 = getelementptr inbounds i8, ptr %3, i64 32 + %7 = getelementptr inbounds nuw i8, ptr %3, i64 32 store ptr null, ptr %7, align 8 - %8 = getelementptr inbounds i8, ptr %3, i64 16 + %8 = getelementptr inbounds nuw i8, ptr %3, i64 16 store ptr @anon.7cd0eca00d2337d0e119069360fedf80.0, ptr %8, align 8 - %9 = getelementptr inbounds i8, ptr %3, i64 24 + %9 = getelementptr inbounds nuw i8, ptr %3, i64 24 store i64 0, ptr %9, align 8 call void @_ZN4core9panicking9panic_fmt17h784f20a50eaab275E(ptr noalias nocapture noundef nonnull align 8 dereferenceable(48) %3, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.7cd0eca00d2337d0e119069360fedf80.10) #16 unreachable 10: ; preds = %2 - %11 = getelementptr inbounds i8, ptr %0, i64 8 + %11 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val23 = load ptr, ptr %11, align 8 %12 = icmp eq i64 %4, 0 br i1 %12, label %19, label %13 @@ -2329,7 +2329,7 @@ define hidden void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$7reserve21do_reserve_ %.0.sroa.speculated.i29.i = tail call noundef i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i.i, i64 4) %10 = icmp ugt i64 %.0.sroa.speculated.i.i, 230584300921369395 %11 = mul nuw nsw i64 %.0.sroa.speculated.i29.i, 40 - %12 = getelementptr inbounds i8, ptr %0, i64 8 + %12 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val28.i = load ptr, ptr %12, align 8, !alias.scope !151 %13 = icmp eq i64 %8, 0 br i1 %13, label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h2b4238230dae1785E.exit.i", label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h2b4238230dae1785E.exit.thread.i" @@ -2388,7 +2388,7 @@ define hidden void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$7reserve21do_reserve_ %.0.sroa.speculated.i29.i = tail call noundef i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i.i, i64 4) %10 = icmp ugt i64 %.0.sroa.speculated.i.i, 28120036697727975 %11 = mul nuw nsw i64 %.0.sroa.speculated.i29.i, 328 - %12 = getelementptr inbounds i8, ptr %0, i64 8 + %12 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val28.i = load ptr, ptr %12, align 8, !alias.scope !158 %13 = icmp eq i64 %8, 0 br i1 %13, label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17he9162ffeadd1107bE.exit.i", label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17he9162ffeadd1107bE.exit.thread.i" @@ -2446,7 +2446,7 @@ define hidden void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$7reserve21do_reserve_ %.0.sroa.speculated.i.i = tail call noundef i64 @llvm.umax.i64(i64 %9, i64 %7) %.0.sroa.speculated.i29.i = tail call noundef i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i.i, i64 8) %10 = icmp slt i64 %.0.sroa.speculated.i29.i, 0 - %11 = getelementptr inbounds i8, ptr %0, i64 8 + %11 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val28.i = load ptr, ptr %11, align 8, !alias.scope !165 %12 = icmp eq i64 %8, 0 br i1 %12, label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17hd25df77e33a469b4E.exit.i", label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17hd25df77e33a469b4E.exit.thread.i" @@ -2515,7 +2515,7 @@ define hidden void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$7reserve21do_reserve_ %.0.sroa.speculated.i29.i = tail call noundef i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i.i, i64 4) %10 = icmp ugt i64 %.0.sroa.speculated.i.i, 288230376151711743 %11 = shl nuw nsw i64 %.0.sroa.speculated.i29.i, 5 - %12 = getelementptr inbounds i8, ptr %0, i64 8 + %12 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val28.i = load ptr, ptr %12, align 8, !alias.scope !172 %13 = icmp eq i64 %8, 0 br i1 %13, label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17hd35187f5b23c86adE.exit.i", label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17hd35187f5b23c86adE.exit.thread.i" @@ -2574,7 +2574,7 @@ define hidden void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$7reserve21do_reserve_ %.0.sroa.speculated.i29.i = tail call noundef i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i.i, i64 4) %10 = icmp ugt i64 %.0.sroa.speculated.i.i, 76861433640456465 %11 = mul nuw nsw i64 %.0.sroa.speculated.i29.i, 120 - %12 = getelementptr inbounds i8, ptr %0, i64 8 + %12 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val28.i = load ptr, ptr %12, align 8, !alias.scope !179 %13 = icmp eq i64 %8, 0 br i1 %13, label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h16af45a7fc622769E.exit.i", label %"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h16af45a7fc622769E.exit.thread.i" diff --git a/bench/tev/optimized/ImageSaver.cpp.ll b/bench/tev/optimized/ImageSaver.cpp.ll index 5d31fad6d0f..7ffab79883d 100644 --- a/bench/tev/optimized/ImageSaver.cpp.ll +++ b/bench/tev/optimized/ImageSaver.cpp.ll @@ -84,11 +84,11 @@ _ZNSt3__119__allocate_at_leastB8ne190000INS_9allocatorINS_10unique_ptrIN3tev10Im to label %3 unwind label %65 3: ; preds = %_ZNSt3__119__allocate_at_leastB8ne190000INS_9allocatorINS_10unique_ptrIN3tev10ImageSaverENS_14default_deleteIS4_EEEEEEEENS_19__allocation_resultINS_16allocator_traitsIT_E7pointerEEERSB_m.exit.i.i.i - %4 = getelementptr inbounds i8, ptr %2, i64 8 + %4 = getelementptr inbounds nuw i8, ptr %2, i64 8 store ptr %1, ptr %2, align 8 store ptr %2, ptr @_ZZN3tev10ImageSaver9getSaversEvE11imageSavers, align 8 - store ptr %4, ptr getelementptr inbounds (i8, ptr @_ZZN3tev10ImageSaver9getSaversEvE11imageSavers, i64 16), align 8 - store ptr %4, ptr getelementptr inbounds (i8, ptr @_ZZN3tev10ImageSaver9getSaversEvE11imageSavers, i64 8), align 8 + store ptr %4, ptr getelementptr inbounds nuw (i8, ptr @_ZZN3tev10ImageSaver9getSaversEvE11imageSavers, i64 16), align 8 + store ptr %4, ptr getelementptr inbounds nuw (i8, ptr @_ZZN3tev10ImageSaver9getSaversEvE11imageSavers, i64 8), align 8 %5 = invoke noalias noundef nonnull dereferenceable(8) ptr @_Znwm(i64 noundef 8) #13 to label %_ZNSt3__119__allocate_at_leastB8ne190000INS_9allocatorINS_10unique_ptrIN3tev10ImageSaverENS_14default_deleteIS4_EEEEEEEENS_19__allocation_resultINS_16allocator_traitsIT_E7pointerEEERSB_m.exit.i.i.i8 unwind label %65 @@ -98,29 +98,29 @@ _ZNSt3__119__allocate_at_leastB8ne190000INS_9allocatorINS_10unique_ptrIN3tev10Im to label %7 unwind label %65 7: ; preds = %_ZNSt3__119__allocate_at_leastB8ne190000INS_9allocatorINS_10unique_ptrIN3tev10ImageSaverENS_14default_deleteIS4_EEEEEEEENS_19__allocation_resultINS_16allocator_traitsIT_E7pointerEEERSB_m.exit.i.i.i8 - %8 = getelementptr inbounds i8, ptr %6, i64 8 - %9 = getelementptr inbounds i8, ptr %6, i64 16 + %8 = getelementptr inbounds nuw i8, ptr %6, i64 8 + %9 = getelementptr inbounds nuw i8, ptr %6, i64 16 store ptr %5, ptr %8, align 8 - %10 = getelementptr inbounds i8, ptr %6, i64 16 + %10 = getelementptr inbounds nuw i8, ptr %6, i64 16 %11 = load i64, ptr %2, align 8 store i64 %11, ptr %6, align 8 store ptr %6, ptr @_ZZN3tev10ImageSaver9getSaversEvE11imageSavers, align 8 - store ptr %10, ptr getelementptr inbounds (i8, ptr @_ZZN3tev10ImageSaver9getSaversEvE11imageSavers, i64 8), align 8 - store ptr %9, ptr getelementptr inbounds (i8, ptr @_ZZN3tev10ImageSaver9getSaversEvE11imageSavers, i64 16), align 8 + store ptr %10, ptr getelementptr inbounds nuw (i8, ptr @_ZZN3tev10ImageSaver9getSaversEvE11imageSavers, i64 8), align 8 + store ptr %9, ptr getelementptr inbounds nuw (i8, ptr @_ZZN3tev10ImageSaver9getSaversEvE11imageSavers, i64 16), align 8 tail call void @_ZdlPv(ptr noundef nonnull %2) #14 - store ptr %10, ptr getelementptr inbounds (i8, ptr @_ZZN3tev10ImageSaver9getSaversEvE11imageSavers, i64 8), align 8 + store ptr %10, ptr getelementptr inbounds nuw (i8, ptr @_ZZN3tev10ImageSaver9getSaversEvE11imageSavers, i64 8), align 8 %12 = invoke noalias noundef nonnull dereferenceable(8) ptr @_Znwm(i64 noundef 8) #13 to label %13 unwind label %65 13: ; preds = %7 store ptr getelementptr inbounds (i8, ptr @_ZTVN3tev17StbiHdrImageSaverE, i64 16), ptr %12, align 8 - %14 = load ptr, ptr getelementptr inbounds (i8, ptr @_ZZN3tev10ImageSaver9getSaversEvE11imageSavers, i64 16), align 8 + %14 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @_ZZN3tev10ImageSaver9getSaversEvE11imageSavers, i64 16), align 8 %15 = icmp ult ptr %10, %14 br i1 %15, label %16, label %18 16: ; preds = %13 store ptr %12, ptr %10, align 8 - %17 = getelementptr inbounds i8, ptr %6, i64 24 + %17 = getelementptr inbounds nuw i8, ptr %6, i64 24 br label %38 18: ; preds = %13 @@ -157,11 +157,11 @@ _ZNSt3__114__split_bufferINS_10unique_ptrIN3tev10ImageSaverENS_14default_deleteI %34 = getelementptr inbounds %"class.std::__1::unique_ptr", ptr %storemerge.i.i.i22, i64 %23 %35 = getelementptr inbounds %"class.std::__1::unique_ptr", ptr %storemerge.i.i.i22, i64 %.0.i.i.i19 store ptr %12, ptr %34, align 8 - %36 = getelementptr inbounds i8, ptr %34, i64 8 + %36 = getelementptr inbounds nuw i8, ptr %34, i64 8 tail call void @llvm.memcpy.p0.p0.i64(ptr align 8 %storemerge.i.i.i22, ptr align 8 %19, i64 %22, i1 false) store ptr %storemerge.i.i.i22, ptr @_ZZN3tev10ImageSaver9getSaversEvE11imageSavers, align 8 - store ptr %36, ptr getelementptr inbounds (i8, ptr @_ZZN3tev10ImageSaver9getSaversEvE11imageSavers, i64 8), align 8 - store ptr %35, ptr getelementptr inbounds (i8, ptr @_ZZN3tev10ImageSaver9getSaversEvE11imageSavers, i64 16), align 8 + store ptr %36, ptr getelementptr inbounds nuw (i8, ptr @_ZZN3tev10ImageSaver9getSaversEvE11imageSavers, i64 8), align 8 + store ptr %35, ptr getelementptr inbounds nuw (i8, ptr @_ZZN3tev10ImageSaver9getSaversEvE11imageSavers, i64 16), align 8 %.not.i5.i.i23 = icmp eq ptr %19, null br i1 %.not.i5.i.i23, label %38, label %37 @@ -171,19 +171,19 @@ _ZNSt3__114__split_bufferINS_10unique_ptrIN3tev10ImageSaverENS_14default_deleteI 38: ; preds = %37, %_ZNSt3__114__split_bufferINS_10unique_ptrIN3tev10ImageSaverENS_14default_deleteIS3_EEEERNS_9allocatorIS6_EEE5clearB8ne190000Ev.exit.i.i.i21, %16 %.0.i24 = phi ptr [ %17, %16 ], [ %36, %_ZNSt3__114__split_bufferINS_10unique_ptrIN3tev10ImageSaverENS_14default_deleteIS3_EEEERNS_9allocatorIS6_EEE5clearB8ne190000Ev.exit.i.i.i21 ], [ %36, %37 ] - store ptr %.0.i24, ptr getelementptr inbounds (i8, ptr @_ZZN3tev10ImageSaver9getSaversEvE11imageSavers, i64 8), align 8 + store ptr %.0.i24, ptr getelementptr inbounds nuw (i8, ptr @_ZZN3tev10ImageSaver9getSaversEvE11imageSavers, i64 8), align 8 %39 = invoke noalias noundef nonnull dereferenceable(8) ptr @_Znwm(i64 noundef 8) #13 to label %40 unwind label %65 40: ; preds = %38 store ptr getelementptr inbounds (i8, ptr @_ZTVN3tev17StbiLdrImageSaverE, i64 16), ptr %39, align 8 - %41 = load ptr, ptr getelementptr inbounds (i8, ptr @_ZZN3tev10ImageSaver9getSaversEvE11imageSavers, i64 16), align 8 + %41 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @_ZZN3tev10ImageSaver9getSaversEvE11imageSavers, i64 16), align 8 %42 = icmp ult ptr %.0.i24, %41 br i1 %42, label %43, label %45 43: ; preds = %40 store ptr %39, ptr %.0.i24, align 8 - %44 = getelementptr inbounds i8, ptr %.0.i24, i64 8 + %44 = getelementptr inbounds nuw i8, ptr %.0.i24, i64 8 br label %67 45: ; preds = %40 @@ -234,11 +234,11 @@ _ZNSt3__114__split_bufferINS_10unique_ptrIN3tev10ImageSaverENS_14default_deleteI %61 = getelementptr inbounds %"class.std::__1::unique_ptr", ptr %storemerge.i.i.i34, i64 %50 %62 = getelementptr inbounds %"class.std::__1::unique_ptr", ptr %storemerge.i.i.i34, i64 %.0.i.i.i31 store ptr %39, ptr %61, align 8 - %63 = getelementptr inbounds i8, ptr %61, i64 8 + %63 = getelementptr inbounds nuw i8, ptr %61, i64 8 tail call void @llvm.memcpy.p0.p0.i64(ptr align 8 %storemerge.i.i.i34, ptr align 8 %46, i64 %49, i1 false) store ptr %storemerge.i.i.i34, ptr @_ZZN3tev10ImageSaver9getSaversEvE11imageSavers, align 8 - store ptr %63, ptr getelementptr inbounds (i8, ptr @_ZZN3tev10ImageSaver9getSaversEvE11imageSavers, i64 8), align 8 - store ptr %62, ptr getelementptr inbounds (i8, ptr @_ZZN3tev10ImageSaver9getSaversEvE11imageSavers, i64 16), align 8 + store ptr %63, ptr getelementptr inbounds nuw (i8, ptr @_ZZN3tev10ImageSaver9getSaversEvE11imageSavers, i64 8), align 8 + store ptr %62, ptr getelementptr inbounds nuw (i8, ptr @_ZZN3tev10ImageSaver9getSaversEvE11imageSavers, i64 16), align 8 %.not.i5.i.i35 = icmp eq ptr %46, null br i1 %.not.i5.i.i35, label %67, label %64 @@ -254,7 +254,7 @@ _ZNSt3__114__split_bufferINS_10unique_ptrIN3tev10ImageSaverENS_14default_deleteI 67: ; preds = %64, %_ZNSt3__114__split_bufferINS_10unique_ptrIN3tev10ImageSaverENS_14default_deleteIS3_EEEERNS_9allocatorIS6_EEE5clearB8ne190000Ev.exit.i.i.i33, %43 %.0.i36 = phi ptr [ %44, %43 ], [ %63, %_ZNSt3__114__split_bufferINS_10unique_ptrIN3tev10ImageSaverENS_14default_deleteIS3_EEEERNS_9allocatorIS6_EEE5clearB8ne190000Ev.exit.i.i.i33 ], [ %63, %64 ] - store ptr %.0.i36, ptr getelementptr inbounds (i8, ptr @_ZZN3tev10ImageSaver9getSaversEvE11imageSavers, i64 8), align 8 + store ptr %.0.i36, ptr getelementptr inbounds nuw (i8, ptr @_ZZN3tev10ImageSaver9getSaversEvE11imageSavers, i64 8), align 8 ret void } @@ -267,7 +267,7 @@ define linkonce_odr hidden void @_ZNSt3__16vectorINS_10unique_ptrIN3tev10ImageSa br i1 %.not.i, label %_ZNSt3__16vectorINS_10unique_ptrIN3tev10ImageSaverENS_14default_deleteIS3_EEEENS_9allocatorIS6_EEE16__destroy_vectorclB8ne190000Ev.exit, label %3 3: ; preds = %1 - %4 = getelementptr inbounds i8, ptr %0, i64 8 + %4 = getelementptr inbounds nuw i8, ptr %0, i64 8 %5 = load ptr, ptr %4, align 8 %.not6.i.i.i = icmp eq ptr %2, %5 br i1 %.not6.i.i.i, label %_ZNSt3__16vectorINS_10unique_ptrIN3tev10ImageSaverENS_14default_deleteIS3_EEEENS_9allocatorIS6_EEE7__clearB8ne190000Ev.exit.i, label %.lr.ph.i.i.i @@ -282,7 +282,7 @@ define linkonce_odr hidden void @_ZNSt3__16vectorINS_10unique_ptrIN3tev10ImageSa _ZNKSt3__114default_deleteIN3tev10ImageSaverEEclB8ne190000EPS2_.exit.i.i.i.i.i.i.i: ; preds = %.lr.ph.i.i.i %8 = load ptr, ptr %7, align 8 - %9 = getelementptr inbounds i8, ptr %8, i64 8 + %9 = getelementptr inbounds nuw i8, ptr %8, i64 8 %10 = load ptr, ptr %9, align 8 tail call void %10(ptr noundef nonnull align 8 dereferenceable(8) %7) #12 br label %_ZNSt3__116allocator_traitsINS_9allocatorINS_10unique_ptrIN3tev10ImageSaverENS_14default_deleteIS4_EEEEEEE7destroyB8ne190000IS7_vTnNS_9enable_ifIXntsr13__has_destroyIS8_PT_EE5valueEiE4typeELi0EEEvRS8_SD_.exit.i.i.i diff --git a/bench/tinympc/optimized/codegen_random.cpp.ll b/bench/tinympc/optimized/codegen_random.cpp.ll index d2f6d79c3f2..2e027e726cb 100644 --- a/bench/tinympc/optimized/codegen_random.cpp.ll +++ b/bench/tinympc/optimized/codegen_random.cpp.ll @@ -67,7 +67,7 @@ define linkonce_odr dso_local void @_ZNSt10filesystem7__cxx114pathC2IA39_cS1_EER %9 = extractvalue { i64, ptr } %7, 1 call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12__sv_wrapperC1ESt17basic_string_viewIcS2_E(ptr noundef nonnull align 8 dereferenceable(16) %4, i64 %8, ptr %9) #15 %10 = load i64, ptr %4, align 8 - %11 = getelementptr inbounds i8, ptr %4, i64 8 + %11 = getelementptr inbounds nuw i8, ptr %4, i64 8 %12 = load ptr, ptr %11, align 8 invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ENS4_12__sv_wrapperERKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 %10, ptr %12, ptr noundef nonnull align 1 dereferenceable(1) %5) to label %13 unwind label %17 @@ -75,7 +75,7 @@ define linkonce_odr dso_local void @_ZNSt10filesystem7__cxx114pathC2IA39_cS1_EER 13: ; preds = %3 call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) call void @_ZNSaIcED1Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #15 - %14 = getelementptr inbounds i8, ptr %0, i64 32 + %14 = getelementptr inbounds nuw i8, ptr %0, i64 32 invoke void @_ZNSt10filesystem7__cxx114path5_ListC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) to label %15 unwind label %19 @@ -124,7 +124,7 @@ _ZNSt10filesystem7__cxx114path5_ListD2Ev.exit: ; preds = %21, %24 ; Function Attrs: mustprogress nounwind uwtable define linkonce_odr dso_local void @_ZNSt10filesystem7__cxx114pathD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %0) unnamed_addr #4 comdat align 2 { - %2 = getelementptr inbounds i8, ptr %0, i64 32 + %2 = getelementptr inbounds nuw i8, ptr %0, i64 32 %3 = load ptr, ptr %2, align 8 %.not.i.i = icmp eq ptr %3, null br i1 %.not.i.i, label %_ZNSt10filesystem7__cxx114path5_ListD2Ev.exit, label %4 @@ -236,7 +236,7 @@ define dso_local noundef i32 @main() local_unnamed_addr #5 personality ptr @__gx 41: ; preds = %.preheader.i.i79 store ptr %32, ptr %3, align 8 - %42 = getelementptr inbounds i8, ptr %3, i64 8 + %42 = getelementptr inbounds nuw i8, ptr %3, i64 8 store i64 2, ptr %42, align 8 store <2 x double> , ptr %32, align 16 call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %4, i8 0, i64 16, i1 false) @@ -262,7 +262,7 @@ define dso_local noundef i32 @main() local_unnamed_addr #5 personality ptr @__gx 50: ; preds = %41 store ptr %43, ptr %4, align 8 - %51 = getelementptr inbounds i8, ptr %4, i64 8 + %51 = getelementptr inbounds nuw i8, ptr %4, i64 8 store i64 2, ptr %51, align 8 store <2 x double> , ptr %43, align 16 %52 = tail call noalias dereferenceable_or_null(48) ptr @malloc(i64 noundef 48) #16 @@ -271,15 +271,15 @@ define dso_local noundef i32 @main() local_unnamed_addr #5 personality ptr @__gx .lr.ph.i.i.i.i.i.i.i.preheader: ; preds = %50 store double -1.000000e+00, ptr %52, align 16 - %.sroa.3218.0..sroa_idx = getelementptr inbounds i8, ptr %52, i64 8 + %.sroa.3218.0..sroa_idx = getelementptr inbounds nuw i8, ptr %52, i64 8 store double -2.000000e+00, ptr %.sroa.3218.0..sroa_idx, align 8 - %.sroa.4219.0..sroa_idx = getelementptr inbounds i8, ptr %52, i64 16 + %.sroa.4219.0..sroa_idx = getelementptr inbounds nuw i8, ptr %52, i64 16 store double -1.000000e+00, ptr %.sroa.4219.0..sroa_idx, align 16 - %.sroa.5220.0..sroa_idx = getelementptr inbounds i8, ptr %52, i64 24 + %.sroa.5220.0..sroa_idx = getelementptr inbounds nuw i8, ptr %52, i64 24 store double -2.000000e+00, ptr %.sroa.5220.0..sroa_idx, align 8 - %.sroa.6221.0..sroa_idx = getelementptr inbounds i8, ptr %52, i64 32 + %.sroa.6221.0..sroa_idx = getelementptr inbounds nuw i8, ptr %52, i64 32 store double -1.000000e+00, ptr %.sroa.6221.0..sroa_idx, align 16 - %.sroa.7222.0..sroa_idx = getelementptr inbounds i8, ptr %52, i64 40 + %.sroa.7222.0..sroa_idx = getelementptr inbounds nuw i8, ptr %52, i64 40 store double -2.000000e+00, ptr %.sroa.7222.0..sroa_idx, align 8 %54 = tail call noalias dereferenceable_or_null(48) ptr @malloc(i64 noundef 48) #16 %55 = icmp eq ptr %54, null @@ -301,15 +301,15 @@ define dso_local noundef i32 @main() local_unnamed_addr #5 personality ptr @__gx .lr.ph.i.i.i.i.i.i.i50.preheader: ; preds = %.lr.ph.i.i.i.i.i.i.i.preheader store double 1.000000e+00, ptr %54, align 16 - %.sroa.3.0..sroa_idx = getelementptr inbounds i8, ptr %54, i64 8 + %.sroa.3.0..sroa_idx = getelementptr inbounds nuw i8, ptr %54, i64 8 store double 2.000000e+00, ptr %.sroa.3.0..sroa_idx, align 8 - %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %54, i64 16 + %.sroa.4.0..sroa_idx = getelementptr inbounds nuw i8, ptr %54, i64 16 store double 1.000000e+00, ptr %.sroa.4.0..sroa_idx, align 16 - %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %54, i64 24 + %.sroa.5.0..sroa_idx = getelementptr inbounds nuw i8, ptr %54, i64 24 store double 2.000000e+00, ptr %.sroa.5.0..sroa_idx, align 8 - %.sroa.6.0..sroa_idx = getelementptr inbounds i8, ptr %54, i64 32 + %.sroa.6.0..sroa_idx = getelementptr inbounds nuw i8, ptr %54, i64 32 store double 1.000000e+00, ptr %.sroa.6.0..sroa_idx, align 16 - %.sroa.7.0..sroa_idx = getelementptr inbounds i8, ptr %54, i64 40 + %.sroa.7.0..sroa_idx = getelementptr inbounds nuw i8, ptr %54, i64 40 store double 2.000000e+00, ptr %.sroa.7.0..sroa_idx, align 8 %60 = tail call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #16 %61 = icmp eq ptr %60, null @@ -345,7 +345,7 @@ define dso_local noundef i32 @main() local_unnamed_addr #5 personality ptr @__gx 70: ; preds = %.lr.ph.i.i.i.i.i.i.i50.preheader store <2 x double> , ptr %60, align 16 - %71 = getelementptr inbounds i8, ptr %60, i64 16 + %71 = getelementptr inbounds nuw i8, ptr %60, i64 16 store <2 x double> , ptr %71, align 16 %72 = tail call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #16 %73 = icmp eq ptr %72, null @@ -367,7 +367,7 @@ define dso_local noundef i32 @main() local_unnamed_addr #5 personality ptr @__gx 78: ; preds = %70 store <2 x double> , ptr %72, align 16 - %79 = getelementptr inbounds i8, ptr %72, i64 16 + %79 = getelementptr inbounds nuw i8, ptr %72, i64 16 store <2 x double> , ptr %79, align 16 %80 = tail call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #16 %81 = icmp eq ptr %80, null @@ -384,9 +384,9 @@ define dso_local noundef i32 @main() local_unnamed_addr #5 personality ptr @__gx 84: ; preds = %78 store ptr %80, ptr %5, align 8 - %85 = getelementptr inbounds i8, ptr %5, i64 8 + %85 = getelementptr inbounds nuw i8, ptr %5, i64 8 store i64 2, ptr %85, align 8 - %86 = getelementptr inbounds i8, ptr %5, i64 16 + %86 = getelementptr inbounds nuw i8, ptr %5, i64 16 store i64 2, ptr %86, align 8 tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %80, ptr noundef nonnull align 8 dereferenceable(32) %17, i64 32, i1 false) %87 = tail call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #16 @@ -404,9 +404,9 @@ define dso_local noundef i32 @main() local_unnamed_addr #5 personality ptr @__gx 91: ; preds = %84 store ptr %87, ptr %6, align 8 - %92 = getelementptr inbounds i8, ptr %6, i64 8 + %92 = getelementptr inbounds nuw i8, ptr %6, i64 8 store i64 2, ptr %92, align 8 - %93 = getelementptr inbounds i8, ptr %6, i64 16 + %93 = getelementptr inbounds nuw i8, ptr %6, i64 16 store i64 2, ptr %93, align 8 tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %87, ptr noundef nonnull align 8 dereferenceable(32) %24, i64 32, i1 false) store ptr %3, ptr %8, align 8 @@ -434,9 +434,9 @@ _ZN5Eigen6MatrixIdLin1ELin1ELi0ELin1ELin1EEC2INS_15DiagonalWrapperIKNS0_IdLin1EL 98: ; preds = %_ZN5Eigen6MatrixIdLin1ELin1ELi0ELin1ELin1EEC2INS_15DiagonalWrapperIKNS0_IdLin1ELi1ELi0ELin1ELi1EEEEEEERKNS_9EigenBaseIT_EE.exit64 store ptr %94, ptr %11, align 8 - %99 = getelementptr inbounds i8, ptr %11, i64 8 + %99 = getelementptr inbounds nuw i8, ptr %11, i64 8 store i64 2, ptr %99, align 8 - %100 = getelementptr inbounds i8, ptr %11, i64 16 + %100 = getelementptr inbounds nuw i8, ptr %11, i64 16 store i64 3, ptr %100, align 8 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %94, ptr noundef nonnull align 8 dereferenceable(48) %52, i64 48, i1 false) %101 = call noalias dereferenceable_or_null(48) ptr @malloc(i64 noundef 48) #16 @@ -454,9 +454,9 @@ _ZN5Eigen6MatrixIdLin1ELin1ELi0ELin1ELin1EEC2INS_15DiagonalWrapperIKNS0_IdLin1EL 105: ; preds = %98 store ptr %101, ptr %12, align 8 - %106 = getelementptr inbounds i8, ptr %12, i64 8 + %106 = getelementptr inbounds nuw i8, ptr %12, i64 8 store i64 2, ptr %106, align 8 - %107 = getelementptr inbounds i8, ptr %12, i64 16 + %107 = getelementptr inbounds nuw i8, ptr %12, i64 16 store i64 3, ptr %107, align 8 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %101, ptr noundef nonnull align 8 dereferenceable(48) %54, i64 48, i1 false) %108 = call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #16 @@ -474,9 +474,9 @@ _ZN5Eigen6MatrixIdLin1ELin1ELi0ELin1ELin1EEC2INS_15DiagonalWrapperIKNS0_IdLin1EL 112: ; preds = %105 store ptr %108, ptr %13, align 8 - %113 = getelementptr inbounds i8, ptr %13, i64 8 + %113 = getelementptr inbounds nuw i8, ptr %13, i64 8 store i64 2, ptr %113, align 8 - %114 = getelementptr inbounds i8, ptr %13, i64 16 + %114 = getelementptr inbounds nuw i8, ptr %13, i64 16 store i64 2, ptr %114, align 8 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %108, ptr noundef nonnull align 8 dereferenceable(32) %60, i64 32, i1 false) %115 = call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #16 @@ -494,9 +494,9 @@ _ZN5Eigen6MatrixIdLin1ELin1ELi0ELin1ELin1EEC2INS_15DiagonalWrapperIKNS0_IdLin1EL 119: ; preds = %112 store ptr %115, ptr %14, align 8 - %120 = getelementptr inbounds i8, ptr %14, i64 8 + %120 = getelementptr inbounds nuw i8, ptr %14, i64 8 store i64 2, ptr %120, align 8 - %121 = getelementptr inbounds i8, ptr %14, i64 16 + %121 = getelementptr inbounds nuw i8, ptr %14, i64 16 store i64 2, ptr %121, align 8 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %115, ptr noundef nonnull align 8 dereferenceable(32) %72, i64 32, i1 false) %122 = invoke i32 @tiny_setup(ptr noundef nonnull %2, ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %9, double noundef 1.000000e-01, i32 noundef 2, i32 noundef 2, i32 noundef 3, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef nonnull %13, ptr noundef nonnull %14, i32 noundef 0) @@ -520,19 +520,19 @@ _ZN5Eigen6MatrixIdLin1ELin1ELi0ELin1ELin1EEC2INS_15DiagonalWrapperIKNS0_IdLin1EL %131 = load ptr, ptr %5, align 8 call void @free(ptr noundef %131) #15 %132 = load ptr, ptr %2, align 8 - %133 = getelementptr inbounds i8, ptr %132, i64 8 + %133 = getelementptr inbounds nuw i8, ptr %132, i64 8 %134 = load ptr, ptr %133, align 8 store double 1.000000e-03, ptr %134, align 8 %135 = load ptr, ptr %2, align 8 - %136 = getelementptr inbounds i8, ptr %135, i64 8 + %136 = getelementptr inbounds nuw i8, ptr %135, i64 8 %137 = load ptr, ptr %136, align 8 - %138 = getelementptr inbounds i8, ptr %137, i64 8 + %138 = getelementptr inbounds nuw i8, ptr %137, i64 8 store double 1.000000e-03, ptr %138, align 8 %139 = load ptr, ptr %136, align 8 - %140 = getelementptr inbounds i8, ptr %139, i64 16 + %140 = getelementptr inbounds nuw i8, ptr %139, i64 16 store i32 100, ptr %140, align 8 %141 = load ptr, ptr %136, align 8 - %142 = getelementptr inbounds i8, ptr %141, i64 20 + %142 = getelementptr inbounds nuw i8, ptr %141, i64 20 store i32 1, ptr %142, align 4 invoke void @_ZNSt10filesystem8absoluteERKNS_7__cxx114pathE(ptr dead_on_unwind nonnull writable sret(%"class.std::filesystem::__cxx11::path") align 8 %16, ptr noundef nonnull align 8 dereferenceable(40) @output_dir_relative) to label %143 unwind label %157 @@ -560,7 +560,7 @@ _ZN5Eigen6MatrixIdLin1ELin1ELi0ELin1ELin1EEC2INS_15DiagonalWrapperIKNS0_IdLin1EL 151: ; preds = %148 call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #15 - %152 = getelementptr inbounds i8, ptr %16, i64 32 + %152 = getelementptr inbounds nuw i8, ptr %16, i64 32 %153 = load ptr, ptr %152, align 8 %.not.i.i.i = icmp eq ptr %153, null br i1 %.not.i.i.i, label %_ZNSt10filesystem7__cxx114pathD2Ev.exit, label %154 @@ -794,9 +794,9 @@ declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr #10 ; Function Attrs: mustprogress uwtable define linkonce_odr dso_local void @_ZN5Eigen12DenseStorageIdLin1ELin1ELin1ELi0EE6resizeElll(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %1, i64 noundef %2, i64 noundef %3) local_unnamed_addr #3 comdat align 2 { - %5 = getelementptr inbounds i8, ptr %0, i64 8 + %5 = getelementptr inbounds nuw i8, ptr %0, i64 8 %6 = load i64, ptr %5, align 8 - %7 = getelementptr inbounds i8, ptr %0, i64 16 + %7 = getelementptr inbounds nuw i8, ptr %0, i64 16 %8 = load i64, ptr %7, align 8 %9 = mul nsw i64 %8, %6 %.not = icmp eq i64 %1, %9 @@ -849,7 +849,7 @@ define linkonce_odr dso_local void @_ZN5Eigen15PlainObjectBaseINS_6MatrixIdLin1E %3 = alloca %"struct.Eigen::internal::assign_op", align 1 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %0, i8 0, i64 24, i1 false) %4 = load ptr, ptr %1, align 8 - %5 = getelementptr inbounds i8, ptr %4, i64 8 + %5 = getelementptr inbounds nuw i8, ptr %4, i64 8 %6 = load i64, ptr %5, align 8 %7 = icmp eq i64 %6, 0 br i1 %7, label %_ZN5Eigen15PlainObjectBaseINS_6MatrixIdLin1ELin1ELi0ELin1ELin1EEEE6resizeEll.exit.i, label %8 @@ -866,7 +866,7 @@ _ZN5Eigen15PlainObjectBaseINS_6MatrixIdLin1ELin1ELi0ELin1ELin1EEEE6resizeEll.exi _ZN5Eigen15PlainObjectBaseINS_6MatrixIdLin1ELin1ELi0ELin1ELin1EEEE10resizeLikeINS_15DiagonalWrapperIKNS1_IdLin1ELi1ELi0ELin1ELi1EEEEEEEvRKNS_9EigenBaseIT_EE.exit: ; preds = %_ZN5Eigen15PlainObjectBaseINS_6MatrixIdLin1ELin1ELi0ELin1ELin1EEEE6resizeEll.exit.i %12 = load ptr, ptr %1, align 8 - %13 = getelementptr inbounds i8, ptr %12, i64 8 + %13 = getelementptr inbounds nuw i8, ptr %12, i64 8 %14 = load i64, ptr %13, align 8 %15 = icmp eq i64 %14, 0 br i1 %15, label %_ZN5Eigen15PlainObjectBaseINS_6MatrixIdLin1ELin1ELi0ELin1ELin1EEEE16_resize_to_matchINS_15DiagonalWrapperIKNS1_IdLin1ELi1ELi0ELin1ELi1EEEEEEEvRKNS_9EigenBaseIT_EE.exit.i, label %16 @@ -910,12 +910,12 @@ _ZN5Eigen15PlainObjectBaseINS_6MatrixIdLin1ELin1ELi0ELin1ELin1EEEE16_resize_to_m ; Function Attrs: mustprogress uwtable define linkonce_odr dso_local void @_ZN5Eigen8internal10AssignmentINS_6MatrixIdLin1ELin1ELi0ELin1ELin1EEENS_15DiagonalWrapperIKNS2_IdLin1ELi1ELi0ELin1ELi1EEEEENS0_9assign_opIddEENS0_14Diagonal2DenseEvE3runERS3_RKS7_RKS9_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 1 dereferenceable(1) %2) local_unnamed_addr #3 comdat align 2 personality ptr @__gxx_personality_v0 { %4 = load ptr, ptr %1, align 8 - %5 = getelementptr inbounds i8, ptr %4, i64 8 + %5 = getelementptr inbounds nuw i8, ptr %4, i64 8 %6 = load i64, ptr %5, align 8 - %7 = getelementptr inbounds i8, ptr %0, i64 8 + %7 = getelementptr inbounds nuw i8, ptr %0, i64 8 %8 = load i64, ptr %7, align 8 %.not = icmp eq i64 %8, %6 - %9 = getelementptr inbounds i8, ptr %0, i64 16 + %9 = getelementptr inbounds nuw i8, ptr %0, i64 16 %10 = load i64, ptr %9, align 8 %.not11 = icmp eq i64 %10, %6 %or.cond = select i1 %.not, i1 %.not11, i1 false @@ -973,7 +973,7 @@ _ZN5Eigen9DenseBaseINS_6MatrixIdLin1ELin1ELi0ELin1ELin1EEEE7setZeroEv.exit: ; pr %33 = mul nsw i64 %.05.i.i.i.i.i.i.i.i, %27 %34 = getelementptr double, ptr %30, i64 %.05.i.i.i.i.i.i.i.i %35 = getelementptr double, ptr %34, i64 %33 - %36 = getelementptr inbounds double, ptr %29, i64 %.05.i.i.i.i.i.i.i.i + %36 = getelementptr inbounds nuw double, ptr %29, i64 %.05.i.i.i.i.i.i.i.i %37 = load double, ptr %36, align 8 store double %37, ptr %35, align 8 %38 = add nuw nsw i64 %.05.i.i.i.i.i.i.i.i, 1 diff --git a/bench/unicode-normalization-rs/optimized/kwscsepwptyv51i.ll b/bench/unicode-normalization-rs/optimized/kwscsepwptyv51i.ll index e817cf55753..f569fbb8f11 100644 --- a/bench/unicode-normalization-rs/optimized/kwscsepwptyv51i.ll +++ b/bench/unicode-normalization-rs/optimized/kwscsepwptyv51i.ll @@ -19,21 +19,21 @@ target triple = "x86_64-unknown-linux-gnu" ; Function Attrs: inlinehint nonlazybind uwtable define hidden void @_ZN4core4iter6traits8iterator8Iterator4fold17h174e2c69d9c94479E.llvm.5961062740919296986(ptr noalias nocapture noundef align 8 dereferenceable(32) %0, ptr noalias noundef align 8 dereferenceable(24) %1) unnamed_addr #0 personality ptr @rust_eh_personality { %.sroa.0.i.i.i = alloca i32, align 4 - %3 = getelementptr inbounds i8, ptr %0, i64 24 + %3 = getelementptr inbounds nuw i8, ptr %0, i64 24 %.promoted = load i32, ptr %3, align 8, !alias.scope !4 %.promoted27 = load ptr, ptr %0, align 8, !alias.scope !7 - %4 = getelementptr inbounds i8, ptr %0, i64 8 + %4 = getelementptr inbounds nuw i8, ptr %0, i64 8 %5 = load ptr, ptr %4, align 8, !nonnull !12 - %6 = getelementptr inbounds i8, ptr %0, i64 16 - %7 = getelementptr inbounds i8, ptr %1, i64 16 - %8 = getelementptr inbounds i8, ptr %1, i64 8 + %6 = getelementptr inbounds nuw i8, ptr %0, i64 16 + %7 = getelementptr inbounds nuw i8, ptr %1, i64 16 + %8 = getelementptr inbounds nuw i8, ptr %1, i64 8 %.promoted28 = load i64, ptr %6, align 8, !alias.scope !4 - %.sroa.0.i.i.i.1.i.i.i.1.i.i.i.1.i.i.1.i.i.1.i.1.i.1..sroa_idx = getelementptr inbounds i8, ptr %.sroa.0.i.i.i, i64 1 - %.sroa.0.i.i.i.2.i.i.i.2.i.i.i.2.i.i.2.i.i.2.i.2.i.2..sroa_idx = getelementptr inbounds i8, ptr %.sroa.0.i.i.i, i64 2 - %.sroa.0.i.i.i.3.i.i.i.3.i.i.i.3.i.i.3.i.i.3.i.3.i.3..sroa_idx = getelementptr inbounds i8, ptr %.sroa.0.i.i.i, i64 3 - %.sroa.0.i.i.i.1.i.i.i.1.i.i.i.1.i.i.1.i.i.1.i.1.i.1..sroa_idx53 = getelementptr inbounds i8, ptr %.sroa.0.i.i.i, i64 1 - %.sroa.0.i.i.i.2.i.i.i.2.i.i.i.2.i.i.2.i.i.2.i.2.i.2..sroa_idx55 = getelementptr inbounds i8, ptr %.sroa.0.i.i.i, i64 2 - %.sroa.0.i.i.i.1.i.i.i.1.i.i.i.1.i.i.1.i.i.1.i.1.i.1..sroa_idx54 = getelementptr inbounds i8, ptr %.sroa.0.i.i.i, i64 1 + %.sroa.0.i.i.i.1.i.i.i.1.i.i.i.1.i.i.1.i.i.1.i.1.i.1..sroa_idx = getelementptr inbounds nuw i8, ptr %.sroa.0.i.i.i, i64 1 + %.sroa.0.i.i.i.2.i.i.i.2.i.i.i.2.i.i.2.i.i.2.i.2.i.2..sroa_idx = getelementptr inbounds nuw i8, ptr %.sroa.0.i.i.i, i64 2 + %.sroa.0.i.i.i.3.i.i.i.3.i.i.i.3.i.i.3.i.i.3.i.3.i.3..sroa_idx = getelementptr inbounds nuw i8, ptr %.sroa.0.i.i.i, i64 3 + %.sroa.0.i.i.i.1.i.i.i.1.i.i.i.1.i.i.1.i.i.1.i.1.i.1..sroa_idx53 = getelementptr inbounds nuw i8, ptr %.sroa.0.i.i.i, i64 1 + %.sroa.0.i.i.i.2.i.i.i.2.i.i.i.2.i.i.2.i.i.2.i.2.i.2..sroa_idx55 = getelementptr inbounds nuw i8, ptr %.sroa.0.i.i.i, i64 2 + %.sroa.0.i.i.i.1.i.i.i.1.i.i.i.1.i.i.1.i.i.1.i.1.i.1..sroa_idx54 = getelementptr inbounds nuw i8, ptr %.sroa.0.i.i.i, i64 1 br label %"_ZN4core4iter6traits8iterator8Iterator8for_each4call28_$u7b$$u7b$closure$u7d$$u7d$17ha6cebfed4dedef8bE.exit" "_ZN4core4iter6traits8iterator8Iterator8for_each4call28_$u7b$$u7b$closure$u7d$$u7d$17ha6cebfed4dedef8bE.exit": ; preds = %"_ZN4core4iter6traits8iterator8Iterator8for_each4call28_$u7b$$u7b$closure$u7d$$u7d$17ha6cebfed4dedef8bE.exit.backedge", %2 @@ -52,7 +52,7 @@ define hidden void @_ZN4core4iter6traits8iterator8Iterator4fold17h174e2c69d9c944 br i1 %13, label %"_ZN114_$LT$unicode_normalization..stream_safe..StreamSafe$LT$I$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hc484d1e554794a18E.exit.thread", label %14 14: ; preds = %12 - %15 = getelementptr inbounds i8, ptr %10, i64 1 + %15 = getelementptr inbounds nuw i8, ptr %10, i64 1 store ptr %15, ptr %0, align 8, !alias.scope !15 %16 = load i8, ptr %10, align 1, !noalias !7, !noundef !12 %17 = icmp sgt i8 %16, -1 @@ -63,7 +63,7 @@ define hidden void @_ZN4core4iter6traits8iterator8Iterator4fold17h174e2c69d9c944 %19 = zext nneg i8 %18 to i32 %20 = icmp ne ptr %15, %5 tail call void @llvm.assume(i1 %20) - %21 = getelementptr inbounds i8, ptr %10, i64 2 + %21 = getelementptr inbounds nuw i8, ptr %10, i64 2 store ptr %21, ptr %0, align 8, !alias.scope !18 %22 = load i8, ptr %15, align 1, !noalias !7, !noundef !12 %23 = shl nuw nsw i32 %19, 6 @@ -80,7 +80,7 @@ define hidden void @_ZN4core4iter6traits8iterator8Iterator4fold17h174e2c69d9c944 "_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h038d9c4320b62c3dE.exit15.i.i.i.i.i": ; preds = %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h038d9c4320b62c3dE.exit13.i.i.i.i.i" %29 = icmp ne ptr %21, %5 tail call void @llvm.assume(i1 %29) - %30 = getelementptr inbounds i8, ptr %10, i64 3 + %30 = getelementptr inbounds nuw i8, ptr %10, i64 3 store ptr %30, ptr %0, align 8, !alias.scope !21 %31 = load i8, ptr %21, align 1, !noalias !7, !noundef !12 %32 = shl nuw nsw i32 %25, 6 @@ -95,7 +95,7 @@ define hidden void @_ZN4core4iter6traits8iterator8Iterator4fold17h174e2c69d9c944 "_ZN4core6option15Option$LT$T$GT$7or_else17hf3db5b66814f085bE.exit.i": ; preds = %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h038d9c4320b62c3dE.exit15.i.i.i.i.i" %39 = icmp ne ptr %30, %5 tail call void @llvm.assume(i1 %39) - %40 = getelementptr inbounds i8, ptr %10, i64 4 + %40 = getelementptr inbounds nuw i8, ptr %10, i64 4 store ptr %40, ptr %0, align 8, !alias.scope !24 %41 = load i8, ptr %30, align 1, !noalias !7, !noundef !12 %42 = shl nuw nsw i32 %19, 18 @@ -424,9 +424,9 @@ define hidden void @"_ZN95_$LT$alloc..string..String$u20$as$u20$core..iter..trai %4 = alloca { { { i64, ptr }, i64 } }, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) store i64 0, ptr %4, align 8 - %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %4, i64 8 + %.sroa.4.0..sroa_idx = getelementptr inbounds nuw i8, ptr %4, i64 8 store ptr inttoptr (i64 1 to ptr), ptr %.sroa.4.0..sroa_idx, align 8 - %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %4, i64 16 + %.sroa.5.0..sroa_idx = getelementptr inbounds nuw i8, ptr %4, i64 16 store i64 0, ptr %.sroa.5.0..sroa_idx, align 8 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3), !noalias !61 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull readonly align 8 dereferenceable(32) %1, i64 32, i1 false), !noalias !68 diff --git a/bench/wolfssl/optimized/md5.c.ll b/bench/wolfssl/optimized/md5.c.ll index f1c2c2d502c..5a00b6cacc1 100644 --- a/bench/wolfssl/optimized/md5.c.ll +++ b/bench/wolfssl/optimized/md5.c.ll @@ -12,20 +12,20 @@ entry: br i1 %cmp, label %return, label %if.end if.end: ; preds = %entry - %heap1 = getelementptr inbounds i8, ptr %md5, i64 96 + %heap1 = getelementptr inbounds nuw i8, ptr %md5, i64 96 store ptr %heap, ptr %heap1, align 8 - %digest.i = getelementptr inbounds i8, ptr %md5, i64 76 + %digest.i = getelementptr inbounds nuw i8, ptr %md5, i64 76 store i32 1732584193, ptr %digest.i, align 4 - %arrayidx2.i = getelementptr inbounds i8, ptr %md5, i64 80 + %arrayidx2.i = getelementptr inbounds nuw i8, ptr %md5, i64 80 store i32 -271733879, ptr %arrayidx2.i, align 4 - %arrayidx4.i = getelementptr inbounds i8, ptr %md5, i64 84 + %arrayidx4.i = getelementptr inbounds nuw i8, ptr %md5, i64 84 store i32 -1732584194, ptr %arrayidx4.i, align 4 - %arrayidx6.i = getelementptr inbounds i8, ptr %md5, i64 88 + %arrayidx6.i = getelementptr inbounds nuw i8, ptr %md5, i64 88 store i32 271733878, ptr %arrayidx6.i, align 4 store i32 0, ptr %md5, align 8 - %loLen.i = getelementptr inbounds i8, ptr %md5, i64 4 + %loLen.i = getelementptr inbounds nuw i8, ptr %md5, i64 4 store i32 0, ptr %loLen.i, align 4 - %hiLen.i = getelementptr inbounds i8, ptr %md5, i64 8 + %hiLen.i = getelementptr inbounds nuw i8, ptr %md5, i64 8 store i32 0, ptr %hiLen.i, align 8 br label %return @@ -57,7 +57,7 @@ if.end5: ; preds = %if.end br i1 %or.cond1, label %return, label %if.end10 if.end10: ; preds = %if.end5 - %loLen.i = getelementptr inbounds i8, ptr %md5, i64 4 + %loLen.i = getelementptr inbounds nuw i8, ptr %md5, i64 4 %1 = load i32, ptr %loLen.i, align 4 %add.i = add i32 %1, %len store i32 %add.i, ptr %loLen.i, align 4 @@ -65,14 +65,14 @@ if.end10: ; preds = %if.end5 br i1 %cmp.i, label %if.then.i, label %AddLength.exit if.then.i: ; preds = %if.end10 - %hiLen.i = getelementptr inbounds i8, ptr %md5, i64 8 + %hiLen.i = getelementptr inbounds nuw i8, ptr %md5, i64 8 %2 = load i32, ptr %hiLen.i, align 8 %inc.i = add i32 %2, 1 store i32 %inc.i, ptr %hiLen.i, align 8 br label %AddLength.exit AddLength.exit: ; preds = %if.end10, %if.then.i - %buffer = getelementptr inbounds i8, ptr %md5, i64 12 + %buffer = getelementptr inbounds nuw i8, ptr %md5, i64 12 %cmp12.not = icmp eq i32 %0, 0 br i1 %cmp12.not, label %if.end29, label %if.then13 @@ -80,13 +80,12 @@ if.then13: ; preds = %AddLength.exit %sub = sub nuw nsw i32 64, %0 %cond.i = tail call noundef i32 @llvm.umin.i32(i32 %len, i32 %sub) %idxprom = zext nneg i32 %0 to i64 - %arrayidx = getelementptr inbounds i8, ptr %buffer, i64 %idxprom + %arrayidx = getelementptr inbounds nuw i8, ptr %buffer, i64 %idxprom %conv = zext nneg i32 %cond.i to i64 tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %arrayidx, ptr align 1 %data, i64 %conv, i1 false) - %3 = load i32, ptr %md5, align 8 - %add = add i32 %3, %cond.i + %add = add nuw nsw i32 %cond.i, %0 store i32 %add, ptr %md5, align 8 - %add.ptr = getelementptr inbounds i8, ptr %data, i64 %conv + %add.ptr = getelementptr inbounds nuw i8, ptr %data, i64 %conv %sub17 = sub i32 %len, %cond.i %cmp19 = icmp eq i32 %add, 64 br i1 %cmp19, label %if.then21, label %if.end29 @@ -135,13 +134,13 @@ declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define internal fastcc void @Transform(ptr nocapture noundef nonnull %md5, ptr nocapture noundef nonnull readonly %data) unnamed_addr #3 { entry: - %digest = getelementptr inbounds i8, ptr %md5, i64 76 + %digest = getelementptr inbounds nuw i8, ptr %md5, i64 76 %0 = load i32, ptr %digest, align 4 - %arrayidx2 = getelementptr inbounds i8, ptr %md5, i64 80 + %arrayidx2 = getelementptr inbounds nuw i8, ptr %md5, i64 80 %1 = load i32, ptr %arrayidx2, align 4 - %arrayidx4 = getelementptr inbounds i8, ptr %md5, i64 84 + %arrayidx4 = getelementptr inbounds nuw i8, ptr %md5, i64 84 %2 = load i32, ptr %arrayidx4, align 4 - %arrayidx6 = getelementptr inbounds i8, ptr %md5, i64 88 + %arrayidx6 = getelementptr inbounds nuw i8, ptr %md5, i64 88 %3 = load i32, ptr %arrayidx6, align 4 %xor = xor i32 %3, %2 %and = and i32 %xor, %1 @@ -155,7 +154,7 @@ entry: %xor12 = xor i32 %2, %1 %and13 = and i32 %add11, %xor12 %xor14 = xor i32 %and13, %2 - %arrayidx16 = getelementptr inbounds i8, ptr %data, i64 4 + %arrayidx16 = getelementptr inbounds nuw i8, ptr %data, i64 4 %5 = load i32, ptr %arrayidx16, align 4 %add15 = add i32 %3, -389564586 %add17 = add i32 %add15, %5 @@ -165,7 +164,7 @@ entry: %xor21 = xor i32 %add11, %1 %and22 = and i32 %add20, %xor21 %xor23 = xor i32 %and22, %1 - %arrayidx25 = getelementptr inbounds i8, ptr %data, i64 8 + %arrayidx25 = getelementptr inbounds nuw i8, ptr %data, i64 8 %6 = load i32, ptr %arrayidx25, align 4 %add24 = add i32 %2, 606105819 %add26 = add i32 %add24, %6 @@ -175,7 +174,7 @@ entry: %xor30 = xor i32 %add20, %add11 %and31 = and i32 %add29, %xor30 %xor32 = xor i32 %and31, %add11 - %arrayidx34 = getelementptr inbounds i8, ptr %data, i64 12 + %arrayidx34 = getelementptr inbounds nuw i8, ptr %data, i64 12 %7 = load i32, ptr %arrayidx34, align 4 %add33 = add i32 %1, -1044525330 %add35 = add i32 %add33, %7 @@ -185,7 +184,7 @@ entry: %xor39 = xor i32 %add29, %add20 %and40 = and i32 %add38, %xor39 %xor41 = xor i32 %and40, %add20 - %arrayidx43 = getelementptr inbounds i8, ptr %data, i64 16 + %arrayidx43 = getelementptr inbounds nuw i8, ptr %data, i64 16 %8 = load i32, ptr %arrayidx43, align 4 %add42 = add i32 %8, -176418897 %add44 = add i32 %add42, %add11 @@ -195,7 +194,7 @@ entry: %xor48 = xor i32 %add38, %add29 %and49 = and i32 %add47, %xor48 %xor50 = xor i32 %and49, %add29 - %arrayidx52 = getelementptr inbounds i8, ptr %data, i64 20 + %arrayidx52 = getelementptr inbounds nuw i8, ptr %data, i64 20 %9 = load i32, ptr %arrayidx52, align 4 %add51 = add i32 %9, 1200080426 %add53 = add i32 %add51, %add20 @@ -205,7 +204,7 @@ entry: %xor57 = xor i32 %add47, %add38 %and58 = and i32 %add56, %xor57 %xor59 = xor i32 %and58, %add38 - %arrayidx61 = getelementptr inbounds i8, ptr %data, i64 24 + %arrayidx61 = getelementptr inbounds nuw i8, ptr %data, i64 24 %10 = load i32, ptr %arrayidx61, align 4 %add60 = add i32 %10, -1473231341 %add62 = add i32 %add60, %add29 @@ -215,7 +214,7 @@ entry: %xor66 = xor i32 %add56, %add47 %and67 = and i32 %add65, %xor66 %xor68 = xor i32 %and67, %add47 - %arrayidx70 = getelementptr inbounds i8, ptr %data, i64 28 + %arrayidx70 = getelementptr inbounds nuw i8, ptr %data, i64 28 %11 = load i32, ptr %arrayidx70, align 4 %add69 = add i32 %11, -45705983 %add71 = add i32 %add69, %add38 @@ -225,7 +224,7 @@ entry: %xor75 = xor i32 %add65, %add56 %and76 = and i32 %add74, %xor75 %xor77 = xor i32 %and76, %add56 - %arrayidx79 = getelementptr inbounds i8, ptr %data, i64 32 + %arrayidx79 = getelementptr inbounds nuw i8, ptr %data, i64 32 %12 = load i32, ptr %arrayidx79, align 4 %add78 = add i32 %12, 1770035416 %add80 = add i32 %add78, %add47 @@ -235,7 +234,7 @@ entry: %xor84 = xor i32 %add74, %add65 %and85 = and i32 %add83, %xor84 %xor86 = xor i32 %and85, %add65 - %arrayidx88 = getelementptr inbounds i8, ptr %data, i64 36 + %arrayidx88 = getelementptr inbounds nuw i8, ptr %data, i64 36 %13 = load i32, ptr %arrayidx88, align 4 %add87 = add i32 %13, -1958414417 %add89 = add i32 %add87, %add56 @@ -245,7 +244,7 @@ entry: %xor93 = xor i32 %add83, %add74 %and94 = and i32 %add92, %xor93 %xor95 = xor i32 %and94, %add74 - %arrayidx97 = getelementptr inbounds i8, ptr %data, i64 40 + %arrayidx97 = getelementptr inbounds nuw i8, ptr %data, i64 40 %14 = load i32, ptr %arrayidx97, align 4 %add96 = add i32 %14, -42063 %add98 = add i32 %add96, %add65 @@ -255,7 +254,7 @@ entry: %xor102 = xor i32 %add92, %add83 %and103 = and i32 %add101, %xor102 %xor104 = xor i32 %and103, %add83 - %arrayidx106 = getelementptr inbounds i8, ptr %data, i64 44 + %arrayidx106 = getelementptr inbounds nuw i8, ptr %data, i64 44 %15 = load i32, ptr %arrayidx106, align 4 %add105 = add i32 %15, -1990404162 %add107 = add i32 %add105, %add74 @@ -265,7 +264,7 @@ entry: %xor111 = xor i32 %add101, %add92 %and112 = and i32 %add110, %xor111 %xor113 = xor i32 %and112, %add92 - %arrayidx115 = getelementptr inbounds i8, ptr %data, i64 48 + %arrayidx115 = getelementptr inbounds nuw i8, ptr %data, i64 48 %16 = load i32, ptr %arrayidx115, align 4 %add114 = add i32 %16, 1804603682 %add116 = add i32 %add114, %add83 @@ -275,7 +274,7 @@ entry: %xor120 = xor i32 %add110, %add101 %and121 = and i32 %add119, %xor120 %xor122 = xor i32 %and121, %add101 - %arrayidx124 = getelementptr inbounds i8, ptr %data, i64 52 + %arrayidx124 = getelementptr inbounds nuw i8, ptr %data, i64 52 %17 = load i32, ptr %arrayidx124, align 4 %add123 = add i32 %17, -40341101 %add125 = add i32 %add123, %add92 @@ -285,7 +284,7 @@ entry: %xor129 = xor i32 %add119, %add110 %and130 = and i32 %add128, %xor129 %xor131 = xor i32 %and130, %add110 - %arrayidx133 = getelementptr inbounds i8, ptr %data, i64 56 + %arrayidx133 = getelementptr inbounds nuw i8, ptr %data, i64 56 %18 = load i32, ptr %arrayidx133, align 4 %add132 = add i32 %18, -1502002290 %add134 = add i32 %add132, %add101 @@ -295,7 +294,7 @@ entry: %xor138 = xor i32 %add128, %add119 %and139 = and i32 %add137, %xor138 %xor140 = xor i32 %and139, %add119 - %arrayidx142 = getelementptr inbounds i8, ptr %data, i64 60 + %arrayidx142 = getelementptr inbounds nuw i8, ptr %data, i64 60 %19 = load i32, ptr %arrayidx142, align 4 %add141 = add i32 %19, 1236535329 %add143 = add i32 %add141, %add110 @@ -689,7 +688,7 @@ entry: br i1 %or.cond, label %return, label %if.end if.end: ; preds = %entry - %buffer = getelementptr inbounds i8, ptr %md5, i64 12 + %buffer = getelementptr inbounds nuw i8, ptr %md5, i64 12 %0 = load i32, ptr %md5, align 8 %cmp2 = icmp ugt i32 %0, 63 br i1 %cmp2, label %return, label %if.end4 @@ -698,14 +697,14 @@ if.end4: ; preds = %if.end %inc = add nuw nsw i32 %0, 1 store i32 %inc, ptr %md5, align 8 %idxprom = zext nneg i32 %0 to i64 - %arrayidx = getelementptr inbounds i8, ptr %buffer, i64 %idxprom + %arrayidx = getelementptr inbounds nuw i8, ptr %buffer, i64 %idxprom store i8 -128, ptr %arrayidx, align 1 %cmp7 = icmp ugt i32 %0, 55 br i1 %cmp7, label %if.then8, label %if.end17 if.then8: ; preds = %if.end4 %idxprom10 = zext nneg i32 %inc to i64 - %arrayidx11 = getelementptr inbounds i8, ptr %buffer, i64 %idxprom10 + %arrayidx11 = getelementptr inbounds nuw i8, ptr %buffer, i64 %idxprom10 %sub = sub nuw nsw i32 63, %0 %conv = zext nneg i32 %sub to i64 tail call void @llvm.memset.p0.i64(ptr nonnull align 1 %arrayidx11, i8 0, i64 %conv, i1 false) @@ -717,31 +716,31 @@ if.then8: ; preds = %if.end4 if.end17: ; preds = %if.then8, %if.end4 %1 = phi i32 [ 0, %if.then8 ], [ %inc, %if.end4 ] %idxprom19 = zext nneg i32 %1 to i64 - %arrayidx20 = getelementptr inbounds i8, ptr %buffer, i64 %idxprom19 + %arrayidx20 = getelementptr inbounds nuw i8, ptr %buffer, i64 %idxprom19 %sub22 = sub nuw nsw i32 56, %1 %conv23 = zext nneg i32 %sub22 to i64 tail call void @llvm.memset.p0.i64(ptr nonnull align 1 %arrayidx20, i8 0, i64 %conv23, i1 false) - %loLen = getelementptr inbounds i8, ptr %md5, i64 4 + %loLen = getelementptr inbounds nuw i8, ptr %md5, i64 4 %2 = load i32, ptr %loLen, align 4 - %hiLen = getelementptr inbounds i8, ptr %md5, i64 8 + %hiLen = getelementptr inbounds nuw i8, ptr %md5, i64 8 %3 = load i32, ptr %hiLen, align 8 %add24 = tail call i32 @llvm.fshl.i32(i32 %3, i32 %2, i32 3) store i32 %add24, ptr %hiLen, align 8 %shl27 = shl i32 %2, 3 store i32 %shl27, ptr %loLen, align 4 - %arrayidx29 = getelementptr inbounds i8, ptr %md5, i64 68 + %arrayidx29 = getelementptr inbounds nuw i8, ptr %md5, i64 68 store i32 %shl27, ptr %arrayidx29, align 1 - %arrayidx31 = getelementptr inbounds i8, ptr %md5, i64 72 + %arrayidx31 = getelementptr inbounds nuw i8, ptr %md5, i64 72 store i32 %add24, ptr %arrayidx31, align 1 tail call fastcc void @Transform(ptr noundef %md5, ptr noundef %buffer) - %digest = getelementptr inbounds i8, ptr %md5, i64 76 + %digest = getelementptr inbounds nuw i8, ptr %md5, i64 76 tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(16) %hash, ptr noundef nonnull align 4 dereferenceable(16) %digest, i64 16, i1 false) store i32 1732584193, ptr %digest, align 4 - %arrayidx2.i = getelementptr inbounds i8, ptr %md5, i64 80 + %arrayidx2.i = getelementptr inbounds nuw i8, ptr %md5, i64 80 store i32 -271733879, ptr %arrayidx2.i, align 4 - %arrayidx4.i = getelementptr inbounds i8, ptr %md5, i64 84 + %arrayidx4.i = getelementptr inbounds nuw i8, ptr %md5, i64 84 store i32 -1732584194, ptr %arrayidx4.i, align 4 - %arrayidx6.i = getelementptr inbounds i8, ptr %md5, i64 88 + %arrayidx6.i = getelementptr inbounds nuw i8, ptr %md5, i64 88 store i32 271733878, ptr %arrayidx6.i, align 4 store i32 0, ptr %md5, align 8 store i32 0, ptr %loLen, align 4 @@ -763,20 +762,20 @@ entry: br i1 %cmp, label %return, label %wc_InitMd5_ex.exit wc_InitMd5_ex.exit: ; preds = %entry - %heap1.i = getelementptr inbounds i8, ptr %md5, i64 96 + %heap1.i = getelementptr inbounds nuw i8, ptr %md5, i64 96 store ptr null, ptr %heap1.i, align 8 - %digest.i.i = getelementptr inbounds i8, ptr %md5, i64 76 + %digest.i.i = getelementptr inbounds nuw i8, ptr %md5, i64 76 store i32 1732584193, ptr %digest.i.i, align 4 - %arrayidx2.i.i = getelementptr inbounds i8, ptr %md5, i64 80 + %arrayidx2.i.i = getelementptr inbounds nuw i8, ptr %md5, i64 80 store i32 -271733879, ptr %arrayidx2.i.i, align 4 - %arrayidx4.i.i = getelementptr inbounds i8, ptr %md5, i64 84 + %arrayidx4.i.i = getelementptr inbounds nuw i8, ptr %md5, i64 84 store i32 -1732584194, ptr %arrayidx4.i.i, align 4 - %arrayidx6.i.i = getelementptr inbounds i8, ptr %md5, i64 88 + %arrayidx6.i.i = getelementptr inbounds nuw i8, ptr %md5, i64 88 store i32 271733878, ptr %arrayidx6.i.i, align 4 store i32 0, ptr %md5, align 8 - %loLen.i.i = getelementptr inbounds i8, ptr %md5, i64 4 + %loLen.i.i = getelementptr inbounds nuw i8, ptr %md5, i64 4 store i32 0, ptr %loLen.i.i, align 4 - %hiLen.i.i = getelementptr inbounds i8, ptr %md5, i64 8 + %hiLen.i.i = getelementptr inbounds nuw i8, ptr %md5, i64 8 store i32 0, ptr %hiLen.i.i, align 8 br label %return @@ -802,7 +801,7 @@ entry: if.end.i5: ; preds = %entry call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(104) %tmpMd5, ptr noundef nonnull readonly align 8 dereferenceable(104) %md5, i64 104, i1 false) - %buffer.i = getelementptr inbounds i8, ptr %tmpMd5, i64 12 + %buffer.i = getelementptr inbounds nuw i8, ptr %tmpMd5, i64 12 %0 = load i32, ptr %tmpMd5, align 8 %cmp2.i = icmp ugt i32 %0, 63 br i1 %cmp2.i, label %return, label %if.end4.i @@ -811,14 +810,14 @@ if.end4.i: ; preds = %if.end.i5 %inc.i = add nuw nsw i32 %0, 1 store i32 %inc.i, ptr %tmpMd5, align 8 %idxprom.i = zext nneg i32 %0 to i64 - %arrayidx.i = getelementptr inbounds i8, ptr %buffer.i, i64 %idxprom.i + %arrayidx.i = getelementptr inbounds nuw i8, ptr %buffer.i, i64 %idxprom.i store i8 -128, ptr %arrayidx.i, align 1 %cmp7.i = icmp ugt i32 %0, 55 br i1 %cmp7.i, label %if.then8.i, label %if.end17.i if.then8.i: ; preds = %if.end4.i %idxprom10.i = zext nneg i32 %inc.i to i64 - %arrayidx11.i = getelementptr inbounds i8, ptr %buffer.i, i64 %idxprom10.i + %arrayidx11.i = getelementptr inbounds nuw i8, ptr %buffer.i, i64 %idxprom10.i %sub.i = sub nuw nsw i32 63, %0 %conv.i = zext nneg i32 %sub.i to i64 call void @llvm.memset.p0.i64(ptr nonnull align 1 %arrayidx11.i, i8 0, i64 %conv.i, i1 false) @@ -830,24 +829,24 @@ if.then8.i: ; preds = %if.end4.i if.end17.i: ; preds = %if.then8.i, %if.end4.i %1 = phi i32 [ 0, %if.then8.i ], [ %inc.i, %if.end4.i ] %idxprom19.i = zext nneg i32 %1 to i64 - %arrayidx20.i = getelementptr inbounds i8, ptr %buffer.i, i64 %idxprom19.i + %arrayidx20.i = getelementptr inbounds nuw i8, ptr %buffer.i, i64 %idxprom19.i %sub22.i = sub nuw nsw i32 56, %1 %conv23.i = zext nneg i32 %sub22.i to i64 call void @llvm.memset.p0.i64(ptr nonnull align 1 %arrayidx20.i, i8 0, i64 %conv23.i, i1 false) - %loLen.i = getelementptr inbounds i8, ptr %tmpMd5, i64 4 + %loLen.i = getelementptr inbounds nuw i8, ptr %tmpMd5, i64 4 %2 = load i32, ptr %loLen.i, align 4 - %hiLen.i = getelementptr inbounds i8, ptr %tmpMd5, i64 8 + %hiLen.i = getelementptr inbounds nuw i8, ptr %tmpMd5, i64 8 %3 = load i32, ptr %hiLen.i, align 8 %add24.i = tail call i32 @llvm.fshl.i32(i32 %3, i32 %2, i32 3) store i32 %add24.i, ptr %hiLen.i, align 8 %shl27.i = shl i32 %2, 3 store i32 %shl27.i, ptr %loLen.i, align 4 - %arrayidx29.i = getelementptr inbounds i8, ptr %tmpMd5, i64 68 + %arrayidx29.i = getelementptr inbounds nuw i8, ptr %tmpMd5, i64 68 store i32 %shl27.i, ptr %arrayidx29.i, align 4 - %arrayidx31.i = getelementptr inbounds i8, ptr %tmpMd5, i64 72 + %arrayidx31.i = getelementptr inbounds nuw i8, ptr %tmpMd5, i64 72 store i32 %add24.i, ptr %arrayidx31.i, align 8 call fastcc void @Transform(ptr noundef %tmpMd5, ptr noundef %buffer.i) - %digest.i = getelementptr inbounds i8, ptr %tmpMd5, i64 76 + %digest.i = getelementptr inbounds nuw i8, ptr %tmpMd5, i64 76 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(16) %hash, ptr noundef nonnull align 4 dereferenceable(16) %digest.i, i64 16, i1 false) br label %return diff --git a/bench/wolfssl/optimized/sha.c.ll b/bench/wolfssl/optimized/sha.c.ll index 33169aa904b..5b2b03b499f 100644 --- a/bench/wolfssl/optimized/sha.c.ll +++ b/bench/wolfssl/optimized/sha.c.ll @@ -12,22 +12,22 @@ entry: br i1 %cmp, label %return, label %if.end if.end: ; preds = %entry - %heap1 = getelementptr inbounds i8, ptr %sha, i64 96 + %heap1 = getelementptr inbounds nuw i8, ptr %sha, i64 96 store ptr %heap, ptr %heap1, align 8 - %digest.i = getelementptr inbounds i8, ptr %sha, i64 76 + %digest.i = getelementptr inbounds nuw i8, ptr %sha, i64 76 store i32 1732584193, ptr %digest.i, align 4 - %arrayidx2.i = getelementptr inbounds i8, ptr %sha, i64 80 + %arrayidx2.i = getelementptr inbounds nuw i8, ptr %sha, i64 80 store i32 -271733879, ptr %arrayidx2.i, align 4 - %arrayidx4.i = getelementptr inbounds i8, ptr %sha, i64 84 + %arrayidx4.i = getelementptr inbounds nuw i8, ptr %sha, i64 84 store i32 -1732584194, ptr %arrayidx4.i, align 4 - %arrayidx6.i = getelementptr inbounds i8, ptr %sha, i64 88 + %arrayidx6.i = getelementptr inbounds nuw i8, ptr %sha, i64 88 store i32 271733878, ptr %arrayidx6.i, align 4 - %arrayidx8.i = getelementptr inbounds i8, ptr %sha, i64 92 + %arrayidx8.i = getelementptr inbounds nuw i8, ptr %sha, i64 92 store i32 -1009589776, ptr %arrayidx8.i, align 4 store i32 0, ptr %sha, align 8 - %loLen.i = getelementptr inbounds i8, ptr %sha, i64 4 + %loLen.i = getelementptr inbounds nuw i8, ptr %sha, i64 4 store i32 0, ptr %loLen.i, align 4 - %hiLen.i = getelementptr inbounds i8, ptr %sha, i64 8 + %hiLen.i = getelementptr inbounds nuw i8, ptr %sha, i64 8 store i32 0, ptr %hiLen.i, align 8 br label %return @@ -59,7 +59,7 @@ if.end7: ; preds = %if.end br i1 %cmp8, label %return, label %if.end10 if.end10: ; preds = %if.end7 - %loLen.i = getelementptr inbounds i8, ptr %sha, i64 4 + %loLen.i = getelementptr inbounds nuw i8, ptr %sha, i64 4 %1 = load i32, ptr %loLen.i, align 4 %add.i = add i32 %1, %len store i32 %add.i, ptr %loLen.i, align 4 @@ -67,14 +67,14 @@ if.end10: ; preds = %if.end7 br i1 %cmp.i, label %if.then.i, label %AddLength.exit if.then.i: ; preds = %if.end10 - %hiLen.i = getelementptr inbounds i8, ptr %sha, i64 8 + %hiLen.i = getelementptr inbounds nuw i8, ptr %sha, i64 8 %2 = load i32, ptr %hiLen.i, align 8 %inc.i = add i32 %2, 1 store i32 %inc.i, ptr %hiLen.i, align 8 br label %AddLength.exit AddLength.exit: ; preds = %if.end10, %if.then.i - %buffer = getelementptr inbounds i8, ptr %sha, i64 12 + %buffer = getelementptr inbounds nuw i8, ptr %sha, i64 12 %cmp12.not = icmp eq i32 %0, 0 br i1 %cmp12.not, label %if.end33, label %if.then13 @@ -82,28 +82,27 @@ if.then13: ; preds = %AddLength.exit %sub = sub nuw nsw i32 64, %0 %cond.i = tail call noundef i32 @llvm.umin.i32(i32 %len, i32 %sub) %idxprom = zext nneg i32 %0 to i64 - %arrayidx = getelementptr inbounds i8, ptr %buffer, i64 %idxprom + %arrayidx = getelementptr inbounds nuw i8, ptr %buffer, i64 %idxprom %conv = zext nneg i32 %cond.i to i64 tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %arrayidx, ptr align 1 %data, i64 %conv, i1 false) - %3 = load i32, ptr %sha, align 8 - %add = add i32 %3, %cond.i + %add = add nuw nsw i32 %cond.i, %0 store i32 %add, ptr %sha, align 8 - %add.ptr = getelementptr inbounds i8, ptr %data, i64 %conv + %add.ptr = getelementptr inbounds nuw i8, ptr %data, i64 %conv %sub17 = sub i32 %len, %cond.i %cmp19 = icmp eq i32 %add, 64 br i1 %cmp19, label %if.then21, label %if.end33 if.then21: ; preds = %if.then13 - %4 = ptrtoint ptr %buffer to i64 - %5 = and i64 %4, 3 - %or.cond.i = icmp eq i64 %5, 0 + %3 = ptrtoint ptr %buffer to i64 + %4 = and i64 %3, 3 + %or.cond.i = icmp eq i64 %4, 0 br i1 %or.cond.i, label %for.body.i, label %for.body9.i for.body.i: ; preds = %if.then21, %for.body.i %indvars.iv24.i = phi i64 [ %indvars.iv.next25.i, %for.body.i ], [ 0, %if.then21 ] - %arrayidx.i = getelementptr inbounds i32, ptr %buffer, i64 %indvars.iv24.i - %6 = load i32, ptr %arrayidx.i, align 4 - %or.i.i = tail call noundef i32 @llvm.bswap.i32(i32 %6) + %arrayidx.i = getelementptr inbounds nuw i32, ptr %buffer, i64 %indvars.iv24.i + %5 = load i32, ptr %arrayidx.i, align 4 + %or.i.i = tail call noundef i32 @llvm.bswap.i32(i32 %5) store i32 %or.i.i, ptr %arrayidx.i, align 4 %indvars.iv.next25.i = add nuw nsw i64 %indvars.iv24.i, 1 %exitcond.not.i = icmp eq i64 %indvars.iv.next25.i, 16 @@ -111,7 +110,7 @@ for.body.i: ; preds = %if.then21, %for.bod for.body9.i: ; preds = %if.then21, %for.body9.i %indvars.iv.i = phi i64 [ %indvars.iv.next.i, %for.body9.i ], [ 0, %if.then21 ] - %add.ptr.i = getelementptr inbounds i8, ptr %buffer, i64 %indvars.iv.i + %add.ptr.i = getelementptr inbounds nuw i8, ptr %buffer, i64 %indvars.iv.i %scratch.0.copyload.i = load i32, ptr %add.ptr.i, align 1 %or.i16.i = tail call noundef i32 @llvm.bswap.i32(i32 %scratch.0.copyload.i) store i32 %or.i16.i, ptr %add.ptr.i, align 1 @@ -131,9 +130,9 @@ if.end33: ; preds = %if.then13, %ByteRev br i1 %cmp3463, label %while.body.lr.ph, label %while.end while.body.lr.ph: ; preds = %if.end33 - %7 = ptrtoint ptr %buffer to i64 - %8 = and i64 %7, 3 - %or.cond.i42 = icmp eq i64 %8, 0 + %6 = ptrtoint ptr %buffer to i64 + %7 = and i64 %6, 3 + %or.cond.i42 = icmp eq i64 %7, 0 br i1 %or.cond.i42, label %while.body.us, label %while.body while.body.us: ; preds = %while.body.lr.ph, %ByteReverseWords.exit60.loopexit.us @@ -145,9 +144,9 @@ while.body.us: ; preds = %while.body.lr.ph, % for.body.i53.us: ; preds = %while.body.us, %for.body.i53.us %indvars.iv24.i54.us = phi i64 [ %indvars.iv.next25.i58.us, %for.body.i53.us ], [ 0, %while.body.us ] - %arrayidx.i55.us = getelementptr inbounds i32, ptr %buffer, i64 %indvars.iv24.i54.us - %9 = load i32, ptr %arrayidx.i55.us, align 4 - %or.i.i56.us = tail call noundef i32 @llvm.bswap.i32(i32 %9) + %arrayidx.i55.us = getelementptr inbounds nuw i32, ptr %buffer, i64 %indvars.iv24.i54.us + %8 = load i32, ptr %arrayidx.i55.us, align 4 + %or.i.i56.us = tail call noundef i32 @llvm.bswap.i32(i32 %8) store i32 %or.i.i56.us, ptr %arrayidx.i55.us, align 4 %indvars.iv.next25.i58.us = add nuw nsw i64 %indvars.iv24.i54.us, 1 %exitcond.not.i59.us = icmp eq i64 %indvars.iv.next25.i58.us, 16 @@ -168,7 +167,7 @@ while.body: ; preds = %while.body.lr.ph, % for.body9.i44: ; preds = %while.body, %for.body9.i44 %indvars.iv.i45 = phi i64 [ %indvars.iv.next.i50, %for.body9.i44 ], [ 0, %while.body ] - %add.ptr.i46 = getelementptr inbounds i8, ptr %buffer, i64 %indvars.iv.i45 + %add.ptr.i46 = getelementptr inbounds nuw i8, ptr %buffer, i64 %indvars.iv.i45 %scratch.0.copyload.i47 = load i32, ptr %add.ptr.i46, align 1 %or.i16.i48 = tail call noundef i32 @llvm.bswap.i32(i32 %scratch.0.copyload.i47) store i32 %or.i16.i48, ptr %add.ptr.i46, align 1 @@ -205,15 +204,15 @@ declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define internal fastcc void @Transform(ptr nocapture noundef nonnull %sha, ptr nocapture noundef nonnull readonly %data) unnamed_addr #3 { entry: - %digest = getelementptr inbounds i8, ptr %sha, i64 76 + %digest = getelementptr inbounds nuw i8, ptr %sha, i64 76 %0 = load i32, ptr %digest, align 4 - %arrayidx2 = getelementptr inbounds i8, ptr %sha, i64 80 + %arrayidx2 = getelementptr inbounds nuw i8, ptr %sha, i64 80 %1 = load i32, ptr %arrayidx2, align 4 - %arrayidx4 = getelementptr inbounds i8, ptr %sha, i64 84 + %arrayidx4 = getelementptr inbounds nuw i8, ptr %sha, i64 84 %2 = load i32, ptr %arrayidx4, align 4 - %arrayidx6 = getelementptr inbounds i8, ptr %sha, i64 88 + %arrayidx6 = getelementptr inbounds nuw i8, ptr %sha, i64 88 %3 = load i32, ptr %arrayidx6, align 4 - %arrayidx8 = getelementptr inbounds i8, ptr %sha, i64 92 + %arrayidx8 = getelementptr inbounds nuw i8, ptr %sha, i64 92 %4 = load i32, ptr %arrayidx8, align 4 %xor = xor i32 %3, %2 %and = and i32 %xor, %1 @@ -228,7 +227,7 @@ entry: %xor16 = xor i32 %or.i805, %2 %and17 = and i32 %xor16, %0 %xor18 = xor i32 %and17, %2 - %arrayidx19 = getelementptr inbounds i8, ptr %data, i64 4 + %arrayidx19 = getelementptr inbounds nuw i8, ptr %data, i64 4 %6 = load i32, ptr %arrayidx19, align 4 %or.i806 = tail call noundef i32 @llvm.fshl.i32(i32 %add14, i32 %add14, i32 5) %add21 = add i32 %3, 1518500249 @@ -239,7 +238,7 @@ entry: %xor27 = xor i32 %or.i805, %or.i807 %and28 = and i32 %add14, %xor27 %xor29 = xor i32 %and28, %or.i805 - %arrayidx30 = getelementptr inbounds i8, ptr %data, i64 8 + %arrayidx30 = getelementptr inbounds nuw i8, ptr %data, i64 8 %7 = load i32, ptr %arrayidx30, align 4 %or.i808 = tail call noundef i32 @llvm.fshl.i32(i32 %add25, i32 %add25, i32 5) %add32 = add i32 %2, 1518500249 @@ -250,7 +249,7 @@ entry: %xor38 = xor i32 %or.i809, %or.i807 %and39 = and i32 %add25, %xor38 %xor40 = xor i32 %and39, %or.i807 - %arrayidx41 = getelementptr inbounds i8, ptr %data, i64 12 + %arrayidx41 = getelementptr inbounds nuw i8, ptr %data, i64 12 %8 = load i32, ptr %arrayidx41, align 4 %or.i810 = tail call noundef i32 @llvm.fshl.i32(i32 %add36, i32 %add36, i32 5) %add43 = add i32 %or.i805, 1518500249 @@ -261,7 +260,7 @@ entry: %xor49 = xor i32 %or.i811, %or.i809 %and50 = and i32 %add36, %xor49 %xor51 = xor i32 %and50, %or.i809 - %arrayidx52 = getelementptr inbounds i8, ptr %data, i64 16 + %arrayidx52 = getelementptr inbounds nuw i8, ptr %data, i64 16 %9 = load i32, ptr %arrayidx52, align 4 %or.i812 = tail call noundef i32 @llvm.fshl.i32(i32 %add47, i32 %add47, i32 5) %add54 = add i32 %or.i807, 1518500249 @@ -272,7 +271,7 @@ entry: %xor60 = xor i32 %or.i813, %or.i811 %and61 = and i32 %add47, %xor60 %xor62 = xor i32 %and61, %or.i811 - %arrayidx63 = getelementptr inbounds i8, ptr %data, i64 20 + %arrayidx63 = getelementptr inbounds nuw i8, ptr %data, i64 20 %10 = load i32, ptr %arrayidx63, align 4 %or.i814 = tail call noundef i32 @llvm.fshl.i32(i32 %add58, i32 %add58, i32 5) %add65 = add i32 %10, 1518500249 @@ -283,7 +282,7 @@ entry: %xor71 = xor i32 %or.i815, %or.i813 %and72 = and i32 %add58, %xor71 %xor73 = xor i32 %and72, %or.i813 - %arrayidx74 = getelementptr inbounds i8, ptr %data, i64 24 + %arrayidx74 = getelementptr inbounds nuw i8, ptr %data, i64 24 %11 = load i32, ptr %arrayidx74, align 4 %or.i816 = tail call noundef i32 @llvm.fshl.i32(i32 %add69, i32 %add69, i32 5) %add76 = add i32 %11, 1518500249 @@ -294,7 +293,7 @@ entry: %xor82 = xor i32 %or.i817, %or.i815 %and83 = and i32 %add69, %xor82 %xor84 = xor i32 %and83, %or.i815 - %arrayidx85 = getelementptr inbounds i8, ptr %data, i64 28 + %arrayidx85 = getelementptr inbounds nuw i8, ptr %data, i64 28 %12 = load i32, ptr %arrayidx85, align 4 %or.i818 = tail call noundef i32 @llvm.fshl.i32(i32 %add80, i32 %add80, i32 5) %add87 = add i32 %12, 1518500249 @@ -305,7 +304,7 @@ entry: %xor93 = xor i32 %or.i819, %or.i817 %and94 = and i32 %add80, %xor93 %xor95 = xor i32 %and94, %or.i817 - %arrayidx96 = getelementptr inbounds i8, ptr %data, i64 32 + %arrayidx96 = getelementptr inbounds nuw i8, ptr %data, i64 32 %13 = load i32, ptr %arrayidx96, align 4 %or.i820 = tail call noundef i32 @llvm.fshl.i32(i32 %add91, i32 %add91, i32 5) %add98 = add i32 %13, 1518500249 @@ -316,7 +315,7 @@ entry: %xor104 = xor i32 %or.i821, %or.i819 %and105 = and i32 %add91, %xor104 %xor106 = xor i32 %and105, %or.i819 - %arrayidx107 = getelementptr inbounds i8, ptr %data, i64 36 + %arrayidx107 = getelementptr inbounds nuw i8, ptr %data, i64 36 %14 = load i32, ptr %arrayidx107, align 4 %or.i822 = tail call noundef i32 @llvm.fshl.i32(i32 %add102, i32 %add102, i32 5) %add109 = add i32 %14, 1518500249 @@ -327,7 +326,7 @@ entry: %xor115 = xor i32 %or.i823, %or.i821 %and116 = and i32 %add102, %xor115 %xor117 = xor i32 %and116, %or.i821 - %arrayidx118 = getelementptr inbounds i8, ptr %data, i64 40 + %arrayidx118 = getelementptr inbounds nuw i8, ptr %data, i64 40 %15 = load i32, ptr %arrayidx118, align 4 %or.i824 = tail call noundef i32 @llvm.fshl.i32(i32 %add113, i32 %add113, i32 5) %add120 = add i32 %15, 1518500249 @@ -338,7 +337,7 @@ entry: %xor126 = xor i32 %or.i825, %or.i823 %and127 = and i32 %add113, %xor126 %xor128 = xor i32 %and127, %or.i823 - %arrayidx129 = getelementptr inbounds i8, ptr %data, i64 44 + %arrayidx129 = getelementptr inbounds nuw i8, ptr %data, i64 44 %16 = load i32, ptr %arrayidx129, align 4 %or.i826 = tail call noundef i32 @llvm.fshl.i32(i32 %add124, i32 %add124, i32 5) %add131 = add i32 %16, 1518500249 @@ -349,7 +348,7 @@ entry: %xor137 = xor i32 %or.i827, %or.i825 %and138 = and i32 %add124, %xor137 %xor139 = xor i32 %and138, %or.i825 - %arrayidx140 = getelementptr inbounds i8, ptr %data, i64 48 + %arrayidx140 = getelementptr inbounds nuw i8, ptr %data, i64 48 %17 = load i32, ptr %arrayidx140, align 4 %or.i828 = tail call noundef i32 @llvm.fshl.i32(i32 %add135, i32 %add135, i32 5) %add142 = add i32 %17, 1518500249 @@ -360,7 +359,7 @@ entry: %xor148 = xor i32 %or.i829, %or.i827 %and149 = and i32 %add135, %xor148 %xor150 = xor i32 %and149, %or.i827 - %arrayidx151 = getelementptr inbounds i8, ptr %data, i64 52 + %arrayidx151 = getelementptr inbounds nuw i8, ptr %data, i64 52 %18 = load i32, ptr %arrayidx151, align 4 %or.i830 = tail call noundef i32 @llvm.fshl.i32(i32 %add146, i32 %add146, i32 5) %add153 = add i32 %18, 1518500249 @@ -371,7 +370,7 @@ entry: %xor159 = xor i32 %or.i831, %or.i829 %and160 = and i32 %add146, %xor159 %xor161 = xor i32 %and160, %or.i829 - %arrayidx162 = getelementptr inbounds i8, ptr %data, i64 56 + %arrayidx162 = getelementptr inbounds nuw i8, ptr %data, i64 56 %19 = load i32, ptr %arrayidx162, align 4 %or.i832 = tail call noundef i32 @llvm.fshl.i32(i32 %add157, i32 %add157, i32 5) %add164 = add i32 %19, 1518500249 @@ -382,7 +381,7 @@ entry: %xor170 = xor i32 %or.i833, %or.i831 %and171 = and i32 %add157, %xor170 %xor172 = xor i32 %and171, %or.i831 - %arrayidx173 = getelementptr inbounds i8, ptr %data, i64 60 + %arrayidx173 = getelementptr inbounds nuw i8, ptr %data, i64 60 %20 = load i32, ptr %arrayidx173, align 4 %or.i834 = tail call noundef i32 @llvm.fshl.i32(i32 %add168, i32 %add168, i32 5) %add175 = add i32 %20, 1518500249 @@ -1225,7 +1224,7 @@ entry: br i1 %or.cond, label %return, label %if.end if.end: ; preds = %entry - %digest2 = getelementptr inbounds i8, ptr %sha, i64 76 + %digest2 = getelementptr inbounds nuw i8, ptr %sha, i64 76 %0 = ptrtoint ptr %digest2 to i64 %1 = and i64 %0, 3 %or.cond.i = icmp eq i64 %1, 0 @@ -1233,10 +1232,10 @@ if.end: ; preds = %entry for.body.i: ; preds = %if.end, %for.body.i %indvars.iv24.i = phi i64 [ %indvars.iv.next25.i, %for.body.i ], [ 0, %if.end ] - %arrayidx.i = getelementptr inbounds i32, ptr %digest2, i64 %indvars.iv24.i + %arrayidx.i = getelementptr inbounds nuw i32, ptr %digest2, i64 %indvars.iv24.i %2 = load i32, ptr %arrayidx.i, align 4 %or.i.i = tail call noundef i32 @llvm.bswap.i32(i32 %2) - %arrayidx5.i = getelementptr inbounds i32, ptr %digest, i64 %indvars.iv24.i + %arrayidx5.i = getelementptr inbounds nuw i32, ptr %digest, i64 %indvars.iv24.i store i32 %or.i.i, ptr %arrayidx5.i, align 4 %indvars.iv.next25.i = add nuw nsw i64 %indvars.iv24.i, 1 %exitcond.not.i = icmp eq i64 %indvars.iv.next25.i, 5 @@ -1244,10 +1243,10 @@ for.body.i: ; preds = %if.end, %for.body.i for.body9.i: ; preds = %if.end, %for.body9.i %indvars.iv.i = phi i64 [ %indvars.iv.next.i, %for.body9.i ], [ 0, %if.end ] - %add.ptr.i = getelementptr inbounds i8, ptr %digest2, i64 %indvars.iv.i + %add.ptr.i = getelementptr inbounds nuw i8, ptr %digest2, i64 %indvars.iv.i %scratch.0.copyload.i = load i32, ptr %add.ptr.i, align 1 %or.i16.i = tail call noundef i32 @llvm.bswap.i32(i32 %scratch.0.copyload.i) - %add.ptr12.i = getelementptr inbounds i8, ptr %digest, i64 %indvars.iv.i + %add.ptr12.i = getelementptr inbounds nuw i8, ptr %digest, i64 %indvars.iv.i store i32 %or.i16.i, ptr %add.ptr12.i, align 4 %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 4 %cmp8.i = icmp ult i64 %indvars.iv.i, 16 @@ -1271,7 +1270,7 @@ entry: br i1 %or.cond, label %return, label %if.end if.end: ; preds = %entry - %buffer = getelementptr inbounds i8, ptr %sha, i64 12 + %buffer = getelementptr inbounds nuw i8, ptr %sha, i64 12 %0 = load i32, ptr %sha, align 8 %cmp2 = icmp ugt i32 %0, 63 br i1 %cmp2, label %return, label %if.end4 @@ -1280,7 +1279,7 @@ if.end4: ; preds = %if.end %inc = add nuw nsw i32 %0, 1 store i32 %inc, ptr %sha, align 8 %idxprom = zext nneg i32 %0 to i64 - %arrayidx = getelementptr inbounds i8, ptr %buffer, i64 %idxprom + %arrayidx = getelementptr inbounds nuw i8, ptr %buffer, i64 %idxprom store i8 -128, ptr %arrayidx, align 1 %cmp7 = icmp ugt i32 %0, 55 br i1 %cmp7, label %if.then8, label %if.end4.if.end25_crit_edge @@ -1292,7 +1291,7 @@ if.end4.if.end25_crit_edge: ; preds = %if.end4 if.then8: ; preds = %if.end4 %idxprom10 = zext nneg i32 %inc to i64 - %arrayidx11 = getelementptr inbounds i8, ptr %buffer, i64 %idxprom10 + %arrayidx11 = getelementptr inbounds nuw i8, ptr %buffer, i64 %idxprom10 %sub = sub nuw nsw i32 63, %0 %conv = zext nneg i32 %sub to i64 tail call void @llvm.memset.p0.i64(ptr nonnull align 1 %arrayidx11, i8 0, i64 %conv, i1 false) @@ -1304,7 +1303,7 @@ if.then8: ; preds = %if.end4 for.body.i: ; preds = %if.then8, %for.body.i %indvars.iv24.i = phi i64 [ %indvars.iv.next25.i, %for.body.i ], [ 0, %if.then8 ] - %arrayidx.i = getelementptr inbounds i32, ptr %buffer, i64 %indvars.iv24.i + %arrayidx.i = getelementptr inbounds nuw i32, ptr %buffer, i64 %indvars.iv24.i %3 = load i32, ptr %arrayidx.i, align 4 %or.i.i = tail call noundef i32 @llvm.bswap.i32(i32 %3) store i32 %or.i.i, ptr %arrayidx.i, align 4 @@ -1314,7 +1313,7 @@ for.body.i: ; preds = %if.then8, %for.body for.body9.i: ; preds = %if.then8, %for.body9.i %indvars.iv.i = phi i64 [ %indvars.iv.next.i, %for.body9.i ], [ 0, %if.then8 ] - %add.ptr.i = getelementptr inbounds i8, ptr %buffer, i64 %indvars.iv.i + %add.ptr.i = getelementptr inbounds nuw i8, ptr %buffer, i64 %indvars.iv.i %scratch.0.copyload.i = load i32, ptr %add.ptr.i, align 1 %or.i16.i = tail call noundef i32 @llvm.bswap.i32(i32 %scratch.0.copyload.i) store i32 %or.i16.i, ptr %add.ptr.i, align 1 @@ -1331,7 +1330,7 @@ if.end25: ; preds = %if.end4.if.end25_cr %.pre-phi84 = phi i64 [ %.pre83, %if.end4.if.end25_crit_edge ], [ %2, %ByteReverseWords.exit ] %4 = phi i32 [ %inc, %if.end4.if.end25_crit_edge ], [ 0, %ByteReverseWords.exit ] %idxprom27 = zext nneg i32 %4 to i64 - %arrayidx28 = getelementptr inbounds i8, ptr %buffer, i64 %idxprom27 + %arrayidx28 = getelementptr inbounds nuw i8, ptr %buffer, i64 %idxprom27 %sub30 = sub nuw nsw i32 56, %4 %conv31 = zext nneg i32 %sub30 to i64 tail call void @llvm.memset.p0.i64(ptr nonnull align 1 %arrayidx28, i8 0, i64 %conv31, i1 false) @@ -1340,7 +1339,7 @@ if.end25: ; preds = %if.end4.if.end25_cr for.body.i50: ; preds = %if.end25, %for.body.i50 %indvars.iv24.i51 = phi i64 [ %indvars.iv.next25.i55, %for.body.i50 ], [ 0, %if.end25 ] - %arrayidx.i52 = getelementptr inbounds i32, ptr %buffer, i64 %indvars.iv24.i51 + %arrayidx.i52 = getelementptr inbounds nuw i32, ptr %buffer, i64 %indvars.iv24.i51 %5 = load i32, ptr %arrayidx.i52, align 4 %or.i.i53 = tail call noundef i32 @llvm.bswap.i32(i32 %5) store i32 %or.i.i53, ptr %arrayidx.i52, align 4 @@ -1350,7 +1349,7 @@ for.body.i50: ; preds = %if.end25, %for.body for.body9.i41: ; preds = %if.end25, %for.body9.i41 %indvars.iv.i42 = phi i64 [ %indvars.iv.next.i47, %for.body9.i41 ], [ 0, %if.end25 ] - %add.ptr.i43 = getelementptr inbounds i8, ptr %buffer, i64 %indvars.iv.i42 + %add.ptr.i43 = getelementptr inbounds nuw i8, ptr %buffer, i64 %indvars.iv.i42 %scratch.0.copyload.i44 = load i32, ptr %add.ptr.i43, align 1 %or.i16.i45 = tail call noundef i32 @llvm.bswap.i32(i32 %scratch.0.copyload.i44) store i32 %or.i16.i45, ptr %add.ptr.i43, align 1 @@ -1359,20 +1358,20 @@ for.body9.i41: ; preds = %if.end25, %for.body br i1 %cmp8.i48, label %for.body9.i41, label %ByteReverseWords.exit57, !llvm.loop !6 ByteReverseWords.exit57: ; preds = %for.body9.i41, %for.body.i50 - %loLen = getelementptr inbounds i8, ptr %sha, i64 4 + %loLen = getelementptr inbounds nuw i8, ptr %sha, i64 4 %6 = load i32, ptr %loLen, align 4 - %hiLen = getelementptr inbounds i8, ptr %sha, i64 8 + %hiLen = getelementptr inbounds nuw i8, ptr %sha, i64 8 %7 = load i32, ptr %hiLen, align 8 %add36 = tail call i32 @llvm.fshl.i32(i32 %7, i32 %6, i32 3) store i32 %add36, ptr %hiLen, align 8 %shl39 = shl i32 %6, 3 store i32 %shl39, ptr %loLen, align 4 - %arrayidx41 = getelementptr inbounds i8, ptr %sha, i64 68 + %arrayidx41 = getelementptr inbounds nuw i8, ptr %sha, i64 68 store i32 %add36, ptr %arrayidx41, align 1 - %arrayidx43 = getelementptr inbounds i8, ptr %sha, i64 72 + %arrayidx43 = getelementptr inbounds nuw i8, ptr %sha, i64 72 store i32 %shl39, ptr %arrayidx43, align 1 tail call fastcc void @Transform(ptr noundef %sha, ptr noundef %buffer) - %digest = getelementptr inbounds i8, ptr %sha, i64 76 + %digest = getelementptr inbounds nuw i8, ptr %sha, i64 76 %8 = ptrtoint ptr %digest to i64 %9 = and i64 %8, 3 %or.cond.i58 = icmp eq i64 %9, 0 @@ -1380,7 +1379,7 @@ ByteReverseWords.exit57: ; preds = %for.body9.i41, %for for.body.i69: ; preds = %ByteReverseWords.exit57, %for.body.i69 %indvars.iv24.i70 = phi i64 [ %indvars.iv.next25.i74, %for.body.i69 ], [ 0, %ByteReverseWords.exit57 ] - %arrayidx.i71 = getelementptr inbounds i32, ptr %digest, i64 %indvars.iv24.i70 + %arrayidx.i71 = getelementptr inbounds nuw i32, ptr %digest, i64 %indvars.iv24.i70 %10 = load i32, ptr %arrayidx.i71, align 4 %or.i.i72 = tail call noundef i32 @llvm.bswap.i32(i32 %10) store i32 %or.i.i72, ptr %arrayidx.i71, align 4 @@ -1390,7 +1389,7 @@ for.body.i69: ; preds = %ByteReverseWords.ex for.body9.i60: ; preds = %ByteReverseWords.exit57, %for.body9.i60 %indvars.iv.i61 = phi i64 [ %indvars.iv.next.i66, %for.body9.i60 ], [ 0, %ByteReverseWords.exit57 ] - %add.ptr.i62 = getelementptr inbounds i8, ptr %digest, i64 %indvars.iv.i61 + %add.ptr.i62 = getelementptr inbounds nuw i8, ptr %digest, i64 %indvars.iv.i61 %scratch.0.copyload.i63 = load i32, ptr %add.ptr.i62, align 1 %or.i16.i64 = tail call noundef i32 @llvm.bswap.i32(i32 %scratch.0.copyload.i63) store i32 %or.i16.i64, ptr %add.ptr.i62, align 1 @@ -1401,13 +1400,13 @@ for.body9.i60: ; preds = %ByteReverseWords.ex ByteReverseWords.exit76: ; preds = %for.body9.i60, %for.body.i69 tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %hash, ptr noundef nonnull align 4 dereferenceable(20) %digest, i64 20, i1 false) store i32 1732584193, ptr %digest, align 4 - %arrayidx2.i = getelementptr inbounds i8, ptr %sha, i64 80 + %arrayidx2.i = getelementptr inbounds nuw i8, ptr %sha, i64 80 store i32 -271733879, ptr %arrayidx2.i, align 4 - %arrayidx4.i = getelementptr inbounds i8, ptr %sha, i64 84 + %arrayidx4.i = getelementptr inbounds nuw i8, ptr %sha, i64 84 store i32 -1732584194, ptr %arrayidx4.i, align 4 - %arrayidx6.i = getelementptr inbounds i8, ptr %sha, i64 88 + %arrayidx6.i = getelementptr inbounds nuw i8, ptr %sha, i64 88 store i32 271733878, ptr %arrayidx6.i, align 4 - %arrayidx8.i = getelementptr inbounds i8, ptr %sha, i64 92 + %arrayidx8.i = getelementptr inbounds nuw i8, ptr %sha, i64 92 store i32 -1009589776, ptr %arrayidx8.i, align 4 store i32 0, ptr %sha, align 8 store i32 0, ptr %loLen, align 4 @@ -1429,22 +1428,22 @@ entry: br i1 %cmp.i, label %wc_InitSha_ex.exit, label %if.end.i if.end.i: ; preds = %entry - %heap1.i = getelementptr inbounds i8, ptr %sha, i64 96 + %heap1.i = getelementptr inbounds nuw i8, ptr %sha, i64 96 store ptr null, ptr %heap1.i, align 8 - %digest.i.i = getelementptr inbounds i8, ptr %sha, i64 76 + %digest.i.i = getelementptr inbounds nuw i8, ptr %sha, i64 76 store i32 1732584193, ptr %digest.i.i, align 4 - %arrayidx2.i.i = getelementptr inbounds i8, ptr %sha, i64 80 + %arrayidx2.i.i = getelementptr inbounds nuw i8, ptr %sha, i64 80 store i32 -271733879, ptr %arrayidx2.i.i, align 4 - %arrayidx4.i.i = getelementptr inbounds i8, ptr %sha, i64 84 + %arrayidx4.i.i = getelementptr inbounds nuw i8, ptr %sha, i64 84 store i32 -1732584194, ptr %arrayidx4.i.i, align 4 - %arrayidx6.i.i = getelementptr inbounds i8, ptr %sha, i64 88 + %arrayidx6.i.i = getelementptr inbounds nuw i8, ptr %sha, i64 88 store i32 271733878, ptr %arrayidx6.i.i, align 4 - %arrayidx8.i.i = getelementptr inbounds i8, ptr %sha, i64 92 + %arrayidx8.i.i = getelementptr inbounds nuw i8, ptr %sha, i64 92 store i32 -1009589776, ptr %arrayidx8.i.i, align 4 store i32 0, ptr %sha, align 8 - %loLen.i.i = getelementptr inbounds i8, ptr %sha, i64 4 + %loLen.i.i = getelementptr inbounds nuw i8, ptr %sha, i64 4 store i32 0, ptr %loLen.i.i, align 4 - %hiLen.i.i = getelementptr inbounds i8, ptr %sha, i64 8 + %hiLen.i.i = getelementptr inbounds nuw i8, ptr %sha, i64 8 store i32 0, ptr %hiLen.i.i, align 8 br label %wc_InitSha_ex.exit diff --git a/bench/yalantinglibs/optimized/duration.struct_pb.cc.ll b/bench/yalantinglibs/optimized/duration.struct_pb.cc.ll index fa5f23dd981..3938d5f1e27 100644 --- a/bench/yalantinglibs/optimized/duration.struct_pb.cc.ll +++ b/bench/yalantinglibs/optimized/duration.struct_pb.cc.ll @@ -18,7 +18,7 @@ $_ZN9struct_pb8internal19deserialize_unknownEPKcRmmjRNS_13UnknownFieldsE = comda define dso_local noundef i64 @_ZN9struct_pb8internal15get_needed_sizeIN6google8protobuf8DurationEEEmRKT_RKNS_13UnknownFieldsE(ptr nocapture noundef nonnull readonly align 8 dereferenceable(16) %t, ptr nocapture noundef nonnull readonly align 8 dereferenceable(24) %unknown_fields) local_unnamed_addr #0 { entry: %0 = load ptr, ptr %unknown_fields, align 8 - %_M_finish.i.i = getelementptr inbounds i8, ptr %unknown_fields, i64 8 + %_M_finish.i.i = getelementptr inbounds nuw i8, ptr %unknown_fields, i64 8 %1 = load ptr, ptr %_M_finish.i.i, align 8 %cmp.i5.i = icmp eq ptr %0, %1 br i1 %cmp.i5.i, label %_ZNK9struct_pb13UnknownFields10total_sizeEv.exit, label %for.body.i @@ -26,10 +26,10 @@ entry: for.body.i: ; preds = %entry, %for.body.i %total.07.i = phi i64 [ %add.i, %for.body.i ], [ 0, %entry ] %__begin2.sroa.0.06.i = phi ptr [ %incdec.ptr.i.i, %for.body.i ], [ %0, %entry ] - %len.i = getelementptr inbounds i8, ptr %__begin2.sroa.0.06.i, i64 8 + %len.i = getelementptr inbounds nuw i8, ptr %__begin2.sroa.0.06.i, i64 8 %2 = load i64, ptr %len.i, align 8 %add.i = add i64 %2, %total.07.i - %incdec.ptr.i.i = getelementptr inbounds i8, ptr %__begin2.sroa.0.06.i, i64 16 + %incdec.ptr.i.i = getelementptr inbounds nuw i8, ptr %__begin2.sroa.0.06.i, i64 16 %cmp.i.i = icmp eq ptr %incdec.ptr.i.i, %1 br i1 %cmp.i.i, label %_ZNK9struct_pb13UnknownFields10total_sizeEv.exit, label %for.body.i @@ -54,7 +54,7 @@ _ZN9struct_pb8internal21calculate_varint_sizeEm.exit17: ; preds = %do.body.i13 if.end: ; preds = %_ZN9struct_pb8internal21calculate_varint_sizeEm.exit17, %_ZNK9struct_pb13UnknownFields10total_sizeEv.exit %total.0 = phi i64 [ %add3, %_ZN9struct_pb8internal21calculate_varint_sizeEm.exit17 ], [ %total.0.lcssa.i, %_ZNK9struct_pb13UnknownFields10total_sizeEv.exit ] - %nanos = getelementptr inbounds i8, ptr %t, i64 8 + %nanos = getelementptr inbounds nuw i8, ptr %t, i64 8 %4 = load i32, ptr %nanos, align 8 %cmp4.not = icmp eq i32 %4, 0 br i1 %cmp4.not, label %if.end10, label %if.then5 @@ -100,7 +100,7 @@ while.body.i31: ; preds = %_ZN9struct_pb8inter %2 = trunc i64 %v.addr.i25.041 to i8 %conv.i33 = or i8 %2, -128 %inc.i34 = add nuw nsw i64 %pos.140, 1 - %arrayidx.i35 = getelementptr inbounds i8, ptr %data, i64 %pos.140 + %arrayidx.i35 = getelementptr inbounds nuw i8, ptr %data, i64 %pos.140 store i8 %conv.i33, ptr %arrayidx.i35, align 1 %shr.i36 = lshr i64 %v.addr.i25.041, 7 %cmp.i27 = icmp ugt i64 %v.addr.i25.041, 16383 @@ -117,7 +117,7 @@ _ZN9struct_pb8internal16serialize_varintEPcRmmm.exit37: ; preds = %while.body.i3 if.end: ; preds = %_ZN9struct_pb8internal16serialize_varintEPcRmmm.exit37, %entry %pos.0 = phi i64 [ 0, %entry ], [ %inc2.i29, %_ZN9struct_pb8internal16serialize_varintEPcRmmm.exit37 ] - %nanos = getelementptr inbounds i8, ptr %t, i64 8 + %nanos = getelementptr inbounds nuw i8, ptr %t, i64 8 %3 = load i32, ptr %nanos, align 8 %cmp2.not = icmp eq i32 %3, 0 br i1 %cmp2.not, label %if.end5, label %_ZN9struct_pb8internal16serialize_varintEPcRmmm.exit21 @@ -156,7 +156,7 @@ _ZN9struct_pb8internal16serialize_varintEPcRmmm.exit: ; preds = %while.body.i, % if.end5: ; preds = %_ZN9struct_pb8internal16serialize_varintEPcRmmm.exit, %if.end %pos.2 = phi i64 [ %pos.0, %if.end ], [ %inc2.i, %_ZN9struct_pb8internal16serialize_varintEPcRmmm.exit ] %6 = load ptr, ptr %unknown_fields, align 8 - %_M_finish.i.i = getelementptr inbounds i8, ptr %unknown_fields, i64 8 + %_M_finish.i.i = getelementptr inbounds nuw i8, ptr %unknown_fields, i64 8 %7 = load ptr, ptr %_M_finish.i.i, align 8 %cmp.i7.i = icmp eq ptr %6, %7 br i1 %cmp.i7.i, label %_ZNK9struct_pb13UnknownFields12serialize_toEPcRmm.exit, label %for.body.i @@ -166,12 +166,12 @@ for.body.i: ; preds = %if.end5, %for.body. %__begin2.sroa.0.08.i = phi ptr [ %incdec.ptr.i.i, %for.body.i ], [ %6, %if.end5 ] %add.ptr.i = getelementptr inbounds i8, ptr %data, i64 %pos.4 %8 = load ptr, ptr %__begin2.sroa.0.08.i, align 8 - %len.i = getelementptr inbounds i8, ptr %__begin2.sroa.0.08.i, i64 8 + %len.i = getelementptr inbounds nuw i8, ptr %__begin2.sroa.0.08.i, i64 8 %9 = load i64, ptr %len.i, align 8 tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %add.ptr.i, ptr align 1 %8, i64 %9, i1 false) %10 = load i64, ptr %len.i, align 8 %add.i = add i64 %10, %pos.4 - %incdec.ptr.i.i = getelementptr inbounds i8, ptr %__begin2.sroa.0.08.i, i64 16 + %incdec.ptr.i.i = getelementptr inbounds nuw i8, ptr %__begin2.sroa.0.08.i, i64 16 %cmp.i.i = icmp eq ptr %incdec.ptr.i.i, %7 br i1 %cmp.i.i, label %_ZNK9struct_pb13UnknownFields12serialize_toEPcRmm.exit, label %for.body.i @@ -187,7 +187,7 @@ entry: br i1 %cmp302.not, label %return, label %land.lhs.true.i306.lr.ph land.lhs.true.i306.lr.ph: ; preds = %entry - %nanos = getelementptr inbounds i8, ptr %t, i64 8 + %nanos = getelementptr inbounds nuw i8, ptr %t, i64 8 br label %land.lhs.true.i306 land.lhs.true.i306: ; preds = %land.lhs.true.i306.lr.ph, %sw.epilog @@ -831,19 +831,19 @@ if.end3: ; preds = %if.end3.sink.split, %14 = phi i64 [ %inc83.i, %if.end82.i ], [ %inc74.i, %if.end73.i ], [ %inc65.i, %if.end64.i ], [ %inc56.i, %if.end55.i ], [ %inc47.i, %if.end46.i ], [ %inc38.i, %if.end37.i ], [ %inc29.i, %if.end28.i ], [ %inc20.i, %if.end19.i ], [ %inc13.i, %if.end12.i ], [ %inc6.i, %if.then5.i ], [ %inc105.i, %if.end3.sink.split ] %add.ptr.i = getelementptr inbounds i8, ptr %data, i64 %sub %sub.i176 = sub i64 %14, %sub - %_M_finish.i.i.i = getelementptr inbounds i8, ptr %unknown_fields, i64 8 + %_M_finish.i.i.i = getelementptr inbounds nuw i8, ptr %unknown_fields, i64 8 %15 = load ptr, ptr %_M_finish.i.i.i, align 8 - %_M_end_of_storage.i.i.i = getelementptr inbounds i8, ptr %unknown_fields, i64 16 + %_M_end_of_storage.i.i.i = getelementptr inbounds nuw i8, ptr %unknown_fields, i64 16 %16 = load ptr, ptr %_M_end_of_storage.i.i.i, align 8 %cmp.not.i.i.i = icmp eq ptr %15, %16 br i1 %cmp.not.i.i.i, label %if.else.i.i.i, label %if.then.i.i.i if.then.i.i.i: ; preds = %if.end3 store ptr %add.ptr.i, ptr %15, align 8 - %ref.tmp.sroa.3.0..sroa_idx.i = getelementptr inbounds i8, ptr %15, i64 8 + %ref.tmp.sroa.3.0..sroa_idx.i = getelementptr inbounds nuw i8, ptr %15, i64 8 store i64 %sub.i176, ptr %ref.tmp.sroa.3.0..sroa_idx.i, align 8 %17 = load ptr, ptr %_M_finish.i.i.i, align 8 - %incdec.ptr.i.i.i = getelementptr inbounds i8, ptr %17, i64 16 + %incdec.ptr.i.i.i = getelementptr inbounds nuw i8, ptr %17, i64 16 store ptr %incdec.ptr.i.i.i, ptr %_M_finish.i.i.i, align 8 br label %return @@ -878,7 +878,7 @@ _ZNSt12_Vector_baseIN9struct_pb13UnknownFields5FieldESaIS2_EE11_M_allocateEm.exi %cond.i10.i.i.i.i = phi ptr [ %call5.i.i.i.i.i.i.i, %cond.true.i.i.i.i.i ], [ null, %_ZNKSt6vectorIN9struct_pb13UnknownFields5FieldESaIS2_EE12_M_check_lenEmPKc.exit.i.i.i.i ] %add.ptr.i.i.i.i = getelementptr inbounds %"struct.struct_pb::UnknownFields::Field", ptr %cond.i10.i.i.i.i, i64 %sub.ptr.div.i.i.i.i.i.i store ptr %add.ptr.i, ptr %add.ptr.i.i.i.i, align 8 - %ref.tmp.sroa.3.0.add.ptr.i.i.i.sroa_idx.i = getelementptr inbounds i8, ptr %add.ptr.i.i.i.i, i64 8 + %ref.tmp.sroa.3.0.add.ptr.i.i.i.sroa_idx.i = getelementptr inbounds nuw i8, ptr %add.ptr.i.i.i.i, i64 8 store i64 %sub.i176, ptr %ref.tmp.sroa.3.0.add.ptr.i.i.i.sroa_idx.i, align 8 %cmp.i.i.i.i.i.i.i = icmp sgt i64 %sub.ptr.sub.i.i.i.i.i.i, 0 br i1 %cmp.i.i.i.i.i.i.i, label %if.then.i.i.i.i.i.i.i, label %_ZNSt6vectorIN9struct_pb13UnknownFields5FieldESaIS2_EE11_S_relocateEPS2_S5_S5_RS3_.exit17.i.i.i.i @@ -889,7 +889,7 @@ if.then.i.i.i.i.i.i.i: ; preds = %_ZNSt12_Vector_base _ZNSt6vectorIN9struct_pb13UnknownFields5FieldESaIS2_EE11_S_relocateEPS2_S5_S5_RS3_.exit17.i.i.i.i: ; preds = %if.then.i.i.i.i.i.i.i, %_ZNSt12_Vector_baseIN9struct_pb13UnknownFields5FieldESaIS2_EE11_M_allocateEm.exit.i.i.i.i %add.ptr.i.i.i.i.i.i.i = getelementptr inbounds i8, ptr %cond.i10.i.i.i.i, i64 %sub.ptr.sub.i.i.i.i.i.i - %incdec.ptr.i.i.i.i = getelementptr inbounds i8, ptr %add.ptr.i.i.i.i.i.i.i, i64 16 + %incdec.ptr.i.i.i.i = getelementptr inbounds nuw i8, ptr %add.ptr.i.i.i.i.i.i.i, i64 16 %tobool.not.i.i.i.i.i = icmp eq ptr %18, null br i1 %tobool.not.i.i.i.i.i, label %_ZNSt6vectorIN9struct_pb13UnknownFields5FieldESaIS2_EE17_M_realloc_insertIJS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_.exit.i.i.i, label %if.then.i18.i.i.i.i @@ -913,19 +913,19 @@ if.end7: ; preds = %sw.bb4 store i64 %add, ptr %pos, align 8 %add.ptr.i177 = getelementptr inbounds i8, ptr %data, i64 %sub %sub.i178 = sub i64 %add, %sub - %_M_finish.i.i.i179 = getelementptr inbounds i8, ptr %unknown_fields, i64 8 + %_M_finish.i.i.i179 = getelementptr inbounds nuw i8, ptr %unknown_fields, i64 8 %20 = load ptr, ptr %_M_finish.i.i.i179, align 8 - %_M_end_of_storage.i.i.i180 = getelementptr inbounds i8, ptr %unknown_fields, i64 16 + %_M_end_of_storage.i.i.i180 = getelementptr inbounds nuw i8, ptr %unknown_fields, i64 16 %21 = load ptr, ptr %_M_end_of_storage.i.i.i180, align 8 %cmp.not.i.i.i181 = icmp eq ptr %20, %21 br i1 %cmp.not.i.i.i181, label %if.else.i.i.i185, label %if.then.i.i.i182 if.then.i.i.i182: ; preds = %if.end7 store ptr %add.ptr.i177, ptr %20, align 8 - %ref.tmp.sroa.3.0..sroa_idx.i183 = getelementptr inbounds i8, ptr %20, i64 8 + %ref.tmp.sroa.3.0..sroa_idx.i183 = getelementptr inbounds nuw i8, ptr %20, i64 8 store i64 %sub.i178, ptr %ref.tmp.sroa.3.0..sroa_idx.i183, align 8 %22 = load ptr, ptr %_M_finish.i.i.i179, align 8 - %incdec.ptr.i.i.i184 = getelementptr inbounds i8, ptr %22, i64 16 + %incdec.ptr.i.i.i184 = getelementptr inbounds nuw i8, ptr %22, i64 16 store ptr %incdec.ptr.i.i.i184, ptr %_M_finish.i.i.i179, align 8 br label %return @@ -960,7 +960,7 @@ _ZNSt12_Vector_baseIN9struct_pb13UnknownFields5FieldESaIS2_EE11_M_allocateEm.exi %cond.i10.i.i.i.i201 = phi ptr [ %call5.i.i.i.i.i.i.i199, %cond.true.i.i.i.i.i197 ], [ null, %_ZNKSt6vectorIN9struct_pb13UnknownFields5FieldESaIS2_EE12_M_check_lenEmPKc.exit.i.i.i.i190 ] %add.ptr.i.i.i.i202 = getelementptr inbounds %"struct.struct_pb::UnknownFields::Field", ptr %cond.i10.i.i.i.i201, i64 %sub.ptr.div.i.i.i.i.i.i191 store ptr %add.ptr.i177, ptr %add.ptr.i.i.i.i202, align 8 - %ref.tmp.sroa.3.0.add.ptr.i.i.i.sroa_idx.i203 = getelementptr inbounds i8, ptr %add.ptr.i.i.i.i202, i64 8 + %ref.tmp.sroa.3.0.add.ptr.i.i.i.sroa_idx.i203 = getelementptr inbounds nuw i8, ptr %add.ptr.i.i.i.i202, i64 8 store i64 %sub.i178, ptr %ref.tmp.sroa.3.0.add.ptr.i.i.i.sroa_idx.i203, align 8 %cmp.i.i.i.i.i.i.i204 = icmp sgt i64 %sub.ptr.sub.i.i.i.i.i.i188, 0 br i1 %cmp.i.i.i.i.i.i.i204, label %if.then.i.i.i.i.i.i.i212, label %_ZNSt6vectorIN9struct_pb13UnknownFields5FieldESaIS2_EE11_S_relocateEPS2_S5_S5_RS3_.exit17.i.i.i.i205 @@ -971,7 +971,7 @@ if.then.i.i.i.i.i.i.i212: ; preds = %_ZNSt12_Vector_base _ZNSt6vectorIN9struct_pb13UnknownFields5FieldESaIS2_EE11_S_relocateEPS2_S5_S5_RS3_.exit17.i.i.i.i205: ; preds = %if.then.i.i.i.i.i.i.i212, %_ZNSt12_Vector_baseIN9struct_pb13UnknownFields5FieldESaIS2_EE11_M_allocateEm.exit.i.i.i.i200 %add.ptr.i.i.i.i.i.i.i206 = getelementptr inbounds i8, ptr %cond.i10.i.i.i.i201, i64 %sub.ptr.sub.i.i.i.i.i.i188 - %incdec.ptr.i.i.i.i207 = getelementptr inbounds i8, ptr %add.ptr.i.i.i.i.i.i.i206, i64 16 + %incdec.ptr.i.i.i.i207 = getelementptr inbounds nuw i8, ptr %add.ptr.i.i.i.i.i.i.i206, i64 16 %tobool.not.i.i.i.i.i208 = icmp eq ptr %23, null br i1 %tobool.not.i.i.i.i.i208, label %_ZNSt6vectorIN9struct_pb13UnknownFields5FieldESaIS2_EE17_M_realloc_insertIJS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_.exit.i.i.i210, label %if.then.i18.i.i.i.i209 @@ -1169,19 +1169,19 @@ if.end19: ; preds = %if.end15 store i64 %add16, ptr %pos, align 8 %add.ptr.i215 = getelementptr inbounds i8, ptr %data, i64 %sub %sub.i216 = sub i64 %add16, %sub - %_M_finish.i.i.i217 = getelementptr inbounds i8, ptr %unknown_fields, i64 8 + %_M_finish.i.i.i217 = getelementptr inbounds nuw i8, ptr %unknown_fields, i64 8 %42 = load ptr, ptr %_M_finish.i.i.i217, align 8 - %_M_end_of_storage.i.i.i218 = getelementptr inbounds i8, ptr %unknown_fields, i64 16 + %_M_end_of_storage.i.i.i218 = getelementptr inbounds nuw i8, ptr %unknown_fields, i64 16 %43 = load ptr, ptr %_M_end_of_storage.i.i.i218, align 8 %cmp.not.i.i.i219 = icmp eq ptr %42, %43 br i1 %cmp.not.i.i.i219, label %if.else.i.i.i223, label %if.then.i.i.i220 if.then.i.i.i220: ; preds = %if.end19 store ptr %add.ptr.i215, ptr %42, align 8 - %ref.tmp.sroa.3.0..sroa_idx.i221 = getelementptr inbounds i8, ptr %42, i64 8 + %ref.tmp.sroa.3.0..sroa_idx.i221 = getelementptr inbounds nuw i8, ptr %42, i64 8 store i64 %sub.i216, ptr %ref.tmp.sroa.3.0..sroa_idx.i221, align 8 %44 = load ptr, ptr %_M_finish.i.i.i217, align 8 - %incdec.ptr.i.i.i222 = getelementptr inbounds i8, ptr %44, i64 16 + %incdec.ptr.i.i.i222 = getelementptr inbounds nuw i8, ptr %44, i64 16 store ptr %incdec.ptr.i.i.i222, ptr %_M_finish.i.i.i217, align 8 br label %return @@ -1216,7 +1216,7 @@ _ZNSt12_Vector_baseIN9struct_pb13UnknownFields5FieldESaIS2_EE11_M_allocateEm.exi %cond.i10.i.i.i.i239 = phi ptr [ %call5.i.i.i.i.i.i.i237, %cond.true.i.i.i.i.i235 ], [ null, %_ZNKSt6vectorIN9struct_pb13UnknownFields5FieldESaIS2_EE12_M_check_lenEmPKc.exit.i.i.i.i228 ] %add.ptr.i.i.i.i240 = getelementptr inbounds %"struct.struct_pb::UnknownFields::Field", ptr %cond.i10.i.i.i.i239, i64 %sub.ptr.div.i.i.i.i.i.i229 store ptr %add.ptr.i215, ptr %add.ptr.i.i.i.i240, align 8 - %ref.tmp.sroa.3.0.add.ptr.i.i.i.sroa_idx.i241 = getelementptr inbounds i8, ptr %add.ptr.i.i.i.i240, i64 8 + %ref.tmp.sroa.3.0.add.ptr.i.i.i.sroa_idx.i241 = getelementptr inbounds nuw i8, ptr %add.ptr.i.i.i.i240, i64 8 store i64 %sub.i216, ptr %ref.tmp.sroa.3.0.add.ptr.i.i.i.sroa_idx.i241, align 8 %cmp.i.i.i.i.i.i.i242 = icmp sgt i64 %sub.ptr.sub.i.i.i.i.i.i226, 0 br i1 %cmp.i.i.i.i.i.i.i242, label %if.then.i.i.i.i.i.i.i250, label %_ZNSt6vectorIN9struct_pb13UnknownFields5FieldESaIS2_EE11_S_relocateEPS2_S5_S5_RS3_.exit17.i.i.i.i243 @@ -1227,7 +1227,7 @@ if.then.i.i.i.i.i.i.i250: ; preds = %_ZNSt12_Vector_base _ZNSt6vectorIN9struct_pb13UnknownFields5FieldESaIS2_EE11_S_relocateEPS2_S5_S5_RS3_.exit17.i.i.i.i243: ; preds = %if.then.i.i.i.i.i.i.i250, %_ZNSt12_Vector_baseIN9struct_pb13UnknownFields5FieldESaIS2_EE11_M_allocateEm.exit.i.i.i.i238 %add.ptr.i.i.i.i.i.i.i244 = getelementptr inbounds i8, ptr %cond.i10.i.i.i.i239, i64 %sub.ptr.sub.i.i.i.i.i.i226 - %incdec.ptr.i.i.i.i245 = getelementptr inbounds i8, ptr %add.ptr.i.i.i.i.i.i.i244, i64 16 + %incdec.ptr.i.i.i.i245 = getelementptr inbounds nuw i8, ptr %add.ptr.i.i.i.i.i.i.i244, i64 16 %tobool.not.i.i.i.i.i246 = icmp eq ptr %45, null br i1 %tobool.not.i.i.i.i.i246, label %_ZNSt6vectorIN9struct_pb13UnknownFields5FieldESaIS2_EE17_M_realloc_insertIJS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_.exit.i.i.i248, label %if.then.i18.i.i.i.i247 @@ -1251,19 +1251,19 @@ if.end25: ; preds = %sw.bb21 store i64 %add22, ptr %pos, align 8 %add.ptr.i253 = getelementptr inbounds i8, ptr %data, i64 %sub %sub.i254 = sub i64 %add22, %sub - %_M_finish.i.i.i255 = getelementptr inbounds i8, ptr %unknown_fields, i64 8 + %_M_finish.i.i.i255 = getelementptr inbounds nuw i8, ptr %unknown_fields, i64 8 %47 = load ptr, ptr %_M_finish.i.i.i255, align 8 - %_M_end_of_storage.i.i.i256 = getelementptr inbounds i8, ptr %unknown_fields, i64 16 + %_M_end_of_storage.i.i.i256 = getelementptr inbounds nuw i8, ptr %unknown_fields, i64 16 %48 = load ptr, ptr %_M_end_of_storage.i.i.i256, align 8 %cmp.not.i.i.i257 = icmp eq ptr %47, %48 br i1 %cmp.not.i.i.i257, label %if.else.i.i.i261, label %if.then.i.i.i258 if.then.i.i.i258: ; preds = %if.end25 store ptr %add.ptr.i253, ptr %47, align 8 - %ref.tmp.sroa.3.0..sroa_idx.i259 = getelementptr inbounds i8, ptr %47, i64 8 + %ref.tmp.sroa.3.0..sroa_idx.i259 = getelementptr inbounds nuw i8, ptr %47, i64 8 store i64 %sub.i254, ptr %ref.tmp.sroa.3.0..sroa_idx.i259, align 8 %49 = load ptr, ptr %_M_finish.i.i.i255, align 8 - %incdec.ptr.i.i.i260 = getelementptr inbounds i8, ptr %49, i64 16 + %incdec.ptr.i.i.i260 = getelementptr inbounds nuw i8, ptr %49, i64 16 store ptr %incdec.ptr.i.i.i260, ptr %_M_finish.i.i.i255, align 8 br label %return @@ -1298,7 +1298,7 @@ _ZNSt12_Vector_baseIN9struct_pb13UnknownFields5FieldESaIS2_EE11_M_allocateEm.exi %cond.i10.i.i.i.i277 = phi ptr [ %call5.i.i.i.i.i.i.i275, %cond.true.i.i.i.i.i273 ], [ null, %_ZNKSt6vectorIN9struct_pb13UnknownFields5FieldESaIS2_EE12_M_check_lenEmPKc.exit.i.i.i.i266 ] %add.ptr.i.i.i.i278 = getelementptr inbounds %"struct.struct_pb::UnknownFields::Field", ptr %cond.i10.i.i.i.i277, i64 %sub.ptr.div.i.i.i.i.i.i267 store ptr %add.ptr.i253, ptr %add.ptr.i.i.i.i278, align 8 - %ref.tmp.sroa.3.0.add.ptr.i.i.i.sroa_idx.i279 = getelementptr inbounds i8, ptr %add.ptr.i.i.i.i278, i64 8 + %ref.tmp.sroa.3.0.add.ptr.i.i.i.sroa_idx.i279 = getelementptr inbounds nuw i8, ptr %add.ptr.i.i.i.i278, i64 8 store i64 %sub.i254, ptr %ref.tmp.sroa.3.0.add.ptr.i.i.i.sroa_idx.i279, align 8 %cmp.i.i.i.i.i.i.i280 = icmp sgt i64 %sub.ptr.sub.i.i.i.i.i.i264, 0 br i1 %cmp.i.i.i.i.i.i.i280, label %if.then.i.i.i.i.i.i.i288, label %_ZNSt6vectorIN9struct_pb13UnknownFields5FieldESaIS2_EE11_S_relocateEPS2_S5_S5_RS3_.exit17.i.i.i.i281 @@ -1309,7 +1309,7 @@ if.then.i.i.i.i.i.i.i288: ; preds = %_ZNSt12_Vector_base _ZNSt6vectorIN9struct_pb13UnknownFields5FieldESaIS2_EE11_S_relocateEPS2_S5_S5_RS3_.exit17.i.i.i.i281: ; preds = %if.then.i.i.i.i.i.i.i288, %_ZNSt12_Vector_baseIN9struct_pb13UnknownFields5FieldESaIS2_EE11_M_allocateEm.exit.i.i.i.i276 %add.ptr.i.i.i.i.i.i.i282 = getelementptr inbounds i8, ptr %cond.i10.i.i.i.i277, i64 %sub.ptr.sub.i.i.i.i.i.i264 - %incdec.ptr.i.i.i.i283 = getelementptr inbounds i8, ptr %add.ptr.i.i.i.i.i.i.i282, i64 16 + %incdec.ptr.i.i.i.i283 = getelementptr inbounds nuw i8, ptr %add.ptr.i.i.i.i.i.i.i282, i64 16 %tobool.not.i.i.i.i.i284 = icmp eq ptr %50, null br i1 %tobool.not.i.i.i.i.i284, label %_ZNSt6vectorIN9struct_pb13UnknownFields5FieldESaIS2_EE17_M_realloc_insertIJS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_.exit.i.i.i286, label %if.then.i18.i.i.i.i285 diff --git a/bench/zlib/optimized/crc32.c.ll b/bench/zlib/optimized/crc32.c.ll index 643673a6661..c2ae816998b 100644 --- a/bench/zlib/optimized/crc32.c.ll +++ b/bench/zlib/optimized/crc32.c.ll @@ -42,7 +42,7 @@ while.body: ; preds = %while.cond.preheade %crc.addr.1.tr = trunc i64 %crc.addr.1183 to i8 %xor.narrow = xor i8 %1, %crc.addr.1.tr %and5 = zext i8 %xor.narrow to i64 - %arrayidx = getelementptr inbounds [256 x i32], ptr @crc_table, i64 0, i64 %and5 + %arrayidx = getelementptr inbounds nuw [256 x i32], ptr @crc_table, i64 0, i64 %and5 %2 = load i32, ptr %arrayidx, align 4 %conv6 = zext i32 %2 to i64 %xor7 = xor i64 %shr, %conv6 @@ -104,19 +104,19 @@ while.body15: ; preds = %while.body15.prehea %11 = load i64, ptr %arrayidx29, align 8 %xor30 = xor i64 %11, %conv28 %and31 = and i64 %xor18, 255 - %arrayidx32 = getelementptr inbounds [256 x i32], ptr @crc_braid_table, i64 0, i64 %and31 + %arrayidx32 = getelementptr inbounds nuw [256 x i32], ptr @crc_braid_table, i64 0, i64 %and31 %12 = load i32, ptr %arrayidx32, align 4 %and33 = and i64 %xor21, 255 - %arrayidx34 = getelementptr inbounds [256 x i32], ptr @crc_braid_table, i64 0, i64 %and33 + %arrayidx34 = getelementptr inbounds nuw [256 x i32], ptr @crc_braid_table, i64 0, i64 %and33 %13 = load i32, ptr %arrayidx34, align 4 %and35 = and i64 %xor24, 255 - %arrayidx36 = getelementptr inbounds [256 x i32], ptr @crc_braid_table, i64 0, i64 %and35 + %arrayidx36 = getelementptr inbounds nuw [256 x i32], ptr @crc_braid_table, i64 0, i64 %and35 %14 = load i32, ptr %arrayidx36, align 4 %and37 = and i64 %xor27, 255 - %arrayidx38 = getelementptr inbounds [256 x i32], ptr @crc_braid_table, i64 0, i64 %and37 + %arrayidx38 = getelementptr inbounds nuw [256 x i32], ptr @crc_braid_table, i64 0, i64 %and37 %15 = load i32, ptr %arrayidx38, align 4 %and39 = and i64 %xor30, 255 - %arrayidx40 = getelementptr inbounds [256 x i32], ptr @crc_braid_table, i64 0, i64 %and39 + %arrayidx40 = getelementptr inbounds nuw [256 x i32], ptr @crc_braid_table, i64 0, i64 %and39 %16 = load i32, ptr %arrayidx40, align 4 br label %for.body @@ -130,27 +130,27 @@ for.body: ; preds = %while.body15, %for. %17 = shl nuw nsw i64 %indvars.iv, 3 %shr44 = lshr i64 %xor18, %17 %and45 = and i64 %shr44, 255 - %arrayidx46 = getelementptr inbounds [8 x [256 x i32]], ptr @crc_braid_table, i64 0, i64 %indvars.iv, i64 %and45 + %arrayidx46 = getelementptr inbounds nuw [8 x [256 x i32]], ptr @crc_braid_table, i64 0, i64 %indvars.iv, i64 %and45 %18 = load i32, ptr %arrayidx46, align 4 %xor47 = xor i32 %18, %crc0.1189 %shr52 = lshr i64 %xor21, %17 %and53 = and i64 %shr52, 255 - %arrayidx54 = getelementptr inbounds [8 x [256 x i32]], ptr @crc_braid_table, i64 0, i64 %indvars.iv, i64 %and53 + %arrayidx54 = getelementptr inbounds nuw [8 x [256 x i32]], ptr @crc_braid_table, i64 0, i64 %indvars.iv, i64 %and53 %19 = load i32, ptr %arrayidx54, align 4 %xor55 = xor i32 %19, %crc1.1187 %shr60 = lshr i64 %xor24, %17 %and61 = and i64 %shr60, 255 - %arrayidx62 = getelementptr inbounds [8 x [256 x i32]], ptr @crc_braid_table, i64 0, i64 %indvars.iv, i64 %and61 + %arrayidx62 = getelementptr inbounds nuw [8 x [256 x i32]], ptr @crc_braid_table, i64 0, i64 %indvars.iv, i64 %and61 %20 = load i32, ptr %arrayidx62, align 4 %xor63 = xor i32 %20, %crc2.1186 %shr68 = lshr i64 %xor27, %17 %and69 = and i64 %shr68, 255 - %arrayidx70 = getelementptr inbounds [8 x [256 x i32]], ptr @crc_braid_table, i64 0, i64 %indvars.iv, i64 %and69 + %arrayidx70 = getelementptr inbounds nuw [8 x [256 x i32]], ptr @crc_braid_table, i64 0, i64 %indvars.iv, i64 %and69 %21 = load i32, ptr %arrayidx70, align 4 %xor71 = xor i32 %21, %crc3.1188 %shr76 = lshr i64 %xor30, %17 %and77 = and i64 %shr76, 255 - %arrayidx78 = getelementptr inbounds [8 x [256 x i32]], ptr @crc_braid_table, i64 0, i64 %indvars.iv, i64 %and77 + %arrayidx78 = getelementptr inbounds nuw [8 x [256 x i32]], ptr @crc_braid_table, i64 0, i64 %indvars.iv, i64 %and77 %22 = load i32, ptr %arrayidx78, align 4 %xor79 = xor i32 %22, %crc4.1190 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 @@ -182,7 +182,7 @@ for.body.i: ; preds = %for.body.i, %while. %data.addr.04.i = phi i64 [ %xor83, %while.end80 ], [ %xor.i, %for.body.i ] %shr.i = lshr i64 %data.addr.04.i, 8 %and.i = and i64 %data.addr.04.i, 255 - %arrayidx.i = getelementptr inbounds [256 x i32], ptr @crc_table, i64 0, i64 %and.i + %arrayidx.i = getelementptr inbounds nuw [256 x i32], ptr @crc_table, i64 0, i64 %and.i %28 = load i32, ptr %arrayidx.i, align 4 %conv.i = zext i32 %28 to i64 %xor.i = xor i64 %shr.i, %conv.i @@ -203,7 +203,7 @@ for.body.i131: ; preds = %for.body.i131, %crc %data.addr.04.i133 = phi i64 [ %xor88, %crc_word.exit ], [ %xor.i138, %for.body.i131 ] %shr.i134 = lshr i64 %data.addr.04.i133, 8 %and.i135 = and i64 %data.addr.04.i133, 255 - %arrayidx.i136 = getelementptr inbounds [256 x i32], ptr @crc_table, i64 0, i64 %and.i135 + %arrayidx.i136 = getelementptr inbounds nuw [256 x i32], ptr @crc_table, i64 0, i64 %and.i135 %30 = load i32, ptr %arrayidx.i136, align 4 %conv.i137 = zext i32 %30 to i64 %xor.i138 = xor i64 %shr.i134, %conv.i137 @@ -224,7 +224,7 @@ for.body.i143: ; preds = %for.body.i143, %crc %data.addr.04.i145 = phi i64 [ %xor94, %crc_word.exit142 ], [ %xor.i150, %for.body.i143 ] %shr.i146 = lshr i64 %data.addr.04.i145, 8 %and.i147 = and i64 %data.addr.04.i145, 255 - %arrayidx.i148 = getelementptr inbounds [256 x i32], ptr @crc_table, i64 0, i64 %and.i147 + %arrayidx.i148 = getelementptr inbounds nuw [256 x i32], ptr @crc_table, i64 0, i64 %and.i147 %32 = load i32, ptr %arrayidx.i148, align 4 %conv.i149 = zext i32 %32 to i64 %xor.i150 = xor i64 %shr.i146, %conv.i149 @@ -245,7 +245,7 @@ for.body.i155: ; preds = %for.body.i155, %crc %data.addr.04.i157 = phi i64 [ %xor100, %crc_word.exit154 ], [ %xor.i162, %for.body.i155 ] %shr.i158 = lshr i64 %data.addr.04.i157, 8 %and.i159 = and i64 %data.addr.04.i157, 255 - %arrayidx.i160 = getelementptr inbounds [256 x i32], ptr @crc_table, i64 0, i64 %and.i159 + %arrayidx.i160 = getelementptr inbounds nuw [256 x i32], ptr @crc_table, i64 0, i64 %and.i159 %34 = load i32, ptr %arrayidx.i160, align 4 %conv.i161 = zext i32 %34 to i64 %xor.i162 = xor i64 %shr.i158, %conv.i161 @@ -266,7 +266,7 @@ for.body.i167: ; preds = %for.body.i167, %crc %data.addr.04.i169 = phi i64 [ %xor106, %crc_word.exit166 ], [ %xor.i174, %for.body.i167 ] %shr.i170 = lshr i64 %data.addr.04.i169, 8 %and.i171 = and i64 %data.addr.04.i169, 255 - %arrayidx.i172 = getelementptr inbounds [256 x i32], ptr @crc_table, i64 0, i64 %and.i171 + %arrayidx.i172 = getelementptr inbounds nuw [256 x i32], ptr @crc_table, i64 0, i64 %and.i171 %36 = load i32, ptr %arrayidx.i172, align 4 %conv.i173 = zext i32 %36 to i64 %xor.i174 = xor i64 %shr.i170, %conv.i173 @@ -304,7 +304,7 @@ while.body220: ; preds = %if.end216, %while.b %crc.addr.3.tr = trunc i64 %crc.addr.3210 to i8 %xor225.narrow = xor i8 %37, %crc.addr.3.tr %and226 = zext i8 %xor225.narrow to i64 - %arrayidx227 = getelementptr inbounds [256 x i32], ptr @crc_table, i64 0, i64 %and226 + %arrayidx227 = getelementptr inbounds nuw [256 x i32], ptr @crc_table, i64 0, i64 %and226 %38 = load i32, ptr %arrayidx227, align 4 %conv228 = zext i32 %38 to i64 %xor229 = xor i64 %shr222, %conv228 @@ -314,7 +314,7 @@ while.body220: ; preds = %if.end216, %while.b %xor229.tr = trunc i64 %xor229 to i8 %xor233.narrow = xor i8 %39, %xor229.tr %and234 = zext i8 %xor233.narrow to i64 - %arrayidx235 = getelementptr inbounds [256 x i32], ptr @crc_table, i64 0, i64 %and234 + %arrayidx235 = getelementptr inbounds nuw [256 x i32], ptr @crc_table, i64 0, i64 %and234 %40 = load i32, ptr %arrayidx235, align 4 %conv236 = zext i32 %40 to i64 %xor237 = xor i64 %shr230, %conv236 @@ -324,7 +324,7 @@ while.body220: ; preds = %if.end216, %while.b %xor237.tr = trunc i64 %xor237 to i8 %xor241.narrow = xor i8 %41, %xor237.tr %and242 = zext i8 %xor241.narrow to i64 - %arrayidx243 = getelementptr inbounds [256 x i32], ptr @crc_table, i64 0, i64 %and242 + %arrayidx243 = getelementptr inbounds nuw [256 x i32], ptr @crc_table, i64 0, i64 %and242 %42 = load i32, ptr %arrayidx243, align 4 %conv244 = zext i32 %42 to i64 %xor245 = xor i64 %shr238, %conv244 @@ -334,7 +334,7 @@ while.body220: ; preds = %if.end216, %while.b %xor245.tr = trunc i64 %xor245 to i8 %xor249.narrow = xor i8 %43, %xor245.tr %and250 = zext i8 %xor249.narrow to i64 - %arrayidx251 = getelementptr inbounds [256 x i32], ptr @crc_table, i64 0, i64 %and250 + %arrayidx251 = getelementptr inbounds nuw [256 x i32], ptr @crc_table, i64 0, i64 %and250 %44 = load i32, ptr %arrayidx251, align 4 %conv252 = zext i32 %44 to i64 %xor253 = xor i64 %shr246, %conv252 @@ -344,7 +344,7 @@ while.body220: ; preds = %if.end216, %while.b %xor253.tr = trunc i64 %xor253 to i8 %xor257.narrow = xor i8 %45, %xor253.tr %and258 = zext i8 %xor257.narrow to i64 - %arrayidx259 = getelementptr inbounds [256 x i32], ptr @crc_table, i64 0, i64 %and258 + %arrayidx259 = getelementptr inbounds nuw [256 x i32], ptr @crc_table, i64 0, i64 %and258 %46 = load i32, ptr %arrayidx259, align 4 %conv260 = zext i32 %46 to i64 %xor261 = xor i64 %shr254, %conv260 @@ -354,7 +354,7 @@ while.body220: ; preds = %if.end216, %while.b %xor261.tr = trunc i64 %xor261 to i8 %xor265.narrow = xor i8 %47, %xor261.tr %and266 = zext i8 %xor265.narrow to i64 - %arrayidx267 = getelementptr inbounds [256 x i32], ptr @crc_table, i64 0, i64 %and266 + %arrayidx267 = getelementptr inbounds nuw [256 x i32], ptr @crc_table, i64 0, i64 %and266 %48 = load i32, ptr %arrayidx267, align 4 %conv268 = zext i32 %48 to i64 %xor269 = xor i64 %shr262, %conv268 @@ -364,7 +364,7 @@ while.body220: ; preds = %if.end216, %while.b %xor269.tr = trunc i64 %xor269 to i8 %xor273.narrow = xor i8 %49, %xor269.tr %and274 = zext i8 %xor273.narrow to i64 - %arrayidx275 = getelementptr inbounds [256 x i32], ptr @crc_table, i64 0, i64 %and274 + %arrayidx275 = getelementptr inbounds nuw [256 x i32], ptr @crc_table, i64 0, i64 %and274 %50 = load i32, ptr %arrayidx275, align 4 %conv276 = zext i32 %50 to i64 %xor277 = xor i64 %shr270, %conv276 @@ -374,7 +374,7 @@ while.body220: ; preds = %if.end216, %while.b %xor277.tr = trunc i64 %xor277 to i8 %xor281.narrow = xor i8 %51, %xor277.tr %and282 = zext i8 %xor281.narrow to i64 - %arrayidx283 = getelementptr inbounds [256 x i32], ptr @crc_table, i64 0, i64 %and282 + %arrayidx283 = getelementptr inbounds nuw [256 x i32], ptr @crc_table, i64 0, i64 %and282 %52 = load i32, ptr %arrayidx283, align 4 %conv284 = zext i32 %52 to i64 %xor285 = xor i64 %shr278, %conv284 @@ -392,7 +392,7 @@ while.body289: ; preds = %while.cond287.prehe %crc.addr.4.tr = trunc i64 %crc.addr.4217 to i8 %xor294.narrow = xor i8 %53, %crc.addr.4.tr %and295 = zext i8 %xor294.narrow to i64 - %arrayidx296 = getelementptr inbounds [256 x i32], ptr @crc_table, i64 0, i64 %and295 + %arrayidx296 = getelementptr inbounds nuw [256 x i32], ptr @crc_table, i64 0, i64 %and295 %54 = load i32, ptr %arrayidx296, align 4 %conv297 = zext i32 %54 to i64 %xor298 = xor i64 %shr291, %conv297 @@ -434,7 +434,7 @@ while.body.i: ; preds = %entry, %if.end.i if.then.i: ; preds = %while.body.i %and2.i = and i32 %k.addr.07.i, 31 %idxprom.i = zext nneg i32 %and2.i to i64 - %arrayidx.i = getelementptr inbounds [32 x i32], ptr @x2n_table, i64 0, i64 %idxprom.i + %arrayidx.i = getelementptr inbounds nuw [32 x i32], ptr @x2n_table, i64 0, i64 %idxprom.i %0 = load i32, ptr %arrayidx.i, align 4 br label %for.cond.i.i @@ -524,7 +524,7 @@ while.body.i.i: ; preds = %entry, %if.end.i.i if.then.i.i: ; preds = %while.body.i.i %and2.i.i = and i32 %k.addr.07.i.i, 31 %idxprom.i.i = zext nneg i32 %and2.i.i to i64 - %arrayidx.i.i = getelementptr inbounds [32 x i32], ptr @x2n_table, i64 0, i64 %idxprom.i.i + %arrayidx.i.i = getelementptr inbounds nuw [32 x i32], ptr @x2n_table, i64 0, i64 %idxprom.i.i %0 = load i32, ptr %arrayidx.i.i, align 4 br label %for.cond.i.i.i @@ -614,7 +614,7 @@ while.body.i: ; preds = %entry, %if.end.i if.then.i: ; preds = %while.body.i %and2.i = and i32 %k.addr.07.i, 31 %idxprom.i = zext nneg i32 %and2.i to i64 - %arrayidx.i = getelementptr inbounds [32 x i32], ptr @x2n_table, i64 0, i64 %idxprom.i + %arrayidx.i = getelementptr inbounds nuw [32 x i32], ptr @x2n_table, i64 0, i64 %idxprom.i %0 = load i32, ptr %arrayidx.i, align 4 br label %for.cond.i.i @@ -676,7 +676,7 @@ while.body.i.i: ; preds = %entry, %if.end.i.i if.then.i.i: ; preds = %while.body.i.i %and2.i.i = and i32 %k.addr.07.i.i, 31 %idxprom.i.i = zext nneg i32 %and2.i.i to i64 - %arrayidx.i.i = getelementptr inbounds [32 x i32], ptr @x2n_table, i64 0, i64 %idxprom.i.i + %arrayidx.i.i = getelementptr inbounds nuw [32 x i32], ptr @x2n_table, i64 0, i64 %idxprom.i.i %0 = load i32, ptr %arrayidx.i.i, align 4 br label %for.cond.i.i.i