search for: some_global

Displaying 7 results from an estimated 7 matches for "some_global".

2015 Jan 28
4
[LLVMdev] RFC: Proposal for Poison Semantics
On Tue, Jan 27, 2015 at 8:32 PM, Sanjoy Das <sanjoy at playingwithpointers.com> wrote: > > > > Correct me if I am wrong but we are talking about transforming: > > %maybe_poison = add nuw i32 %a, %b > > %x = zext i32 %maybe_poison to i64 > > %y = lshr i64 %x 32 > > > > To: > > %za = zext i32 %a to i64 > > %zb = zext i32 %b
2015 Feb 01
2
[LLVMdev] RFC: Proposal for Poison Semantics
...information, the problem is that > we're changing the behavior of a well-defined program. > > I'll try to put the whole argument in one place: > > We start with > > %x = add nuw i32 %m, %n > %y = zext i32 %x to i64 > %s = lshr i64 %y, 32 > %addr = gep %some_global, %s > store i32 42, i32* %addr > > In the above program, for all values of %x, %s is 0. This means the > program is well-defined when %x is poison (since you don't need to > look at %x to determine the value of %addr, in the same sense as you > don't need to look at X t...
2015 Jan 29
2
[LLVMdev] RFC: Proposal for Poison Semantics
...ogram which becomes undefined through a series of transformations. In your example, you might try the input program: br i1 %cnd, label %skip, label %exec exec: %x1 = add nuw i32 %m, %n br label %skip skip: %x = phi (x1, 0) %y = zext i32 %x to i64 %s = lshr i64 %y, 32 %addr = gep %some_global, %s store i32 42, i32* %addr But when the add is speculated, this becomes: %x1 = add nuw i32 %m, %n %x = select i1 %cnd x1, 0 %y = zext i32 %x to i64 %s = lshr i64 %y, 32 %addr = gep %some_global, %s store i32 42, i32* %addr This is well defined as per the spec David sent out. %x...
2015 Feb 01
4
[LLVMdev] RFC: Proposal for Poison Semantics
...f a well-defined program. >>> >>> I'll try to put the whole argument in one place: >>> >>> We start with >>> >>> %x = add nuw i32 %m, %n >>> %y = zext i32 %x to i64 >>> %s = lshr i64 %y, 32 >>> %addr = gep %some_global, %s >>> store i32 42, i32* %addr >>> >>> In the above program, for all values of %x, %s is 0. This means the >>> program is well-defined when %x is poison (since you don't need to >>> look at %x to determine the value of %addr, in the same sense a...
2015 Jan 28
3
[LLVMdev] RFC: Proposal for Poison Semantics
...information, the problem is that > we're changing the behavior of a well-defined program. > > I'll try to put the whole argument in one place: > > We start with > > %x = add nuw i32 %m, %n > %y = zext i32 %x to i64 > %s = lshr i64 %y, 32 > %addr = gep %some_global, %s > store i32 42, i32* %addr > > In the above program, for all values of %x, %s is 0. This means the > program is well-defined when %x is poison (since you don't need to > look at %x to determine the value of %addr, in the same sense as you > don't need to look at X t...
2015 Jan 29
0
[LLVMdev] RFC: Proposal for Poison Semantics
...at particular example is not a counterexample to the RFC. The RFC has issues with icmps, sexts and zexts; but they're distinct from the hoisting problem. > %x1 = add nuw i32 %m, %n > %x = select i1 %cnd x1, 0 > %y = zext i32 %x to i64 > %s = lshr i64 %y, 32 > %addr = gep %some_global, %s > store i32 42, i32* %addr > > This is well defined as per the spec David sent out. %x is not poison. %x1 > is, but that's fine. AFAICT, going by the RFC, %x is poison iff %x1 is poison and %cond is true. -- Sanjoy
2015 Jan 29
1
[LLVMdev] RFC: Proposal for Poison Semantics
...ues with icmps, sexts and zexts; but they're distinct > from the hoisting problem. Can you enumerate? Or give an example? > >> %x1 = add nuw i32 %m, %n >> %x = select i1 %cnd x1, 0 >> %y = zext i32 %x to i64 >> %s = lshr i64 %y, 32 >> %addr = gep %some_global, %s >> store i32 42, i32* %addr >> >> This is well defined as per the spec David sent out. %x is not poison. %x1 >> is, but that's fine. > AFAICT, going by the RFC, %x is poison iff %x1 is poison and %cond is true. You're correct; I was sloppy in my wording....