]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/59379 (gomp_init_num_threads is compiled into an infinite loop with...
authorUros Bizjak <uros@gcc.gnu.org>
Sun, 19 Jan 2014 15:48:14 +0000 (16:48 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Sun, 19 Jan 2014 15:48:14 +0000 (16:48 +0100)
PR target/59379
* config/i386/i386.md (*lea<mode>): Zero-extend return register
to DImode for zero-extended addresses.

From-SVN: r206774

gcc/ChangeLog
gcc/config/i386/i386.md

index 0fd40b5da8dc315fd23147a5174c99dc5f7d9c27..abb54a8972fab8f88c4f2c7c725890cfcaad2020 100644 (file)
@@ -1,10 +1,17 @@
+2014-01-18  Uros Bizjak  <ubizjak@gmail.com>
+           H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR target/59379
+       * config/i386/i386.md (*lea<mode>): Zero-extend return register
+       to DImode for zero-extended addresses.
+
 2014-01-19  Jakub Jelinek  <jakub@redhat.com>
 
        PR rtl-optimization/57763
        * bb-reorder.c (fix_crossing_unconditional_branches): Set JUMP_LABEL
        on the new indirect jump_insn and increment LABEL_NUSES (label).
 
-2014-01-18   H.J. Lu  <hongjiu.lu@intel.com>
+2014-01-18  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR bootstrap/59580
        PR bootstrap/59583
index e30f389be1d28d1179ec51a19b7367f4f0da348a..603fd8a616b1034419c43c0bdee8f299424b2b4c 100644 (file)
   operands[0] = SET_DEST (pat);
   operands[1] = SET_SRC (pat);
 
-  /* Emit all operations in SImode for zero-extended addresses.  Recall
-     that x86_64 inheretly zero-extends SImode operations to DImode.  */
+  /* Emit all operations in SImode for zero-extended addresses.  */
   if (SImode_address_operand (operands[1], VOIDmode))
     mode = SImode;
 
   ix86_split_lea_for_addr (curr_insn, operands, mode);
+
+  /* Zero-extend return register to DImode for zero-extended addresses.  */
+  if (mode != <MODE>mode)
+    emit_insn (gen_zero_extendsidi2
+              (operands[0], gen_lowpart ((mode), operands[0])));
+
   DONE;
 }
   [(set_attr "type" "lea")