https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81502
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org --- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- So the rewrite into SSA should work now. I'm not sure the pattern combining BIT_INSERT_EXPR and VECTOR_CST into a CONSTRUCTOR is desirable, a single insert into a loaded constant vector is likely cheaper so some cost modeling would be in order. So from int bar(void*) (void * ptr) { int res; __m128i word; long long int _2; unsigned int _4; <bb 2> [100.00%] [count: INV]: _2 = (long long int) ptr_6(D); word_3 = BIT_INSERT_EXPR <{ 0, 0 }, _2, 0 (64 bits)>; _4 = BIT_FIELD_REF <word_3, 32, 0>; res_5 = (int) _4; return res_5; the desired pattern is combining BIT_FIELD_REF and BIT_INSERT_EXPR. We'd combine that into _4 = BIT_FIELD_REF <_2, 32, 0>; will try to come up with a match.pd rule once time permits.