OSDN Git Service

move PR2053 to here.
authorChris Lattner <sabre@nondot.org>
Sun, 17 Feb 2008 19:43:57 +0000 (19:43 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 17 Feb 2008 19:43:57 +0000 (19:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47237 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/README.txt

index 846d694..60163e2 100644 (file)
@@ -1516,3 +1516,15 @@ should generate:
 lock ; mov %esp, %esp
 
 //===---------------------------------------------------------------------===//
+
+The generated code on x86 for checking for signed overflow on a multiply the
+obvious way is much longer than it needs to be.
+
+int x(int a, int b) {
+  long long prod = (long long)a*b;
+  return  prod > 0x7FFFFFFF || prod < (-0x7FFFFFFF-1);
+}
+
+See PR2053 for more details.
+
+//===---------------------------------------------------------------------===//