[llvm-dev] undef value

Anastasiya Ruzhanskaya via llvm-dev llvm-dev at lists.llvm.org
Tue Jul 25 04:35:20 PDT 2017


Hello,
I am opening llvm more and more for me, so now I have some questions about
shifting and undef value:
1) undef value is like a separate entity. But I have seen in some notes,
that this is legal to compute expressions with undef value. So ,  undef |1
will be equal to one (the size of the result will depended on the size of
one)? And undef & 0 will be equal to zero and so on?
2) Is it compiler dependent (may be here there is a lack of my knowledges)
that unoptimized version of llvm , when I try:
char a = 6;
char a = 2;
char c = 6<<2 - performs sext on 6 before performing a 32 bit shl?
Thank you in advance for the answers.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170725/48c4d804/attachment.html>


More information about the llvm-dev mailing list