diff options
author | Adam Nemet <anemet@caviumnetworks.com> | 2006-01-26 10:16:13 +0000 |
---|---|---|
committer | Adam Nemet <nemet@gcc.gnu.org> | 2006-01-26 10:16:13 +0000 |
commit | 5e922d66a7351e37cda6a0e2c587e6844ea6d0c9 (patch) | |
tree | 4c98e2c5c41e071026f05ab70f6ee871b9e95cd7 /gcc/config/mips | |
parent | 0a484e3e5e33fe59d8b9de3cdcb1b4247d50063a (diff) | |
download | gcc-5e922d66a7351e37cda6a0e2c587e6844ea6d0c9.zip gcc-5e922d66a7351e37cda6a0e2c587e6844ea6d0c9.tar.gz gcc-5e922d66a7351e37cda6a0e2c587e6844ea6d0c9.tar.bz2 |
* config/mips/mips.md (*clear_upper32): New combiner pattern.
From-SVN: r110250
Diffstat (limited to 'gcc/config/mips')
-rw-r--r-- | gcc/config/mips/mips.md | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md index b0ceff8..af8f709 100644 --- a/gcc/config/mips/mips.md +++ b/gcc/config/mips/mips.md @@ -2332,6 +2332,31 @@ (set_attr "mode" "DI") (set_attr "length" "8,*")]) +;; Combine is not allowed to convert this insn into a zero_extendsidi2 +;; because of TRULY_NOOP_TRUNCATION. + +(define_insn_and_split "*clear_upper32" + [(set (match_operand:DI 0 "register_operand" "=d,d") + (and:DI (match_operand:DI 1 "nonimmediate_operand" "d,o") + (const_int 4294967295)))] + "TARGET_64BIT" +{ + if (which_alternative == 0) + return "#"; + + operands[1] = gen_lowpart (SImode, operands[1]); + return "lwu\t%0,%1"; +} + "&& reload_completed && REG_P (operands[1])" + [(set (match_dup 0) + (ashift:DI (match_dup 1) (const_int 32))) + (set (match_dup 0) + (lshiftrt:DI (match_dup 0) (const_int 32)))] + "" + [(set_attr "type" "multi,load") + (set_attr "mode" "DI") + (set_attr "length" "8,*")]) + (define_expand "zero_extend<SHORT:mode><GPR:mode>2" [(set (match_operand:GPR 0 "register_operand") (zero_extend:GPR (match_operand:SHORT 1 "nonimmediate_operand")))] |