aboutsummaryrefslogtreecommitdiffstats
path: root/test/FrontendC/2010-07-27-MinNoFoldConst.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/FrontendC/2010-07-27-MinNoFoldConst.c')
-rw-r--r--test/FrontendC/2010-07-27-MinNoFoldConst.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/test/FrontendC/2010-07-27-MinNoFoldConst.c b/test/FrontendC/2010-07-27-MinNoFoldConst.c
deleted file mode 100644
index ea711e5..0000000
--- a/test/FrontendC/2010-07-27-MinNoFoldConst.c
+++ /dev/null
@@ -1,18 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | FileCheck %s
-extern int printf(const char *, ...);
-static void bad(unsigned int v1, unsigned int v2) {
- printf("%u\n", 1631381461u * (((v2 - 1273463329u <= v1 - 1273463329u) ? v2 : v1) - 1273463329u) + 121322179u);
-}
-// Radar 8198362
-// GCC FE wants to convert the above to
-// 1631381461u * MIN(v2 - 1273463329u, v1 - 1273463329u)
-// and then to
-// MIN(1631381461u * v2 - 4047041419, 1631381461u * v1 - 4047041419)
-//
-// 1631381461u * 1273463329u = 2077504466193943669, but 32-bit overflow clips
-// this to 4047041419. This breaks the comparison implicit in the MIN().
-// Two multiply operations suggests the bad optimization is happening;
-// one multiplication, after the MIN(), is correct.
-// CHECK: mul
-// CHECK-NOT: mul
-// CHECK: ret