brintos

brintos / llvm-project-archived public Read only

0
0
Text · 5.0 KiB · f55dbe6 Raw
129 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals2; RUN: opt < %s -mtriple=x86_64-unknown-unknown -passes=mergeicmps -verify-dom-info -S | FileCheck %s --check-prefix=X863 4%S = type { i32, i32, i32, i32, i32}5 6define zeroext i1 @opeq1(7; X86-LABEL: @opeq1(8; X86-NEXT:  "entry+land.rhs.i+land.rhs.i.2+land.rhs.i.3":9; X86-NEXT:    [[PTR:%.*]] = alloca i32, align 410; X86-NEXT:    store i32 42, ptr [[PTR]], align 411; X86-NEXT:    [[MEMCMP:%.*]] = call i32 @memcmp(ptr [[A:%.*]], ptr [[B:%.*]], i64 16)12; X86-NEXT:    [[TMP2:%.*]] = icmp eq i32 [[MEMCMP]], 013; X86-NEXT:    br label [[OPEQ1_EXIT:%.*]]14; X86:       opeq1.exit:15; X86-NEXT:    ret i1 [[TMP2]]16;17  ptr nocapture readonly dereferenceable(16) %a,18  ptr nocapture readonly dereferenceable(16) %b) local_unnamed_addr nofree nosync !prof !2 {19 20entry:21  %ptr = alloca i3222  %0 = load i32, ptr %a, align 423  %1 = load i32, ptr %b, align 424  ; Does other work, has no interference, merge block25  store i32 42, ptr %ptr26  %cmp.i = icmp eq i32 %0, %127  br i1 %cmp.i, label %land.rhs.i, label %opeq1.exit, !prof !328 29land.rhs.i:30  %second.i = getelementptr inbounds %S, ptr %a, i64 0, i32 131  %2 = load i32, ptr %second.i, align 432  %second2.i = getelementptr inbounds %S, ptr %b, i64 0, i32 133  %3 = load i32, ptr %second2.i, align 434  %cmp2.i = icmp eq i32 %2, %335  br i1 %cmp2.i, label %land.rhs.i.2, label %opeq1.exit, !prof !436 37land.rhs.i.2:38  %third.i = getelementptr inbounds %S, ptr %a, i64 0, i32 239  %4 = load i32, ptr %third.i, align 440  %third2.i = getelementptr inbounds %S, ptr %b, i64 0, i32 241  %5 = load i32, ptr %third2.i, align 442  %cmp3.i = icmp eq i32 %4, %543  br i1 %cmp3.i, label %land.rhs.i.3, label %opeq1.exit, !prof !544 45land.rhs.i.3:46  %fourth.i = getelementptr inbounds %S, ptr %a, i64 0, i32 347  %6 = load i32, ptr %fourth.i, align 448  %fourth2.i = getelementptr inbounds %S, ptr %b, i64 0, i32 349  %7 = load i32, ptr %fourth2.i, align 450  %cmp4.i = icmp eq i32 %6, %751  br label %opeq1.exit52 53opeq1.exit:54  %8 = phi i1 [ false, %entry ], [ false, %land.rhs.i] , [ false, %land.rhs.i.2 ], [ %cmp4.i, %land.rhs.i.3 ]55  ret i1 %856}57 58define zeroext i1 @part_sequent_eq_with_metadata() !prof !2 {59; X86-LABEL: @part_sequent_eq_with_metadata(60; X86-NEXT:  bb01:61; X86-NEXT:    [[A:%.*]] = alloca [[S:%.*]], align 862; X86-NEXT:    [[B:%.*]] = alloca [[S]], align 863; X86-NEXT:    [[TMP0:%.*]] = load i32, ptr [[A]], align 4, !range [[RNG1:![0-9]+]], !noundef [[META2:![0-9]+]]64; X86-NEXT:    [[TMP1:%.*]] = load i32, ptr [[B]], align 4, !range [[RNG1]], !noundef [[META2]]65; X86-NEXT:    [[TMP2:%.*]] = icmp eq i32 [[TMP0]], [[TMP1]]66; X86-NEXT:    br i1 [[TMP2]], label %"bb1+bb2+bb3", label [[EXIT:%.*]], !prof [[PROF3:![0-9]+]]67; X86:       "bb1+bb2+bb3":68; X86-NEXT:    [[TMP3:%.*]] = getelementptr inbounds [[S]], ptr [[A]], i64 0, i32 269; X86-NEXT:    [[TMP4:%.*]] = getelementptr inbounds [[S]], ptr [[B]], i64 0, i32 270; X86-NEXT:    [[MEMCMP:%.*]] = call i32 @memcmp(ptr [[TMP3]], ptr [[TMP4]], i64 12)71; X86-NEXT:    [[TMP5:%.*]] = icmp eq i32 [[MEMCMP]], 072; X86-NEXT:    br label [[EXIT]]73; X86:       exit:74; X86-NEXT:    [[RET:%.*]] = phi i1 [ [[TMP5]], %"bb1+bb2+bb3" ], [ false, [[BB01:%.*]] ]75; X86-NEXT:    ret i1 [[RET]]76;77bb0:78  %a = alloca %S, align 879  %b = alloca %S, align 880  %value0 = load i32, ptr %a, align 4, !range !0, !noundef !181  %value1 = load i32, ptr %b, align 4, !range !0, !noundef !182  %cmp.i = icmp eq i32 %value0, %value183  br i1 %cmp.i, label %bb1, label %exit, !prof !384 85bb1:86  %second.i = getelementptr inbounds %S, ptr %a, i64 0, i32 287  %value2 = load i32, ptr %second.i, align 488  %second2.i = getelementptr inbounds %S, ptr %b, i64 0, i32 289  %value3 = load i32, ptr %second2.i, align 490  %cmp2.i = icmp eq i32 %value2, %value391  br i1 %cmp2.i, label %bb2, label %exit, !prof !492 93bb2:94  %third.i = getelementptr inbounds %S, ptr %a, i64 0, i32 395  %value4 = load i32, ptr %third.i, align 496  %third2.i = getelementptr inbounds %S, ptr %b, i64 0, i32 397  %value5 = load i32, ptr %third2.i, align 498  %cmp3.i = icmp eq i32 %value4, %value599  br i1 %cmp3.i, label %bb3, label %exit, !prof !5100 101bb3:102  %fourth.i = getelementptr inbounds %S, ptr %a, i64 0, i32 4103  %value6 = load i32, ptr %fourth.i, align 4104  %fourth2.i = getelementptr inbounds %S, ptr %b, i64 0, i32 4105  %value7 = load i32, ptr %fourth2.i, align 4106  %cmp4.i = icmp eq i32 %value6, %value7107  br label %exit108 109exit:110  %ret = phi i1 [ false, %bb0 ], [ false, %bb1] , [ false, %bb2] ,[ %cmp4.i, %bb3 ]111  ret i1 %ret112}113 114!0 = !{i32 0, i32 2}115!1 = !{}116!2 = !{!"function_entry_count", i32 100}117!3 = !{!"branch_weights", i32 2, i32 3}118!4 = !{!"branch_weights", i32 5, i32 7}119!5 = !{!"branch_weights", i32 11, i32 13}120;.121; X86: attributes #[[ATTR0:[0-9]+]] = { nofree nosync }122; X86: attributes #[[ATTR1:[0-9]+]] = { nocallback nofree nounwind willreturn memory(argmem: read) }123;.124; X86: [[META0:![0-9]+]] = !{!"function_entry_count", i32 100}125; X86: [[RNG1]] = !{i32 0, i32 2}126; X86: [[META2]] = !{}127; X86: [[PROF3]] = !{!"branch_weights", i32 2, i32 3}128;.129