In working on memcpy et al, I noticed that many of the AutoUpdater's pattern matchers suffer the same issues of
(a) not commonizing similar handling of the intrinsic creation, and
(b) repeatedly checking for the same prefix, and
(c) if the name matched, but other conditions failed, it would fall through to check a different prefix (which could not match).
This one handles the 'masked.$FOO' intrinsics to avoid those deficiences.
Part 1 in a series of N.
You can use consume_front for this instead of startswith+substr