brintos

brintos / llvm-project-archived public Read only

0
0
Text · 942 B · c3ffe4a Raw
42 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly<no-default-opts>' -S < %s | FileCheck %s2;3; Verify that @llvm.memcpy does not get a !alias.scope annotation.4; @llvm.memcpy takes two pointers, it is ambiguous to which the5; annotation applies.6;7; for (int j = 0; j < n; j += 1) {8;   memcpy(A, B, 8);9; }10;11 12declare void @llvm.memcpy.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i32, i1)13 14define void @func(i32 %n, ptr noalias nonnull %A, ptr noalias nonnull %B) {15entry:16  br label %for17 18for:19  %j = phi i32 [0, %entry], [%j.inc, %inc]20  %j.cmp = icmp slt i32 %j, %n21  br i1 %j.cmp, label %body, label %exit22 23    body:24      call void @llvm.memcpy.p0.p0.i64(ptr nonnull %A, ptr %B, i64 8, i32 4, i1 false)25      br label %inc26 27inc:28  %j.inc = add nuw nsw i32 %j, 129  br label %for30 31exit:32  br label %return33 34return:35  ret void36}37 38 39; CHECK-LABEL: polly.start:40; CHECK:         call void @llvm.memcpy41; CHECK-NOT:     !alias.scope42