add one more case of mismatched input/output constraints.  
When the mismatch is due to a larger input operand that is
a constant, truncate it down to the size of the output.  This
allows us to accept some cases in the linux kernel and elsewhere.
Pedantically speaking, we generate different code than GCC, though
I can't imagine how it would matter:

Clang:
	movb	$-1, %al
	frob %al

GCC:

	movl	$255, %eax
	frob %al



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126148 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGen/asm-inout.c b/test/CodeGen/asm-inout.c
index 5b0a5f7..29142f7 100644
--- a/test/CodeGen/asm-inout.c
+++ b/test/CodeGen/asm-inout.c
@@ -29,3 +29,12 @@
 		: "edi"
 		);
 }
+
+// PR8959 - This should implicitly truncate the immediate to a byte.
+int test4(volatile int *addr) {
+  unsigned char oldval;
+  __asm__ ("frob %0" : "=r"(oldval) : "0"(0xff));
+  return (int)oldval;
+// CHECK: call i8 asm "frob $0", "=r,0{{.*}}"(i8 -1)
+}
+