https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83252
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Started r249450, was likely latent before that. Slightly adjusted testcase (needs C++ though, for some reason with C it doesn't FAIL). The difference between r255257 and r255258 is: --- pr83252.s.r255257 2017-12-03 06:47:40.000000000 -0500 +++ pr83252.s.r255258 2017-12-03 06:47:52.000000000 -0500 @@ -114,7 +114,8 @@ _Z3foov: testl %ecx, %ecx jne .L12 .L11: - imull $1511624318, %esi, %eax + movl -28(%rsp), %eax + cmpq $1, t(%rip) sbbl $-1, %eax .L12: movl -8(%rsp), %edx // PR target/83252 // { dg-do run { target lp64 } } // { dg-options "-O3" } // { dg-additional-options "-mbmi2 -mtune=intel" { target bmi2 } } long long int h = 8707493562598231894LL; long long int i = 2720142332956971588LL; long long int j = 5337614525613944604LL; unsigned int k = 1092738485U; long long int l = -2228108721620697360LL; unsigned int m = 3060393125U; long long int n = -5267148545474741934LL; long long int o = 628644587444781171LL; long long int p = -1929881923114969467LL; unsigned int q = 342358347U; unsigned int r = 4141428744U; unsigned int s = 3147872734U; long long int t = 2249711228974996732LL; unsigned int u = 4012608111U; unsigned int v = 664122423U; unsigned int w = 795984700U; unsigned int x = 751359462U; unsigned int *y = &x; unsigned int z = 274677517U; unsigned long long int z1 = 14738459288714673932ULL; unsigned int *z2 = &z; unsigned int *z3 = &v; unsigned long long int *z4 = &z1; long long int z5; unsigned int z6; long long int *z7 = &z5; unsigned int *z8 = &z6; unsigned long long int z9 = 5759377091529791657ULL; unsigned long long int x7 = 15085582420970487994ULL; unsigned long long int y2 = 13537462614340337437ULL; unsigned int y3 = 3159284560U; long long int y4 = -5592336281551563373LL; unsigned int y5 = 916868838U; unsigned long long int y6 = 122846687590239390ULL; unsigned long long int y7 = 15084731736992858763ULL; unsigned int y8 = 1383085329U; long long int y9 = 676559977929482050LL; unsigned int x1 = 1321771489U; unsigned int x2 = 2438389883U; long long int x3 = 2997174617692616057LL; unsigned long long int x4 = 4431338120255382076ULL; unsigned long long int x5 = 11272010769831539270ULL; unsigned int x6 = 2906827848U; void foo (void) { if ((-2783342978U * (int) l || z) && z2 && h && z1 && (z9 & ~-(8 ? -2783342978U * (int) l : 0))) { i = m < n; y7 = o >> *y - 751359400; *z3 = x7; long a = (o >> *y - 751359400 >> ~-(8 ? -2783342978U * (int) l : 0) - 88480234) - (808 ? 8 ? -2783342978U * (int) l : 0 : 0) ? y2 : ~-(8 ? -2783342978U * (int) l : 0) - 88480234; y6 = a; if (~0 % *z4 % 5) y8 = -3 * ((8 ? l : 0) - 4 ? : 407228174574); if (y3 < (0 || ~0)) { long long *b = &y9; z3 = 0; int c = *z2; *z7 = 0; x1 = ~(808 ? -(8 ? (unsigned) (-2783342978U * l) : 0) : 0); p = *b & j; x2 = c; } else { j = 0; int d, e = !0 % (q % *z4); r = ((s || !k) && t) - -(8 ? -2783342978U * (int) l : d); x3 = o >> *y - 751359400; y9 = z9; long f = o >> *y - 751359400 >> ~-(8 ? -2783342978U * (int) l : 0) - 88480234; x4 = z1; u = n * f * e * y4; } if (8ULL * -(808 ? -(8 ? -2783342978U * (int) l : 0) : 0)) ; else { *z3 = 0; int g = 3 & y5; x5 = (unsigned) (~o + 9223372036854775807 >> (8 ? l : 0)); *z8 = g + y9; v = j || ~0 + 9223372036854775807 >> ~-(8 ? -2783342978U * (int) l : 0); x6 = o >> (8 ? 8 * l : 0); w = *y ? -2783342978U * l : 0; } } } int main () { foo (); if (r != 88480289) __builtin_abort (); return 0; }