brintos

brintos / llvm-project-archived public Read only

0
0
Text · 17.2 KiB · e1ad376 Raw
368 lines · plain
1; RUN: opt -mtriple=x86_64-pc-linux-gnu -aa-pipeline=basic-aa -passes=inferattrs,aa-eval -print-all-alias-modref-info -disable-output 2>&1 %s | FileCheck %s2 3; CHECK-LABEL: Function: test_memcmp_const_size4; CHECK:      Just Ref:  Ptr: i8* %a	<->  %res = tail call i32 @memcmp(ptr %a, ptr %b, i64 4)5; CHECK-NEXT: Just Ref:  Ptr: i8* %b	<->  %res = tail call i32 @memcmp(ptr %a, ptr %b, i64 4)6; CHECK-NEXT: Just Ref:  Ptr: i8* %a.gep.1	<->  %res = tail call i32 @memcmp(ptr %a, ptr %b, i64 4)7; CHECK-NEXT: NoModRef:  Ptr: i8* %a.gep.5	<->  %res = tail call i32 @memcmp(ptr %a, ptr %b, i64 4)8; CHECK-NEXT: Just Ref:  Ptr: i8* %b.gep.1	<->  %res = tail call i32 @memcmp(ptr %a, ptr %b, i64 4)9; CHECK-NEXT: NoModRef:  Ptr: i8* %b.gep.5	<->  %res = tail call i32 @memcmp(ptr %a, ptr %b, i64 4)10define i32 @test_memcmp_const_size(ptr noalias %a, ptr noalias %b) {11entry:12  load i8, ptr %a13  load i8, ptr %b14  %res = tail call i32 @memcmp(ptr %a, ptr %b, i64 4)15  %a.gep.1 = getelementptr i8, ptr %a, i32 116  store i8 0, ptr %a.gep.117  %a.gep.5 = getelementptr i8, ptr %a, i32 518  store i8 1, ptr %a.gep.519  %b.gep.1 = getelementptr i8, ptr %b, i32 120  store i8 2, ptr %b.gep.121  %b.gep.5 = getelementptr i8, ptr %b, i32 522  store i8 3, ptr %b.gep.523  ret i32 %res24}25 26; CHECK-LABEL: Function: test_memcmp_variable_size27; CHECK:      Just Ref:  Ptr: i8* %a	<->  %res = tail call i32 @memcmp(ptr %a, ptr %b, i64 %n)28; CHECK-NEXT: Just Ref:  Ptr: i8* %b	<->  %res = tail call i32 @memcmp(ptr %a, ptr %b, i64 %n)29; CHECK-NEXT: Just Ref:  Ptr: i8* %a.gep.1	<->  %res = tail call i32 @memcmp(ptr %a, ptr %b, i64 %n)30; CHECK-NEXT: Just Ref:  Ptr: i8* %a.gep.5	<->  %res = tail call i32 @memcmp(ptr %a, ptr %b, i64 %n)31; CHECK-NEXT: Just Ref:  Ptr: i8* %b.gep.1	<->  %res = tail call i32 @memcmp(ptr %a, ptr %b, i64 %n)32; CHECK-NEXT: Just Ref:  Ptr: i8* %b.gep.5	<->  %res = tail call i32 @memcmp(ptr %a, ptr %b, i64 %n)33define i32 @test_memcmp_variable_size(ptr noalias %a, ptr noalias %b, i64 %n) {34entry:35  load i8, ptr %a36  load i8, ptr %b37  %res = tail call i32 @memcmp(ptr %a, ptr %b, i64 %n)38  %a.gep.1 = getelementptr i8, ptr %a, i32 139  store i8 0, ptr %a.gep.140  %a.gep.5 = getelementptr i8, ptr %a, i32 541  store i8 1, ptr %a.gep.542  %b.gep.1 = getelementptr i8, ptr %b, i32 143  store i8 2, ptr %b.gep.144  %b.gep.5 = getelementptr i8, ptr %b, i32 545  store i8 3, ptr %b.gep.546  ret i32 %res47}48 49declare i32 @memcmp(ptr, ptr, i64)50declare i32 @bcmp(ptr, ptr, i64)51 52; CHECK-LABEL: Function: test_bcmp_const_size53; CHECK:      Just Ref:  Ptr: i8* %a	<->  %res = tail call i32 @bcmp(ptr %a, ptr %b, i64 4)54; CHECK-NEXT: Just Ref:  Ptr: i8* %b	<->  %res = tail call i32 @bcmp(ptr %a, ptr %b, i64 4)55; CHECK-NEXT: Just Ref:  Ptr: i8* %a.gep.1	<->  %res = tail call i32 @bcmp(ptr %a, ptr %b, i64 4)56; CHECK-NEXT: NoModRef:  Ptr: i8* %a.gep.5	<->  %res = tail call i32 @bcmp(ptr %a, ptr %b, i64 4)57; CHECK-NEXT: Just Ref:  Ptr: i8* %b.gep.1	<->  %res = tail call i32 @bcmp(ptr %a, ptr %b, i64 4)58; CHECK-NEXT: NoModRef:  Ptr: i8* %b.gep.5	<->  %res = tail call i32 @bcmp(ptr %a, ptr %b, i64 4)59define i32 @test_bcmp_const_size(ptr noalias %a, ptr noalias %b) {60entry:61  load i8, ptr %a62  load i8, ptr %b63  %res = tail call i32 @bcmp(ptr %a, ptr %b, i64 4)64  %a.gep.1 = getelementptr i8, ptr %a, i32 165  store i8 0, ptr %a.gep.166  %a.gep.5 = getelementptr i8, ptr %a, i32 567  store i8 1, ptr %a.gep.568  %b.gep.1 = getelementptr i8, ptr %b, i32 169  store i8 2, ptr %b.gep.170  %b.gep.5 = getelementptr i8, ptr %b, i32 571  store i8 3, ptr %b.gep.572  ret i32 %res73}74 75; CHECK-LABEL: Function: test_bcmp_variable_size76; CHECK:      Just Ref:  Ptr: i8* %a	<->  %res = tail call i32 @bcmp(ptr %a, ptr %b, i64 %n)77; CHECK-NEXT: Just Ref:  Ptr: i8* %b	<->  %res = tail call i32 @bcmp(ptr %a, ptr %b, i64 %n)78; CHECK-NEXT: Just Ref:  Ptr: i8* %a.gep.1	<->  %res = tail call i32 @bcmp(ptr %a, ptr %b, i64 %n)79; CHECK-NEXT: Just Ref:  Ptr: i8* %a.gep.5	<->  %res = tail call i32 @bcmp(ptr %a, ptr %b, i64 %n)80; CHECK-NEXT: Just Ref:  Ptr: i8* %b.gep.1	<->  %res = tail call i32 @bcmp(ptr %a, ptr %b, i64 %n)81; CHECK-NEXT: Just Ref:  Ptr: i8* %b.gep.5	<->  %res = tail call i32 @bcmp(ptr %a, ptr %b, i64 %n)82define i32 @test_bcmp_variable_size(ptr noalias %a, ptr noalias %b, i64 %n) {83entry:84  load i8, ptr %a85  load i8, ptr %b86  %res = tail call i32 @bcmp(ptr %a, ptr %b, i64 %n)87  %a.gep.1 = getelementptr i8, ptr %a, i32 188  store i8 0, ptr %a.gep.189  %a.gep.5 = getelementptr i8, ptr %a, i32 590  store i8 1, ptr %a.gep.591  %b.gep.1 = getelementptr i8, ptr %b, i32 192  store i8 2, ptr %b.gep.193  %b.gep.5 = getelementptr i8, ptr %b, i32 594  store i8 3, ptr %b.gep.595  ret i32 %res96}97 98declare ptr @memchr(ptr, i32, i64)99 100; CHECK-LABEL: Function: test_memchr_const_size101; CHECK: Just Ref:  Ptr: i8* %res      <->  %res = call ptr @memchr(ptr %a, i32 42, i64 4)102; CHECK-NEXT: Just Ref:  Ptr: i8* %a.gep.1  <->  %res = call ptr @memchr(ptr %a, i32 42, i64 4)103; CHECK-NEXT: NoModRef:  Ptr: i8* %a.gep.5  <->  %res = call ptr @memchr(ptr %a, i32 42, i64 4)104define ptr @test_memchr_const_size(ptr noalias %a) {105entry:106  %res = call ptr @memchr(ptr %a, i32 42, i64 4)107  load i8, ptr %res108  %a.gep.1 = getelementptr i8, ptr %a, i32 1109  store i8 0, ptr %a.gep.1110  %a.gep.5 = getelementptr i8, ptr %a, i32 5111  store i8 1, ptr %a.gep.5112  ret ptr %res113}114 115declare ptr @memccpy(ptr, ptr, i32, i64)116 117; CHECK-LABEL: Function: test_memccpy_const_size118; CHECK:      Just Mod:  Ptr: i8* %a        <->  %res = call ptr @memccpy(ptr %a, ptr %b, i32 42, i64 4)119; CHECK-NEXT: Just Ref:  Ptr: i8* %b        <->  %res = call ptr @memccpy(ptr %a, ptr %b, i32 42, i64 4)120; CHECK-NEXT: Just Mod:  Ptr: i8* %res      <->  %res = call ptr @memccpy(ptr %a, ptr %b, i32 42, i64 4)121; CHECK-NEXT: Just Mod:  Ptr: i8* %a.gep.1  <->  %res = call ptr @memccpy(ptr %a, ptr %b, i32 42, i64 4)122; CHECK-NEXT: NoModRef:  Ptr: i8* %a.gep.5  <->  %res = call ptr @memccpy(ptr %a, ptr %b, i32 42, i64 4)123; CHECK-NEXT: Just Ref:  Ptr: i8* %b.gep.1  <->  %res = call ptr @memccpy(ptr %a, ptr %b, i32 42, i64 4)124; CHECK-NEXT: NoModRef:  Ptr: i8* %b.gep.5  <->  %res = call ptr @memccpy(ptr %a, ptr %b, i32 42, i64 4)125 126define ptr @test_memccpy_const_size(ptr noalias %a, ptr noalias %b) {127entry:128  load i8, ptr %a129  load i8, ptr %b130  %res = call ptr @memccpy(ptr %a, ptr %b, i32 42, i64 4)131  load i8, ptr %res132  %a.gep.1 = getelementptr i8, ptr %a, i32 1133  store i8 0, ptr %a.gep.1134  %a.gep.5 = getelementptr i8, ptr %a, i32 5135  store i8 1, ptr %a.gep.5136  %b.gep.1 = getelementptr i8, ptr %b, i32 1137  store i8 2, ptr %b.gep.1138  %b.gep.5 = getelementptr i8, ptr %b, i32 5139  store i8 3, ptr %b.gep.5140  ret ptr %res141}142 143declare ptr @strcat(ptr, ptr)144 145define ptr @test_strcat_read_write_after(ptr noalias %a, ptr noalias %b) {146; CHECK-LABEL: Function: test_strcat_read_write_after147; CHECK:       NoModRef:  Ptr: i8* %a	<->  %res = tail call ptr @strcat(ptr %a.gep.1, ptr %b.gep.1)148; CHECK-NEXT:  NoModRef:  Ptr: i8* %b	<->  %res = tail call ptr @strcat(ptr %a.gep.1, ptr %b.gep.1)149; CHECK-NEXT:  Both ModRef:  Ptr: i8* %a.gep.1	<->  %res = tail call ptr @strcat(ptr %a.gep.1, ptr %b.gep.1)150; CHECK-NEXT:  Just Ref:  Ptr: i8* %b.gep.1	<->  %res = tail call ptr @strcat(ptr %a.gep.1, ptr %b.gep.1)151; CHECK-NEXT:  Both ModRef:  Ptr: i8* %res	<->  %res = tail call ptr @strcat(ptr %a.gep.1, ptr %b.gep.1)152; CHECK-NEXT:  Both ModRef:  Ptr: i8* %a.gep.5	<->  %res = tail call ptr @strcat(ptr %a.gep.1, ptr %b.gep.1)153; CHECK-NEXT:  Just Ref:  Ptr: i8* %b.gep.5	<->  %res = tail call ptr @strcat(ptr %a.gep.1, ptr %b.gep.1)154;155entry:156  store i8 0, ptr %a157  store i8 2, ptr %b158  %a.gep.1 = getelementptr i8, ptr %a, i32 1159  load i8, ptr %a.gep.1160  %b.gep.1 = getelementptr i8, ptr %b, i32 1161  load i8, ptr %b.gep.1162  %res = tail call ptr @strcat(ptr %a.gep.1, ptr %b.gep.1)163  load i8, ptr %res164  %a.gep.5 = getelementptr i8, ptr %a, i32 5165  store i8 1, ptr %a.gep.5166  %b.gep.5 = getelementptr i8, ptr %b, i32 5167  store i8 3, ptr %b.gep.5168  ret ptr %res169}170 171declare ptr @strncat(ptr, ptr, i64)172 173define ptr @test_strncat_read_write_after(ptr noalias %a, ptr noalias %b, i64 %n) {174; CHECK-LABEL: Function: test_strncat_read_write_after175; CHECK:       NoModRef:  Ptr: i8* %a	<->  %res = tail call ptr @strncat(ptr %a.gep.1, ptr %b.gep.1, i64 %n)176; CHECK-NEXT:  NoModRef:  Ptr: i8* %b	<->  %res = tail call ptr @strncat(ptr %a.gep.1, ptr %b.gep.1, i64 %n)177; CHECK-NEXT:  Both ModRef:  Ptr: i8* %a.gep.1	<->  %res = tail call ptr @strncat(ptr %a.gep.1, ptr %b.gep.1, i64 %n)178; CHECK-NEXT:  Just Ref:  Ptr: i8* %b.gep.1	<->  %res = tail call ptr @strncat(ptr %a.gep.1, ptr %b.gep.1, i64 %n)179; CHECK-NEXT:  Both ModRef:  Ptr: i8* %res	<->  %res = tail call ptr @strncat(ptr %a.gep.1, ptr %b.gep.1, i64 %n)180; CHECK-NEXT:  Both ModRef:  Ptr: i8* %a.gep.5	<->  %res = tail call ptr @strncat(ptr %a.gep.1, ptr %b.gep.1, i64 %n)181; CHECK-NEXT:  Just Ref:  Ptr: i8* %b.gep.5	<->  %res = tail call ptr @strncat(ptr %a.gep.1, ptr %b.gep.1, i64 %n)182;183entry:184  store i8 0, ptr %a185  store i8 2, ptr %b186  %a.gep.1 = getelementptr i8, ptr %a, i32 1187  load i8, ptr %a.gep.1188  %b.gep.1 = getelementptr i8, ptr %b, i32 1189  load i8, ptr %b.gep.1190  %res = tail call ptr @strncat(ptr %a.gep.1, ptr %b.gep.1, i64 %n)191  load i8, ptr %res192  %a.gep.5 = getelementptr i8, ptr %a, i32 5193  store i8 1, ptr %a.gep.5194  %b.gep.5 = getelementptr i8, ptr %b, i32 5195  store i8 3, ptr %b.gep.5196  ret ptr %res197}198 199declare ptr @strcpy(ptr, ptr)200 201define ptr @test_strcpy_read_write_after(ptr noalias %a, ptr noalias %b) {202; CHECK-LABEL: Function: test_strcpy_read_write_after203; CHECK:       NoModRef:  Ptr: i8* %a	<->  %res = tail call ptr @strcpy(ptr %a.gep.1, ptr %b.gep.1)204; CHECK-NEXT:  NoModRef:  Ptr: i8* %b	<->  %res = tail call ptr @strcpy(ptr %a.gep.1, ptr %b.gep.1)205; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.1	<->  %res = tail call ptr @strcpy(ptr %a.gep.1, ptr %b.gep.1)206; CHECK-NEXT:  Just Ref:  Ptr: i8* %b.gep.1	<->  %res = tail call ptr @strcpy(ptr %a.gep.1, ptr %b.gep.1)207; CHECK-NEXT:  Just Mod:  Ptr: i8* %res	<->  %res = tail call ptr @strcpy(ptr %a.gep.1, ptr %b.gep.1)208; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.5	<->  %res = tail call ptr @strcpy(ptr %a.gep.1, ptr %b.gep.1)209; CHECK-NEXT:  Just Ref:  Ptr: i8* %b.gep.5	<->  %res = tail call ptr @strcpy(ptr %a.gep.1, ptr %b.gep.1)210;211entry:212  store i8 0, ptr %a213  store i8 2, ptr %b214  %a.gep.1 = getelementptr i8, ptr %a, i32 1215  load i8, ptr %a.gep.1216  %b.gep.1 = getelementptr i8, ptr %b, i32 1217  load i8, ptr %b.gep.1218  %res = tail call ptr @strcpy(ptr %a.gep.1, ptr %b.gep.1)219  load i8, ptr %res220  %a.gep.5 = getelementptr i8, ptr %a, i32 5221  store i8 1, ptr %a.gep.5222  %b.gep.5 = getelementptr i8, ptr %b, i32 5223  store i8 3, ptr %b.gep.5224  ret ptr %res225}226 227declare ptr @strncpy(ptr, ptr, i64)228 229define ptr @test_strncpy_const_size(ptr noalias %a, ptr noalias %b) {230; CHECK-LABEL: Function: test_strncpy_const_size231; CHECK:       Just Mod:  Ptr: i8* %a	<->  %res = tail call ptr @strncpy(ptr %a, ptr %b, i64 4)232; CHECK-NEXT:  Just Ref:  Ptr: i8* %b	<->  %res = tail call ptr @strncpy(ptr %a, ptr %b, i64 4)233; CHECK-NEXT:  Just Mod:  Ptr: i8* %res	<->  %res = tail call ptr @strncpy(ptr %a, ptr %b, i64 4)234; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.1	<->  %res = tail call ptr @strncpy(ptr %a, ptr %b, i64 4)235; CHECK-NEXT:  NoModRef:  Ptr: i8* %a.gep.5	<->  %res = tail call ptr @strncpy(ptr %a, ptr %b, i64 4)236; CHECK-NEXT:  Just Ref:  Ptr: i8* %b.gep.1	<->  %res = tail call ptr @strncpy(ptr %a, ptr %b, i64 4)237; CHECK-NEXT:  NoModRef:  Ptr: i8* %b.gep.5	<->  %res = tail call ptr @strncpy(ptr %a, ptr %b, i64 4)238;239entry:240  load i8, ptr %a241  load i8, ptr %b242  %res = tail call ptr @strncpy(ptr %a, ptr %b, i64 4)243  load i8, ptr %res244  %a.gep.1 = getelementptr i8, ptr %a, i32 1245  store i8 0, ptr %a.gep.1246  %a.gep.5 = getelementptr i8, ptr %a, i32 5247  store i8 1, ptr %a.gep.5248  %b.gep.1 = getelementptr i8, ptr %b, i32 1249  store i8 2, ptr %b.gep.1250  %b.gep.5 = getelementptr i8, ptr %b, i32 5251  store i8 3, ptr %b.gep.5252  ret ptr %res253}254 255define ptr @test_strncpy_variable_size(ptr noalias %a, ptr noalias %b, i64 %n) {256; CHECK-LABEL: Function: test_strncpy_variable_size257; CHECK:       Just Mod:  Ptr: i8* %a	<->  %res = tail call ptr @strncpy(ptr %a, ptr %b, i64 %n)258; CHECK-NEXT:  Just Ref:  Ptr: i8* %b	<->  %res = tail call ptr @strncpy(ptr %a, ptr %b, i64 %n)259; CHECK-NEXT:  Just Mod:  Ptr: i8* %res	<->  %res = tail call ptr @strncpy(ptr %a, ptr %b, i64 %n)260; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.1	<->  %res = tail call ptr @strncpy(ptr %a, ptr %b, i64 %n)261; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.5	<->  %res = tail call ptr @strncpy(ptr %a, ptr %b, i64 %n)262; CHECK-NEXT:  Just Ref:  Ptr: i8* %b.gep.1	<->  %res = tail call ptr @strncpy(ptr %a, ptr %b, i64 %n)263; CHECK-NEXT:  Just Ref:  Ptr: i8* %b.gep.5	<->  %res = tail call ptr @strncpy(ptr %a, ptr %b, i64 %n)264;265entry:266  load i8, ptr %a267  load i8, ptr %b268  %res = tail call ptr @strncpy(ptr %a, ptr %b, i64 %n)269  load i8, ptr %res270  %a.gep.1 = getelementptr i8, ptr %a, i32 1271  store i8 0, ptr %a.gep.1272  %a.gep.5 = getelementptr i8, ptr %a, i32 5273  store i8 1, ptr %a.gep.5274  %b.gep.1 = getelementptr i8, ptr %b, i32 1275  store i8 2, ptr %b.gep.1276  %b.gep.5 = getelementptr i8, ptr %b, i32 5277  store i8 3, ptr %b.gep.5278  ret ptr %res279}280 281declare ptr @__memset_chk(ptr writeonly, i32, i64, i64)282 283; CHECK-LABEL: Function: test_memset_chk_const_size284define ptr @test_memset_chk_const_size(ptr noalias %a, i64 %n) {285; CHECK:       Just Mod:  Ptr: i8* %a	<->  %res = tail call ptr @__memset_chk(ptr %a, i32 0, i64 4, i64 %n)286; CHECK-NEXT:  Just Mod:  Ptr: i8* %res	<->  %res = tail call ptr @__memset_chk(ptr %a, i32 0, i64 4, i64 %n)287; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.1	<->  %res = tail call ptr @__memset_chk(ptr %a, i32 0, i64 4, i64 %n)288; CHECK-NEXT:  NoModRef:  Ptr: i8* %a.gep.5	<->  %res = tail call ptr @__memset_chk(ptr %a, i32 0, i64 4, i64 %n)289;290entry:291  load i8, ptr %a292  %res = tail call ptr @__memset_chk(ptr %a, i32 0, i64 4, i64 %n)293  load i8, ptr %res294  %a.gep.1 = getelementptr i8, ptr %a, i32 1295  store i8 0, ptr %a.gep.1296  %a.gep.5 = getelementptr i8, ptr %a, i32 5297  store i8 1, ptr %a.gep.5298  ret ptr %res299}300 301define ptr @test_memset_chk_variable_size(ptr noalias %a, i64 %n.1, i64 %n.2) {302; CHECK-LABEL: Function: test_memset_chk_variable_size303; CHECK:       Just Mod:  Ptr: i8* %a	<->  %res = tail call ptr @__memset_chk(ptr %a, i32 0, i64 %n.1, i64 %n.2)304; CHECK-NEXT:  Just Mod:  Ptr: i8* %res	<->  %res = tail call ptr @__memset_chk(ptr %a, i32 0, i64 %n.1, i64 %n.2)305; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.1	<->  %res = tail call ptr @__memset_chk(ptr %a, i32 0, i64 %n.1, i64 %n.2)306; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.5	<->  %res = tail call ptr @__memset_chk(ptr %a, i32 0, i64 %n.1, i64 %n.2)307;308entry:309  load i8, ptr %a310  %res = tail call ptr @__memset_chk(ptr %a, i32 0, i64 %n.1, i64 %n.2)311  load i8, ptr %res312  %a.gep.1 = getelementptr i8, ptr %a, i32 1313  store i8 0, ptr %a.gep.1314  %a.gep.5 = getelementptr i8, ptr %a, i32 5315  store i8 1, ptr %a.gep.5316  ret ptr %res317}318 319declare ptr @__memcpy_chk(ptr writeonly, ptr readonly, i64, i64)320 321define ptr @test_memcpy_chk_const_size(ptr noalias %a, ptr noalias %b, i64 %n) {322; CHECK-LABEL: Function: test_memcpy_chk_const_size323; CHECK:       Just Mod:  Ptr: i8* %a	<->  %res = tail call ptr @__memcpy_chk(ptr %a, ptr %b, i64 4, i64 %n)324; CHECK-NEXT:  Just Mod:  Ptr: i8* %res	<->  %res = tail call ptr @__memcpy_chk(ptr %a, ptr %b, i64 4, i64 %n)325; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.1	<->  %res = tail call ptr @__memcpy_chk(ptr %a, ptr %b, i64 4, i64 %n)326; CHECK-NEXT:  NoModRef:  Ptr: i8* %a.gep.5	<->  %res = tail call ptr @__memcpy_chk(ptr %a, ptr %b, i64 4, i64 %n)327; CHECK-NEXT:  Just Ref:  Ptr: i8* %b.gep.1	<->  %res = tail call ptr @__memcpy_chk(ptr %a, ptr %b, i64 4, i64 %n)328; CHECK-NEXT:  NoModRef:  Ptr: i8* %b.gep.5	<->  %res = tail call ptr @__memcpy_chk(ptr %a, ptr %b, i64 4, i64 %n)329;330entry:331  load i8, ptr %a332  %res = tail call ptr @__memcpy_chk(ptr %a, ptr %b, i64 4, i64 %n)333  load i8, ptr %res334  %a.gep.1 = getelementptr i8, ptr %a, i32 1335  store i8 0, ptr %a.gep.1336  %a.gep.5 = getelementptr i8, ptr %a, i32 5337  store i8 1, ptr %a.gep.5338  %b.gep.1 = getelementptr i8, ptr %b, i32 1339  store i8 0, ptr %b.gep.1340  %b.gep.5 = getelementptr i8, ptr %b, i32 5341  store i8 1, ptr %b.gep.5342  ret ptr %res343}344 345define ptr @test_memcpy_chk_variable_size(ptr noalias %a, ptr noalias %b, i64 %n.1, i64 %n.2) {346; CHECK-LABEL: Function: test_memcpy_chk_variable_size347; CHECK:       Just Mod:  Ptr: i8* %a	<->  %res = tail call ptr @__memcpy_chk(ptr %a, ptr %b, i64 %n.1, i64 %n.2)348; CHECK-NEXT:  Just Mod:  Ptr: i8* %res	<->  %res = tail call ptr @__memcpy_chk(ptr %a, ptr %b, i64 %n.1, i64 %n.2)349; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.1	<->  %res = tail call ptr @__memcpy_chk(ptr %a, ptr %b, i64 %n.1, i64 %n.2)350; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.5	<->  %res = tail call ptr @__memcpy_chk(ptr %a, ptr %b, i64 %n.1, i64 %n.2)351; CHECK-NEXT:  Just Ref:  Ptr: i8* %b.gep.1	<->  %res = tail call ptr @__memcpy_chk(ptr %a, ptr %b, i64 %n.1, i64 %n.2)352; CHECK-NEXT:  Just Ref:  Ptr: i8* %b.gep.5	<->  %res = tail call ptr @__memcpy_chk(ptr %a, ptr %b, i64 %n.1, i64 %n.2)353;354entry:355  load i8, ptr %a356  %res = tail call ptr @__memcpy_chk(ptr %a, ptr %b, i64 %n.1, i64 %n.2)357  load i8, ptr %res358  %a.gep.1 = getelementptr i8, ptr %a, i32 1359  store i8 0, ptr %a.gep.1360  %a.gep.5 = getelementptr i8, ptr %a, i32 5361  store i8 1, ptr %a.gep.5362  %b.gep.1 = getelementptr i8, ptr %b, i32 1363  store i8 0, ptr %b.gep.1364  %b.gep.5 = getelementptr i8, ptr %b, i32 5365  store i8 1, ptr %b.gep.5366  ret ptr %res367}368