x86: fix a bug when sign-extend immediate for Ev. backport from upstream LLVM