diff options
author | Alan Modra <amodra@bigpond.net.au> | 2004-12-25 12:41:02 +0000 |
---|---|---|
committer | Alan Modra <amodra@gcc.gnu.org> | 2004-12-25 23:11:02 +1030 |
commit | 7f514158b2a4eae91168bc4e173f99244e65a3e0 (patch) | |
tree | f4895fe415949b09d2963d5ea276e2ca88d0b4a3 | |
parent | 1a0f488c328df63663eed29d18af44733ece3abc (diff) | |
download | gcc-7f514158b2a4eae91168bc4e173f99244e65a3e0.zip gcc-7f514158b2a4eae91168bc4e173f99244e65a3e0.tar.gz gcc-7f514158b2a4eae91168bc4e173f99244e65a3e0.tar.bz2 |
re PR target/19137 (ICE with load of TImode constant)
PR target/19137
* config/rs6000/rs6000.md (movti_power, movti_string): Relax
operand[1] predicate to input_operand, and add r<-n alternative.
Move TImode const_double_operand splitter to where it belongs.
From-SVN: r92603
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.md | 68 |
2 files changed, 42 insertions, 33 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d8fcc90..c9139a3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,12 @@ 2004-12-25 Alan Modra <amodra@bigpond.net.au> + PR target/19137 + * config/rs6000/rs6000.md (movti_power, movti_string): Relax + operand[1] predicate to input_operand, and add r<-n alternative. + Move TImode const_double_operand splitter to where it belongs. + +2004-12-25 Alan Modra <amodra@bigpond.net.au> + PR target/19147 * config/rs6000/rs6000.md (andsi3_internal7, andsi3_internal8): Delete. diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 6a64860..c5b1dcd 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -8486,32 +8486,6 @@ [(pc)] { rs6000_split_multireg_move (operands[0], operands[1]); DONE; }) -(define_split - [(set (match_operand:TI 0 "gpc_reg_operand" "") - (match_operand:TI 1 "const_double_operand" ""))] - "TARGET_POWERPC64" - [(set (match_dup 2) (match_dup 4)) - (set (match_dup 3) (match_dup 5))] - " -{ - operands[2] = operand_subword_force (operands[0], WORDS_BIG_ENDIAN == 0, - TImode); - operands[3] = operand_subword_force (operands[0], WORDS_BIG_ENDIAN != 0, - TImode); - if (GET_CODE (operands[1]) == CONST_DOUBLE) - { - operands[4] = GEN_INT (CONST_DOUBLE_HIGH (operands[1])); - operands[5] = GEN_INT (CONST_DOUBLE_LOW (operands[1])); - } - else if (GET_CODE (operands[1]) == CONST_INT) - { - operands[4] = GEN_INT (- (INTVAL (operands[1]) < 0)); - operands[5] = operands[1]; - } - else - FAIL; -}") - (define_insn "*movdi_internal64" [(set (match_operand:DI 0 "nonimmediate_operand" "=r,r,m,r,r,r,r,*f,*f,m,r,*h,*h") (match_operand:DI 1 "input_operand" "r,m,r,I,L,nF,R,f,m,f,*h,r,0"))] @@ -8638,9 +8612,9 @@ ;; giving the SCRATCH mq. (define_insn "*movti_power" - [(set (match_operand:TI 0 "reg_or_mem_operand" "=Q,m,????r,????r,????r") - (match_operand:TI 1 "reg_or_mem_operand" "r,r,r,Q,m")) - (clobber (match_scratch:SI 2 "=q,q#X,X,X,X"))] + [(set (match_operand:TI 0 "reg_or_mem_operand" "=Q,m,????r,????r,????r,r") + (match_operand:TI 1 "input_operand" "r,r,r,Q,m,n")) + (clobber (match_scratch:SI 2 "=q,q#X,X,X,X,X"))] "TARGET_POWER && ! TARGET_POWERPC64 && (gpc_reg_operand (operands[0], TImode) || gpc_reg_operand (operands[1], TImode))" "* @@ -8664,14 +8638,15 @@ return \"{lsi|lswi} %0,%P1,16\"; /* ... fall through ... */ case 4: + case 5: return \"#\"; } }" - [(set_attr "type" "store,store,*,load,load")]) + [(set_attr "type" "store,store,*,load,load,*")]) (define_insn "*movti_string" - [(set (match_operand:TI 0 "reg_or_mem_operand" "=Q,o<>,????r,????r,????r") - (match_operand:TI 1 "reg_or_mem_operand" "r,r,r,Q,m"))] + [(set (match_operand:TI 0 "reg_or_mem_operand" "=Q,o<>,????r,????r,????r,r") + (match_operand:TI 1 "input_operand" "r,r,r,Q,m,n"))] "! TARGET_POWER && ! TARGET_POWERPC64 && (gpc_reg_operand (operands[0], TImode) || gpc_reg_operand (operands[1], TImode))" "* @@ -8694,10 +8669,11 @@ return \"{lsi|lswi} %0,%P1,16\"; /* ... fall through ... */ case 4: + case 5: return \"#\"; } }" - [(set_attr "type" "store,store,*,load,load")]) + [(set_attr "type" "store,store,*,load,load,*")]) (define_insn "*movti_ppc64" [(set (match_operand:TI 0 "nonimmediate_operand" "=r,o<>,r") @@ -8708,6 +8684,32 @@ [(set_attr "type" "*,load,store")]) (define_split + [(set (match_operand:TI 0 "gpc_reg_operand" "") + (match_operand:TI 1 "const_double_operand" ""))] + "TARGET_POWERPC64" + [(set (match_dup 2) (match_dup 4)) + (set (match_dup 3) (match_dup 5))] + " +{ + operands[2] = operand_subword_force (operands[0], WORDS_BIG_ENDIAN == 0, + TImode); + operands[3] = operand_subword_force (operands[0], WORDS_BIG_ENDIAN != 0, + TImode); + if (GET_CODE (operands[1]) == CONST_DOUBLE) + { + operands[4] = GEN_INT (CONST_DOUBLE_HIGH (operands[1])); + operands[5] = GEN_INT (CONST_DOUBLE_LOW (operands[1])); + } + else if (GET_CODE (operands[1]) == CONST_INT) + { + operands[4] = GEN_INT (- (INTVAL (operands[1]) < 0)); + operands[5] = operands[1]; + } + else + FAIL; +}") + +(define_split [(set (match_operand:TI 0 "nonimmediate_operand" "") (match_operand:TI 1 "input_operand" ""))] "reload_completed |