search for: smeantic

Displaying 4 results from an estimated 4 matches for "smeantic".

Did you mean: semantic
2011 Dec 15
2
[LLVMdev] nsw is still logically inconsistent
...the >> subsequent add would produce a value which is not 0 or 1, and the >> icmp ult would return 0, and the udiv would have undefined >> behavior. And it's unconditional. > > I'm not following. If the promotion to i64 produces a different value, > then the nsw smeantic was violated, leading to undefined behavior, as > you note. That that point all bets are off. Divide by zero certainly > is a perfectly valid expression of undefined behavior. If we had a > delayed check we would have to put it somewhere before the udiv. We > would probably need som...
2011 Dec 19
0
[LLVMdev] nsw is still logically inconsistent
Dan Gohman <gohman at apple.com> writes: >> I'm not following. If the promotion to i64 produces a different value, >> then the nsw smeantic was violated, leading to undefined behavior, as >> you note. That that point all bets are off. Divide by zero certainly >> is a perfectly valid expression of undefined behavior. If we had a >> delayed check we would have to put it somewhere before the udiv. We >> would p...
2011 Dec 14
0
[LLVMdev] nsw is still logically inconsistent
...value which is not -1 or 0, the > subsequent add would produce a value which is not 0 or 1, and the > icmp ult would return 0, and the udiv would have undefined > behavior. And it's unconditional. I'm not following. If the promotion to i64 produces a different value, then the nsw smeantic was violated, leading to undefined behavior, as you note. That that point all bets are off. Divide by zero certainly is a perfectly valid expression of undefined behavior. If we had a delayed check we would have to put it somewhere before the udiv. We would probably need some kind of fixup path...
2011 Dec 12
5
[LLVMdev] nsw is still logically inconsistent
The recent discussion of nsw led me to go back and review the current definition of nsw in greater depth, and it turns out that even with all the theoretical effort, it's still logically inconsistent. First, a warning: The scenario below is artificial. This is just a demonstration. Also, ignore the fact that instcombine would zap everything. Depending on that would be an implicit pass