summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/lto/20100825-1_0.c
diff options
context:
space:
mode:
authorupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
committerupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
commit554fd8c5195424bdbcabf5de30fdc183aba391bd (patch)
tree976dc5ab7fddf506dadce60ae936f43f58787092 /gcc/testsuite/gcc.dg/lto/20100825-1_0.c
downloadcbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.bz2
cbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.xz
obtained gcc-4.6.4.tar.bz2 from upstream website;upstream
verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository.
Diffstat (limited to 'gcc/testsuite/gcc.dg/lto/20100825-1_0.c')
-rw-r--r--gcc/testsuite/gcc.dg/lto/20100825-1_0.c57
1 files changed, 57 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/lto/20100825-1_0.c b/gcc/testsuite/gcc.dg/lto/20100825-1_0.c
new file mode 100644
index 000000000..67b5ce035
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/20100825-1_0.c
@@ -0,0 +1,57 @@
+/* { dg-lto-do link } */
+/* { dg-lto-options { { -O3 -flto } } } */
+
+typedef unsigned int UINT32;
+typedef unsigned long long UINT64;
+typedef struct { UINT64 w[2]; } UINT128;
+void _bid_to_dpd128 (UINT128 *, UINT128 *);
+static const int short_recip_scale[] = {
+ 1,
+ 65 - 64,
+ 69 - 64,
+ 71 - 64,
+ 75 - 64,
+ 78 - 64,
+ 81 - 64,
+ 85 - 64,
+ 88 - 64,
+ 91 - 64,
+ 95 - 64,
+ 98 - 64,
+ 101 - 64,
+ 105 - 64,
+ 108 - 64,
+ 111 - 64,
+ 115 - 64,
+ 118 - 64
+};
+
+void _bid_to_dpd128 (UINT128 *, UINT128 *);
+
+void
+_bid_to_dpd128 (UINT128 *pres, UINT128 *px) {
+ UINT128 res;
+ unsigned int comb;
+ UINT128 bcoeff;
+ UINT128 BH;
+ UINT64 BL, d109;
+ unsigned int amount;
+ UINT128 x = *px;
+
+ comb = (x.w[1] ) >> 46;
+ if ((comb & 0x1e000) == 0x1e000) {
+ res = x;
+ } else {
+ bcoeff.w[1] = (x.w[1] & 0x0001ffffffffffffull);
+ bcoeff.w[0] = x.w[0];
+ amount = 9;
+ BH.w[0] = (BH.w[0] >> amount) | (BH.w[1] << (64 - amount));
+ BL = bcoeff.w[0] - BH.w[0] * 1000000000000000000ull;
+ d109 = 0x3333333333333334ull;
+ { UINT64 CXH, CXL, CYH,CYL,PL,PH,PM,PM2; CXH = (BH.w[0]) >> 32; CXL = (UINT32)(BH.w[0]); CYH = (d109) >> 32; CYL = (UINT32)(d109); PM = CXH*CYL; PH = CXH*CYH; PL = CXL*CYL; PM2 = CXL*CYH; PH += (PM>>32); PM = (UINT64)((UINT32)PM)+PM2+(PL>>32); };
+ { UINT64 CXH, CXL, CYH,CYL,PL,PH,PM,PM2; CXH = (BL) >> 32; CXL = (UINT32)(BL); CYH = (d109) >> 32; CYL = (UINT32)(d109); PM = CXH*CYL; PH = CXH*CYH; PL = CXL*CYL; PM2 = CXL*CYH; PH += (PM>>32); PM = (UINT64)((UINT32)PM)+PM2+(PL>>32); };
+ }
+ *pres = res;
+}
+
+int main() { return 0; }