Hello! This is the third version of BMI2 support that includes generation of mulx, rorx, x part. This patch includes all comments on previous version, splits all insn post-reload, uses "enable" attribute and avoids new register modifiers. As a compromise (see previous posts), the mulx insn is now split post-reload into pattern that separates outputs (so, post-reload passes can do their job more effectively), with the hope that someday other DWI patterns will be rewritten in the same way. 2011-08-21 Uros Bizjak * config/i386/i386.md (type): Add imulx, ishiftx and rotatex. (length_immediate): Handle imulx, ishiftx and rotatex. (imm_disp): Ditto. (isa): Add bmi2. (enabled): Handle bmi2. (w): New mode attribute. (*mul3): Split from *mul3. (*umul3): Ditto. Add imulx BMI2 alternative. (*bmi2_umulditi3_1): New insn pattern. (*bmi2_umulsidi3_1): Ditto. (*umul3 splitter): New splitter to avoid flags dependency. (*bmi2_ashl3_1): New insn pattern. (*ashl3_1): Add ishiftx BMI2 alternative. (*ashl3_1 splitter): New splitter to avoid flags dependency. (*bmi2_ashlsi3_1_zext): New insn pattern. (*ashlsi3_1_zext): Add ishiftx BMI2 alternative. (*ashlsi3_1_zext splitter): New splitter to avoid flags dependency. (*bmi2_3_1): New insn pattern. (*3_1): Add ishiftx BMI2 alternative. (*3_1 splitter): New splitter to avoid flags dependency. (*bmi2_si3_1_zext): New insn pattern. (*si3_1_zext): Add ishiftx BMI2 alternative. (*si3_1_zext splitter): New splitter to avoid flags dependency. (*bmi2_rorx3_1): New insn pattern. (*3_1): Add rotatex BMI2 alternative. (*rotate3_1 splitter): New splitter to avoid flags dependency. (*rotatert3_1 splitter): Ditto. (*bmi2_rorxsi3_1_zext): New insn pattern. (*si3_1_zext): Add rotatex BMI2 alternative. (*rotatesi3_1_zext splitter): New splitter to avoid flags dependency. (*rotatertsi3_1_zext splitter): Ditto. The patch was bootstrapped and fully tested on x86_64-pc-linux-gnu {,-m32}. Kirill, please add other stuff, re-test it on simulator and re-post complete patch with (fixed) testcases. Uros.