Not a reviewer here, but FWIW looks good to me. I just wrote the same bug locally for a different pattern while working to extend it for TImode, and arrived to the same fix. In my case I only caught it because it happened to break gcc.dg/pr106063.c, so I think there may not be many existing tests that will catch if a subreg:TI is handled wrong.
-- https://forge.sourceware.org/gcc/gcc/pulls/231#issuecomment-7504
