brintos

brintos / llvm-project-archived public Read only

0
0
Text · 8.0 KiB · 948ed8f Raw
152 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt -passes=inline -S < %s | FileCheck %s3target datalayout = "e-i64:64-f80:128-n8:16:32:64-S128"4target triple = "x86_64-unknown-linux-gnu"5 6; This callee uses scoped alias metadata internally itself.7define void @callee_with_metadata(ptr nocapture %a, ptr nocapture %b, ptr nocapture readonly %c) #0 {8; CHECK-LABEL: @callee_with_metadata(9; CHECK-NEXT:  entry:10; CHECK-NEXT:    call void @llvm.experimental.noalias.scope.decl(metadata [[META0:![0-9]+]])11; CHECK-NEXT:    call void @llvm.experimental.noalias.scope.decl(metadata [[META3:![0-9]+]])12; CHECK-NEXT:    [[TMP0:%.*]] = load float, ptr [[C:%.*]], align 4, !noalias !513; CHECK-NEXT:    [[ARRAYIDX_I:%.*]] = getelementptr inbounds float, ptr [[A:%.*]], i64 514; CHECK-NEXT:    store float [[TMP0]], ptr [[ARRAYIDX_I]], align 4, !alias.scope !0, !noalias !315; CHECK-NEXT:    [[ARRAYIDX1_I:%.*]] = getelementptr inbounds float, ptr [[B:%.*]], i64 816; CHECK-NEXT:    store float [[TMP0]], ptr [[ARRAYIDX1_I]], align 4, !alias.scope !3, !noalias !017; CHECK-NEXT:    [[TMP1:%.*]] = load float, ptr [[C]], align 418; CHECK-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds float, ptr [[A]], i64 719; CHECK-NEXT:    store float [[TMP1]], ptr [[ARRAYIDX]], align 420; CHECK-NEXT:    ret void21;22entry:23  call void @llvm.experimental.noalias.scope.decl(metadata !7)24  call void @llvm.experimental.noalias.scope.decl(metadata !8)25  %0 = load float, ptr %c, align 4, !noalias !326  %arrayidx.i = getelementptr inbounds float, ptr %a, i64 527  store float %0, ptr %arrayidx.i, align 4, !alias.scope !7, !noalias !828  %arrayidx1.i = getelementptr inbounds float, ptr %b, i64 829  store float %0, ptr %arrayidx1.i, align 4, !alias.scope !8, !noalias !730  %1 = load float, ptr %c, align 431  %arrayidx = getelementptr inbounds float, ptr %a, i64 732  store float %1, ptr %arrayidx, align 433  ret void34}35 36declare void @llvm.experimental.noalias.scope.decl(metadata);37 38; This callee does not make use of scoped alias metadata itself.39define void @callee_without_metadata(ptr nocapture %a, ptr nocapture %b, ptr nocapture readonly %c) #0 {40; CHECK-LABEL: @callee_without_metadata(41; CHECK-NEXT:  entry:42; CHECK-NEXT:    [[TMP0:%.*]] = load float, ptr [[C:%.*]], align 443; CHECK-NEXT:    [[ARRAYIDX_I:%.*]] = getelementptr inbounds float, ptr [[A:%.*]], i64 544; CHECK-NEXT:    store float [[TMP0]], ptr [[ARRAYIDX_I]], align 445; CHECK-NEXT:    [[ARRAYIDX1_I:%.*]] = getelementptr inbounds float, ptr [[B:%.*]], i64 846; CHECK-NEXT:    store float [[TMP0]], ptr [[ARRAYIDX1_I]], align 447; CHECK-NEXT:    [[TMP1:%.*]] = load float, ptr [[C]], align 448; CHECK-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds float, ptr [[A]], i64 749; CHECK-NEXT:    store float [[TMP1]], ptr [[ARRAYIDX]], align 450; CHECK-NEXT:    ret void51;52entry:53  %0 = load float, ptr %c, align 454  %arrayidx.i = getelementptr inbounds float, ptr %a, i64 555  store float %0, ptr %arrayidx.i, align 456  %arrayidx1.i = getelementptr inbounds float, ptr %b, i64 857  store float %0, ptr %arrayidx1.i, align 458  %1 = load float, ptr %c, align 459  %arrayidx = getelementptr inbounds float, ptr %a, i64 760  store float %1, ptr %arrayidx, align 461  ret void62}63 64define void @caller(ptr nocapture %a, ptr nocapture %b, ptr nocapture readonly %c_ptr) #0 {65; CHECK-LABEL: @caller(66; CHECK-NEXT:  entry:67; CHECK-NEXT:    [[C:%.*]] = load ptr, ptr [[C_PTR:%.*]], align 8, !alias.scope !668; CHECK-NEXT:    call void @llvm.experimental.noalias.scope.decl(metadata [[META9:![0-9]+]]), !noalias !669; CHECK-NEXT:    call void @llvm.experimental.noalias.scope.decl(metadata [[META12:![0-9]+]]), !noalias !670; CHECK-NEXT:    [[TMP0:%.*]] = load float, ptr [[C]], align 4, !noalias !1471; CHECK-NEXT:    [[ARRAYIDX_I_I:%.*]] = getelementptr inbounds float, ptr [[A:%.*]], i64 572; CHECK-NEXT:    store float [[TMP0]], ptr [[ARRAYIDX_I_I]], align 4, !alias.scope !9, !noalias !1573; CHECK-NEXT:    [[ARRAYIDX1_I_I:%.*]] = getelementptr inbounds float, ptr [[B:%.*]], i64 874; CHECK-NEXT:    store float [[TMP0]], ptr [[ARRAYIDX1_I_I]], align 4, !alias.scope !12, !noalias !1675; CHECK-NEXT:    [[TMP1:%.*]] = load float, ptr [[C]], align 4, !noalias !676; CHECK-NEXT:    [[ARRAYIDX_I:%.*]] = getelementptr inbounds float, ptr [[A]], i64 777; CHECK-NEXT:    store float [[TMP1]], ptr [[ARRAYIDX_I]], align 4, !noalias !678; CHECK-NEXT:    call void @llvm.experimental.noalias.scope.decl(metadata [[META17:![0-9]+]]), !alias.scope !679; CHECK-NEXT:    call void @llvm.experimental.noalias.scope.decl(metadata [[META20:![0-9]+]]), !alias.scope !680; CHECK-NEXT:    [[TMP2:%.*]] = load float, ptr [[A]], align 4, !alias.scope !6, !noalias !2281; CHECK-NEXT:    [[ARRAYIDX_I_I1:%.*]] = getelementptr inbounds float, ptr [[B]], i64 582; CHECK-NEXT:    store float [[TMP2]], ptr [[ARRAYIDX_I_I1]], align 4, !alias.scope !23, !noalias !2083; CHECK-NEXT:    [[ARRAYIDX1_I_I2:%.*]] = getelementptr inbounds float, ptr [[B]], i64 884; CHECK-NEXT:    store float [[TMP2]], ptr [[ARRAYIDX1_I_I2]], align 4, !alias.scope !24, !noalias !1785; CHECK-NEXT:    [[TMP3:%.*]] = load float, ptr [[A]], align 4, !alias.scope !686; CHECK-NEXT:    [[ARRAYIDX_I3:%.*]] = getelementptr inbounds float, ptr [[B]], i64 787; CHECK-NEXT:    store float [[TMP3]], ptr [[ARRAYIDX_I3]], align 4, !alias.scope !688; CHECK-NEXT:    [[TMP4:%.*]] = load float, ptr [[C]], align 4, !noalias !689; CHECK-NEXT:    [[ARRAYIDX_I_I4:%.*]] = getelementptr inbounds float, ptr [[A]], i64 590; CHECK-NEXT:    store float [[TMP4]], ptr [[ARRAYIDX_I_I4]], align 4, !noalias !691; CHECK-NEXT:    [[ARRAYIDX1_I_I5:%.*]] = getelementptr inbounds float, ptr [[B]], i64 892; CHECK-NEXT:    store float [[TMP4]], ptr [[ARRAYIDX1_I_I5]], align 4, !noalias !693; CHECK-NEXT:    [[TMP5:%.*]] = load float, ptr [[C]], align 4, !noalias !694; CHECK-NEXT:    [[ARRAYIDX_I6:%.*]] = getelementptr inbounds float, ptr [[A]], i64 795; CHECK-NEXT:    store float [[TMP5]], ptr [[ARRAYIDX_I6]], align 4, !noalias !696; CHECK-NEXT:    [[TMP6:%.*]] = load float, ptr [[A]], align 4, !alias.scope !697; CHECK-NEXT:    [[ARRAYIDX_I_I7:%.*]] = getelementptr inbounds float, ptr [[B]], i64 598; CHECK-NEXT:    store float [[TMP6]], ptr [[ARRAYIDX_I_I7]], align 4, !alias.scope !699; CHECK-NEXT:    [[ARRAYIDX1_I_I8:%.*]] = getelementptr inbounds float, ptr [[B]], i64 8100; CHECK-NEXT:    store float [[TMP6]], ptr [[ARRAYIDX1_I_I8]], align 4, !alias.scope !6101; CHECK-NEXT:    [[TMP7:%.*]] = load float, ptr [[A]], align 4, !alias.scope !6102; CHECK-NEXT:    [[ARRAYIDX_I9:%.*]] = getelementptr inbounds float, ptr [[B]], i64 7103; CHECK-NEXT:    store float [[TMP7]], ptr [[ARRAYIDX_I9]], align 4, !alias.scope !6104; CHECK-NEXT:    ret void105;106entry:107  %c = load ptr, ptr %c_ptr, !alias.scope !0108  call void @callee_with_metadata(ptr %a, ptr %b, ptr %c), !noalias !0109  call void @callee_with_metadata(ptr %b, ptr %b, ptr %a), !alias.scope !0110  call void @callee_without_metadata(ptr %a, ptr %b, ptr %c), !noalias !0111  call void @callee_without_metadata(ptr %b, ptr %b, ptr %a), !alias.scope !0112  ret void113}114 115attributes #0 = { nounwind uwtable }116 117!0 = !{!1}118!1 = distinct !{!1, !2, !"hello: %a"}119!2 = distinct !{!2, !"hello"}120!3 = !{!4, !6}121!4 = distinct !{!4, !5, !"hello2: %a"}122!5 = distinct !{!5, !"hello2"}123!6 = distinct !{!6, !5, !"hello2: %b"}124!7 = !{!4}125!8 = !{!6}126 127; CHECK: !0 = !{!1}128; CHECK: !1 = distinct !{!1, !2, !"hello2: %a"}129; CHECK: !2 = distinct !{!2, !"hello2"}130; CHECK: !3 = !{!4}131; CHECK: !4 = distinct !{!4, !2, !"hello2: %b"}132; CHECK: !5 = !{!1, !4}133; CHECK: !6 = !{!7}134; CHECK: !7 = distinct !{!7, !8, !"hello: %a"}135; CHECK: !8 = distinct !{!8, !"hello"}136; CHECK: !9 = !{!10}137; CHECK: !10 = distinct !{!10, !11, !"hello2: %a"}138; CHECK: !11 = distinct !{!11, !"hello2"}139; CHECK: !12 = !{!13}140; CHECK: !13 = distinct !{!13, !11, !"hello2: %b"}141; CHECK: !14 = !{!10, !13, !7}142; CHECK: !15 = !{!13, !7}143; CHECK: !16 = !{!10, !7}144; CHECK: !17 = !{!18}145; CHECK: !18 = distinct !{!18, !19, !"hello2: %a"}146; CHECK: !19 = distinct !{!19, !"hello2"}147; CHECK: !20 = !{!21}148; CHECK: !21 = distinct !{!21, !19, !"hello2: %b"}149; CHECK: !22 = !{!18, !21}150; CHECK: !23 = !{!18, !7}151; CHECK: !24 = !{!21, !7}152