Please elaborate what's going on here (i.e. what is the value that we fail to sign-extend)? This code looks far too complex to me, and I'd strongly suggest to make it platform-independent. REPOSITORY rL LLVM http://reviews.llvm.org/D9247 EMAIL PREFERENCES http://reviews.llvm.org/settings/panel/emailpreferences/