http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58679
--- Comment #5 from Uroš Bizjak <ubizjak at gmail dot com> --- Another problem: --cut here-- int f (long long a, long long b) { return (a * b) >> 16; } --cut here-- -O2 -mavx -m32 results in the ICE in mode switching due to following sequence: (insn 14 12 23 2 (parallel [ (set (reg:DI 0 ax [orig:99 D.1985 ] [99]) (ashiftrt:DI (reg:DI 0 ax [orig:97 D.1985 ] [97]) (const_int 16 [0x10]))) (clobber (reg:CC 17 flags)) ]) t-2.c:3 528 {*ashrdi3_doubleword} (nil)) (insn 23 14 30 2 (use (reg/i:SI 0 ax)) t-2.c:4 -1 (nil)) The set and use have different modes. Before the change: (insn 14 12 20 2 (parallel [ (set (reg:DI 0 ax [orig:99 D.1985 ] [99]) (ashiftrt:DI (reg:DI 0 ax [orig:97 D.1985 ] [97]) (const_int 16 [0x10]))) (clobber (reg:CC 17 flags)) ]) t-2.c:3 528 {*ashrdi3_doubleword} (nil)) (insn 20 14 23 2 (set (reg/i:SI 0 ax) (reg:SI 0 ax [orig:99 D.1985 ] [99])) t-2.c:4 86 {*movsi_internal} (nil)) (insn 23 20 30 2 (use (reg/i:SI 0 ax)) t-2.c:4 -1 (nil))