re PR target/31167 (ICE wnen using __int128_t on x86_64)

PR target/31167
       Backport from mainline.
       * config/i386/i386.md (*addti3_1, *addti3_1 splitter): Use
       x86_64_general_operand as operand[2] predicate.  Remove "iF"
       from operand constraints and use "e" constraint instead.
       (*subti3_1, *subti3_1 splitter): Ditto.
       (*negti2_1, *negti2_1 splitter): Use nonimmediate_operand as
       operand[1] predicate.

       PR target/30041
       Backport from mainline.
       * config/i386/sse.md ("*sse3_movddup"): Use operands[0] and
       operands[1] in insn constraint.  Correct type attribute to sselog1.

testsuite/ChangeLog

       Backport from mainline.
       * gcc.target/i386/pr31167.c: New test.

From-SVN: r124900
This commit is contained in:
Uros Bizjak
2007-05-21 13:31:14 +02:00
parent 68dedc7df9
commit dbc635a5df
5 changed files with 54 additions and 9 deletions

View File

@@ -1,3 +1,21 @@
2007-05-21 Uros Bizjak <ubizjak@gmail.com>
PR target/31167
Backport from mainline.
* config/i386/i386.md (*addti3_1, *addti3_1 splitter): Use
x86_64_general_operand as operand[2] predicate. Remove "iF"
from operand constraints and use "e" constraint instead.
(*subti3_1, *subti3_1 splitter): Ditto.
(*negti2_1, *negti2_1 splitter): Use nonimmediate_operand as
operand[1] predicate.
2007-05-21 Uros Bizjak <ubizjak@gmail.com>
PR target/30041
Backport from mainline.
* config/i386/sse.md ("*sse3_movddup"): Use operands[0] and
operands[1] in insn constraint. Correct type attribute to sselog1.
2007-05-20 Kaz Kojima <kkojima@gcc.gnu.org>
PR target/31701
@@ -379,7 +397,8 @@
2007-04-03 Stuart Hastings <stuart@apple.com>
PR 31281
* objc/objc-act.c (next_sjlj_build_catch_list): Delete volatile from rethrow decl.
* objc/objc-act.c (next_sjlj_build_catch_list): Delete volatile
from rethrow decl.
* cse.c (record_jump_equiv): Bail out on CCmode comparisons.
2007-04-03 Jakub Jelinek <jakub@redhat.com>

View File

@@ -4749,7 +4749,7 @@
(define_insn "*addti3_1"
[(set (match_operand:TI 0 "nonimmediate_operand" "=r,o")
(plus:TI (match_operand:TI 1 "nonimmediate_operand" "%0,0")
(match_operand:TI 2 "general_operand" "roiF,riF")))
(match_operand:TI 2 "x86_64_general_operand" "roe,re")))
(clobber (reg:CC FLAGS_REG))]
"TARGET_64BIT && ix86_binary_operator_ok (PLUS, TImode, operands)"
"#")
@@ -4757,7 +4757,7 @@
(define_split
[(set (match_operand:TI 0 "nonimmediate_operand" "")
(plus:TI (match_operand:TI 1 "nonimmediate_operand" "")
(match_operand:TI 2 "general_operand" "")))
(match_operand:TI 2 "x86_64_general_operand" "")))
(clobber (reg:CC FLAGS_REG))]
"TARGET_64BIT && reload_completed"
[(parallel [(set (reg:CC FLAGS_REG) (unspec:CC [(match_dup 1) (match_dup 2)]
@@ -6483,7 +6483,7 @@
(define_insn "*subti3_1"
[(set (match_operand:TI 0 "nonimmediate_operand" "=r,o")
(minus:TI (match_operand:TI 1 "nonimmediate_operand" "0,0")
(match_operand:TI 2 "general_operand" "roiF,riF")))
(match_operand:TI 2 "x86_64_general_operand" "roe,re")))
(clobber (reg:CC FLAGS_REG))]
"TARGET_64BIT && ix86_binary_operator_ok (MINUS, TImode, operands)"
"#")
@@ -6491,7 +6491,7 @@
(define_split
[(set (match_operand:TI 0 "nonimmediate_operand" "")
(minus:TI (match_operand:TI 1 "nonimmediate_operand" "")
(match_operand:TI 2 "general_operand" "")))
(match_operand:TI 2 "x86_64_general_operand" "")))
(clobber (reg:CC FLAGS_REG))]
"TARGET_64BIT && reload_completed"
[(parallel [(set (reg:CC FLAGS_REG) (compare:CC (match_dup 1) (match_dup 2)))
@@ -9326,7 +9326,7 @@
(define_insn "*negti2_1"
[(set (match_operand:TI 0 "nonimmediate_operand" "=ro")
(neg:TI (match_operand:TI 1 "general_operand" "0")))
(neg:TI (match_operand:TI 1 "nonimmediate_operand" "0")))
(clobber (reg:CC FLAGS_REG))]
"TARGET_64BIT
&& ix86_unary_operator_ok (NEG, TImode, operands)"
@@ -9334,7 +9334,7 @@
(define_split
[(set (match_operand:TI 0 "nonimmediate_operand" "")
(neg:TI (match_operand:TI 1 "general_operand" "")))
(neg:TI (match_operand:TI 1 "nonimmediate_operand" "")))
(clobber (reg:CC FLAGS_REG))]
"TARGET_64BIT && reload_completed"
[(parallel

View File

@@ -2055,11 +2055,11 @@
(match_dup 1))
(parallel [(const_int 0)
(const_int 2)])))]
"TARGET_SSE3 && !(MEM_P (operands[1]) && MEM_P (operands[2]))"
"TARGET_SSE3 && !(MEM_P (operands[0]) && MEM_P (operands[1]))"
"@
movddup\t{%1, %0|%0, %1}
#"
[(set_attr "type" "sselog,ssemov")
[(set_attr "type" "sselog1,ssemov")
(set_attr "mode" "V2DF")])
(define_split

View File

@@ -1,3 +1,9 @@
2007-05-21 Uros Bizjak <ubizjak@gmail.com>
PR target/31167
Backport from mainline.
* gcc.target/i386/pr31167.c: New test.
2007-05-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/31395

View File

@@ -0,0 +1,20 @@
/* { dg-do compile { target x86_64-*-* } } */
/* { dg-options "-O" } */
typedef int int32_t;
int32_t round32hi (const __int128_t arg)
{
const int SHIFT = 96;
const int mshift = 96;
const __int128_t M = (~(__int128_t) 0) << mshift;
const __int128_t L = (~M) + 1;
const __int128_t L1 = ((__int128_t) L) >> 1;
const __int128_t Mlo = ((__int128_t) (~M)) >> 1;
__int128_t vv = arg & M;
if ((arg & (L1)) && ((arg & Mlo) || (arg & L)))
vv += L;
return (int32_t) (vv >> SHIFT);
}