[llvm-dev] Poison values
Alexandre Isoard via llvm-dev
llvm-dev at lists.llvm.org
Thu Dec 1 14:27:15 PST 2016
Hello,
I was trying to wrap my head around the poison semantic in llvm-ir.
Let say I have the following llvm ir:
int5 f(int5 %a) {
%b = lshr exact int5 %a, 2
%c = shl nuw int5 %a, 2
return %a
}
Even though I do not use %b nor %c, can I assume that %a is either 0 or 4?
That is, can I assume the creation of poison value is undefined behavior,
or do I need to perform branching on posion value to actually have an
undefined behavior?
Regards.
--
*Alexandre Isoard*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161201/a242c446/attachment.html>
More information about the llvm-dev
mailing list