https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120034
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- As expected it works for uint32_t bzhi_emulation1(uint32_t value, uint32_t index) { return value & ((1 << index) - 1); } but we can generate DImode bzhi just fine for this case?