File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
llvm/test/Transforms/MemCpyOpt Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -694,3 +694,20 @@ define void @immut_valid_align_branched(i1 %c, ptr noalias align 4 %val) {
694
694
call void @f (ptr nocapture noalias readonly %val3 )
695
695
ret void
696
696
}
697
+
698
+ ; FIXME: This is a miscompile.
699
+ define void @immut_param_noalias_metadata (ptr align 4 byval (i32 ) %ptr ) {
700
+ ; CHECK-LABEL: @immut_param_noalias_metadata(
701
+ ; CHECK-NEXT: call void @f(ptr noalias nocapture readonly [[PTR:%.*]]), !alias.scope !0
702
+ ; CHECK-NEXT: ret void
703
+ ;
704
+ %tmp = alloca i32 , align 4
705
+ store i32 1 , ptr %ptr , !noalias !2
706
+ call void @llvm.memcpy.p0.p0.i64 (ptr align 4 %tmp , ptr align 4 %ptr , i64 4 , i1 false )
707
+ call void @f (ptr nocapture noalias readonly %tmp ), !alias.scope !2
708
+ ret void
709
+ }
710
+
711
+ !0 = !{!0 }
712
+ !1 = !{!1 , !0 }
713
+ !2 = !{!1 }
You can’t perform that action at this time.
0 commit comments