------- Comment #3 from davidxl at gcc dot gnu dot org 2009-12-23 19:37 ------- This bug is ARM specific (thumb) mode. In x86, the hoisting is unnecessary as the move instruction support the imm form.
The issue here is more in the GIMPLE canonicalization (target specific). In this case, the IR should be in the following form to expose the hoisting. if (...) { temp = 0; *p = temp; } else { temp = 0; *(p+1) = temp; } -- davidxl at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |UNCONFIRMED Resolution|DUPLICATE | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40956