diff options
author | Wilco Dijkstra <wdijkstr@arm.com> | 2019-09-19 16:51:08 +0000 |
---|---|---|
committer | Wilco Dijkstra <wilco@gcc.gnu.org> | 2019-09-19 16:51:08 +0000 |
commit | 40858b9dfb72960bff5978b1441d0f2d21ae55ba (patch) | |
tree | 60628ffd2360ca154270d186306b7f9d8304b033 /gcc/config | |
parent | 9f576d304d65c184572a6f8ce7541196e5da5c1c (diff) | |
download | gcc-40858b9dfb72960bff5978b1441d0f2d21ae55ba.zip gcc-40858b9dfb72960bff5978b1441d0f2d21ae55ba.tar.gz gcc-40858b9dfb72960bff5978b1441d0f2d21ae55ba.tar.bz2 |
[ARM] Simplify logical DImode iterators
Further simplify the logical DImode expander using code iterator and
obtab attributes. This avoids adding unnecessary code_attr entries.
gcc/
* config/arm/arm.md (<logical_op>di3): Use <optab> and <CODE>.
* config/arm/iterators.md (optab): Add and, ior, xor entries.
(logical_op): Remove code attribute.
(logical_OP): Likewise.
From-SVN: r275970
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/arm/arm.md | 8 | ||||
-rw-r--r-- | gcc/config/arm/iterators.md | 12 |
2 files changed, 12 insertions, 8 deletions
diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md index d54082b..d607f88 100644 --- a/gcc/config/arm/arm.md +++ b/gcc/config/arm/arm.md @@ -2039,16 +2039,16 @@ ; operands or complex immediates, which leads to fewer LDRD/STRD instructions. ; So an explicit expander is needed to generate better code. -(define_expand "<logical_op>di3" +(define_expand "<LOGICAL:optab>di3" [(set (match_operand:DI 0 "s_register_operand") (LOGICAL:DI (match_operand:DI 1 "s_register_operand") - (match_operand:DI 2 "arm_<logical_op>di_operand")))] + (match_operand:DI 2 "arm_<optab>di_operand")))] "TARGET_32BIT" { - rtx low = simplify_gen_binary (<logical_OP>, SImode, + rtx low = simplify_gen_binary (<CODE>, SImode, gen_lowpart (SImode, operands[1]), gen_lowpart (SImode, operands[2])); - rtx high = simplify_gen_binary (<logical_OP>, SImode, + rtx high = simplify_gen_binary (<CODE>, SImode, gen_highpart (SImode, operands[1]), gen_highpart_mode (SImode, DImode, operands[2])); diff --git a/gcc/config/arm/iterators.md b/gcc/config/arm/iterators.md index 5e3299e..2d8ef3f 100644 --- a/gcc/config/arm/iterators.md +++ b/gcc/config/arm/iterators.md @@ -287,9 +287,6 @@ (define_code_attr vfml_op [(plus "a") (minus "s")]) -(define_code_attr logical_op [(ior "ior") (xor "xor") (and "and")]) -(define_code_attr logical_OP [(ior "IOR") (xor "XOR") (and "AND")]) - ;;---------------------------------------------------------------------------- ;; Int iterators ;;---------------------------------------------------------------------------- @@ -797,7 +794,14 @@ (umax "u")]) (define_code_attr cnb [(ltu "CC_C") (geu "CC")]) -(define_code_attr optab [(ltu "ltu") (geu "geu")]) + +;; Map rtl operator codes to optab names +(define_code_attr optab + [(ltu "ltu") + (geu "geu") + (and "and") + (ior "ior") + (xor "xor")]) ;; Assembler mnemonics for signedness of widening operations. (define_code_attr US [(sign_extend "s") (zero_extend "u")]) |