+2016-01-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/69399
+ * wide-int.h (wi::lrshift): For larger precisions, only
+ use fast path if shift is known to be < HOST_BITS_PER_WIDE_INT.
+
2016-01-27 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/predicates.md (proper_comparison_operator): Reject
+2016-01-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/69399
+ * gcc.dg/torture/pr69399.c: New test.
+
2016-01-27 Eric Botcazou <ebotcazou@adacore.com>
* gcc.dg/tree-ssa/ssa-dom-cse-2.c: XFAIL on SPARC 64-bit.
--- /dev/null
+/* { dg-do run { target int128 } } */
+
+static unsigned __attribute__((noinline, noclone))
+foo (unsigned long long u)
+{
+ unsigned __int128 v = u | 0xffffff81U;
+ v >>= 64;
+ return v;
+}
+
+int
+main ()
+{
+ unsigned x = foo (27);
+ if (x != 0)
+ __builtin_abort ();
+ return 0;
+}
For variable-precision integers like wide_int, handle HWI
and sub-HWI integers inline. */
if (STATIC_CONSTANT_P (xi.precision > HOST_BITS_PER_WIDE_INT)
- ? xi.len == 1 && xi.val[0] >= 0
+ ? (shift < HOST_BITS_PER_WIDE_INT
+ && xi.len == 1
+ && xi.val[0] >= 0)
: xi.precision <= HOST_BITS_PER_WIDE_INT)
{
val[0] = xi.to_uhwi () >> shift;