https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110248
--- Comment #5 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> --- ivopts does have code to treat ifn pointer arguments specially, see get_mem_type_for_internal_fn &co. But like Kewen says, it's still only based on the mode. Personally I'd prefer an internal_fn rather than a gimple* though. It can be useful to test these things on a possible future statement, not just on one that already exists.