OSDN Git Service

* config/ia64/ia64.c (ia64_expand_builtin): Use the correct mode
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 21 Nov 2010 17:31:49 +0000 (17:31 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 21 Nov 2010 17:31:49 +0000 (17:31 +0000)
for infq/huge_valq.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167009 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/ia64/ia64.c

index a811334..346d193 100644 (file)
@@ -1,5 +1,10 @@
 2010-11-21  Richard Henderson  <rth@redhat.com>
 
+       * config/ia64/ia64.c (ia64_expand_builtin): Use the correct mode
+       for infq/huge_valq.
+
+2010-11-21  Richard Henderson  <rth@redhat.com>
+
        PR rtl-optimization/46571
        * gcse.c (hash_scan_set): Use next_nonnote_nondebug_insn.
        (compute_hash_table_work): Use NONDEBUG_INSN_P.
index a657d4e..06258cb 100644 (file)
@@ -10236,16 +10236,17 @@ ia64_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED,
     case IA64_BUILTIN_INFQ:
     case IA64_BUILTIN_HUGE_VALQ:
       {
+        enum machine_mode target_mode = TYPE_MODE (TREE_TYPE (exp));
        REAL_VALUE_TYPE inf;
        rtx tmp;
 
        real_inf (&inf);
-       tmp = CONST_DOUBLE_FROM_REAL_VALUE (inf, mode);
+       tmp = CONST_DOUBLE_FROM_REAL_VALUE (inf, target_mode);
 
-       tmp = validize_mem (force_const_mem (mode, tmp));
+       tmp = validize_mem (force_const_mem (target_mode, tmp));
 
        if (target == 0)
-         target = gen_reg_rtx (mode);
+         target = gen_reg_rtx (target_mode);
 
        emit_move_insn (target, tmp);
        return target;