brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · cc187de Raw
42 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --force-update2; RUN: opt < %s -mtriple=x86_64-unknown-unknown -passes=mergeicmps -verify-dom-info -S 2>&1 | FileCheck %s3 4; 8-byte int and 8-byte pointer should merge into a 16-byte memcmp.5 6%struct.outer = type { i64, ptr }7%struct.inner = type { i32, i32, i32 }8 9; Function Attrs: nounwind uwtable10define i1 @test(ptr align 8 dereferenceable(16) %o1, ptr align 8 dereferenceable(116) %o2) local_unnamed_addr nofree nosync {11; CHECK-LABEL: @test(12; CHECK-NEXT:  "entry+if.then":13; CHECK-NEXT:    [[MEMCMP:%.*]] = call i32 @memcmp(ptr [[O1:%.*]], ptr [[O2:%.*]], i64 16)14; CHECK-NEXT:    [[TMP2:%.*]] = icmp eq i32 [[MEMCMP]], 015; CHECK-NEXT:    br label [[IF_END5:%.*]]16; CHECK:       if.end5:17; CHECK-NEXT:    ret i1 [[TMP2]]18;19entry:20  %0 = load i64, ptr %o1, align 821  %1 = load i64, ptr %o2, align 822  %cmp = icmp eq i64 %0, %123  br i1 %cmp, label %if.then, label %if.end524 25if.then:                                          ; preds = %entry26  %p2 = getelementptr inbounds %struct.outer, ptr %o1, i64 0, i32 127  %2 = load ptr, ptr %p2, align 828  %p22 = getelementptr inbounds %struct.outer, ptr %o2, i64 0, i32 129  %3 = load ptr, ptr %p22, align 830  %cmp3 = icmp eq ptr %2, %331  br label %if.end532 33if.end5:                                          ; preds = %if.then, %entry34  %rez.0 = phi i1 [ %cmp3, %if.then ], [ false, %entry ]35  ret i1 %rez.036}37; Function Attrs: argmemonly nounwind38declare void @llvm.lifetime.start.p0(ptr nocapture)39 40; Function Attrs: argmemonly nounwind41declare void @llvm.lifetime.end.p0(ptr nocapture)42