https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103252
--- Comment #10 from Hongtao.liu <crazylht at gmail dot com> --- (In reply to Andrew Pinski from comment #4) > (In reply to Jason A. Donenfeld from comment #2) > > Here's a more minimal test case: https://gcc.godbolt.org/z/15hnsb6of > > kmovd k0, ecx > mov ecx, DWORD PTR __libc_tsd_CTYPE_B@gotntpoff[ebx] > kmovd eax, k0 > mov ecx, DWORD PTR gs:[ecx] > test BYTE PTR 1[ecx+eax*2], 32 > > vs: > > mov ecx, DWORD PTR __libc_tsd_CTYPE_B@gotntpoff[ebx] > mov ecx, DWORD PTR gs:[ecx] > test BYTE PTR 1[ecx+edx*2], 32 > Why cprop_hardreg can't handle this?