Skip to content

Commit 3012d46

Browse files
committed
Updates
1 parent 0fb45e9 commit 3012d46

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

ir/pointer.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,8 @@ expr Pointer::encodeByValArgRefinement(
522522
Pointer this_ofs = *this + ofs;
523523
Pointer other_ofs = other + ofs;
524524

525+
// Dereferenceability of this and other ptr is already encoded by
526+
// ParamAttrs::encode.
525527
return ofs.ugt(expr::mkUInt(size, ofs))
526528
.implies(this_ofs.encodeLoadedByteRefined(other_ofs, undefs));
527529
}

tests/alive-tv/bugs/pr10067.srctgt.ll

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
; To support this test, escaped local blocks should have bytes updated after
2-
; unkown fn calls.
3-
41
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128-n8:16:32"
52
target triple = "i386-apple-darwin10"
63

@@ -10,7 +7,7 @@ target triple = "i386-apple-darwin10"
107
define i32 @src() noinline {
118
%x = alloca %struct1, align 8
129
%y = alloca %struct2, align 8
13-
call void @bar(%struct1* sret(%struct1) %x)
10+
call void @bar(%struct1* %x)
1411

1512
%gepn1 = getelementptr inbounds %struct2, %struct2* %y, i32 0, i32 0, i32 0
1613
store i32 0, i32* %gepn1, align 8
@@ -31,7 +28,7 @@ define i32 @tgt() noinline {
3128
%x = alloca %struct1, align 8
3229
%y = alloca %struct2, align 8
3330
%y1 = bitcast %struct2* %y to %struct1*
34-
call void @bar(%struct1* sret(%struct1) %y1)
31+
call void @bar(%struct1* %y1)
3532
%gepn1 = getelementptr inbounds %struct2, %struct2* %y, i32 0, i32 0, i32 0
3633
store i32 0, i32* %gepn1, align 8
3734
%gepn2 = getelementptr inbounds %struct2, %struct2* %y, i32 0, i32 0, i32 1
@@ -43,6 +40,6 @@ define i32 @tgt() noinline {
4340
ret i32 %ret
4441
}
4542

46-
declare void @bar(%struct1* sret(%struct1))
43+
declare void @bar(%struct1*)
4744

48-
; ERROR: Couldn't prove the correctness of the transformation
45+
; ERROR: Source is more defined than target

0 commit comments

Comments
 (0)