https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100312
Bug ID: 100312 Summary: __builtin_ia32_maskloadpd256 and friends should be pure Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: rguenth at gcc dot gnu.org Target Milestone: --- The testcase in PR99912 shows that we fail to eliminate dead AVX2 masked loads since the x86 specific builtins are not marked pure and thus are considered to clobber their arguments and have other unwanted side-effects. It looks like the "way" to change this is to remove the builtins from i386-builtin.def and manually add them to ix86_init_mmx_sse_builtins like the AVX2 gather builtins (which are properly constructed as pure).