diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2017-05-17 17:01:07 +0200 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2017-05-17 17:01:07 +0200 |
commit | 81ad201ac5f609fb1f294b36045f4e3bfcb33695 (patch) | |
tree | 0b4d9747254c1a08d9ad6d9f2eb3bc873abf93d9 | |
parent | 9853cb287243f9f3555b0c60a3b0d27998fe23b1 (diff) | |
download | gcc-81ad201ac5f609fb1f294b36045f4e3bfcb33695.zip gcc-81ad201ac5f609fb1f294b36045f4e3bfcb33695.tar.gz gcc-81ad201ac5f609fb1f294b36045f4e3bfcb33695.tar.bz2 |
md.texi (Canonicalization of Instructions): Describe the canonical form of instructions that inherently set a condition...
* doc/md.texi (Canonicalization of Instructions): Describe the
canonical form of instructions that inherently set a condition
code register.
From-SVN: r248156
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/doc/md.texi | 19 |
2 files changed, 25 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 004c7bb..068ddd9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-05-17 Uros Bizjak <ubizjak@gmail.com> + + * doc/md.texi (Canonicalization of Instructions): Describe the + canonical form of instructions that inherently set a condition + code register. + 2017-05-17 Peter Bergner <bergner@vnet.ibm.com> PR middle-end/80775 diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi index dde3644..e3dacea 100644 --- a/gcc/doc/md.texi +++ b/gcc/doc/md.texi @@ -7258,6 +7258,25 @@ For the @code{compare} operator, a constant is always the second operand if the first argument is a condition code register or @code{(cc0)}. @item +For instructions that inherently set a condition code register, the +@code{compare} operator is always written as the first RTL expression of +the @code{parallel} instruction pattern. For example, + +@smallexample +(define_insn "" + [(set (reg:CCZ FLAGS_REG) + (compare:CCZ + (plus:SI + (match_operand:SI 1 "register_operand" "%r") + (match_operand:SI 2 "register_operand" "r")) + (const_int 0))) + (set (match_operand:SI 0 "register_operand" "=r") + (plus:SI (match_dup 1) (match_dup 2)))] + "" + "addl %0, %1, %2") +@end smallexample + +@item An operand of @code{neg}, @code{not}, @code{mult}, @code{plus}, or @code{minus} is made the first operand under the same conditions as above. |