aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2019-02-17 13:31:41 +1030
committerAlan Modra <amodra@gcc.gnu.org>2019-02-17 13:31:41 +1030
commitb43e6340c80f3ae0ddf70950a8f979f4791c3252 (patch)
tree00a6af16f2f87c43d25a204f0fea948fb98a215c /gcc
parentb8cc38153be3d00b158d92251d8cea92a75669fe (diff)
downloadgcc-b43e6340c80f3ae0ddf70950a8f979f4791c3252.zip
gcc-b43e6340c80f3ae0ddf70950a8f979f4791c3252.tar.gz
gcc-b43e6340c80f3ae0ddf70950a8f979f4791c3252.tar.bz2
[RS6000] Fix <bd>_<mode> and <bd>tf_<mode> splitters
This patch fixes a bug that can result in "insn does not satisfy its constraints" if these splitters fire due to not getting ctr for the jump insn. Since the jump insn can have any of r,m,d,wi,c,l as the decremented count output, it's not sufficient to check for gpc_reg_operand (which matches VSX regs for example). Seen after correcting register_move_cost when the cost of gpr <-> vsx is much lower. Since this is a prerequisite to fixing PR89271, I'm mentioning that PR in the ChangeLog. The <bd>tf_<mode> split had a further bug in that it wouldn't match if the count output was m,d,wi, or l. PR target/89271 * config/rs6000/rs6000.md (<bd>_<mode> split): Check for an int output reg on add insn. (<bd>tf_<mode> split): Likewise. Match predicates with insn. From-SVN: r268968
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/rs6000/rs6000.md6
2 files changed, 10 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d80e4f4..74f96a2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2019-02-17 Alan Modra <amodra@gmail.com>
+
+ PR target/89271
+ * config/rs6000/rs6000.md (<bd>_<mode> split): Check for an int
+ output reg on add insn.
+ (<bd>tf_<mode> split): Likewise. Match predicates with insn.
+
2019-02-16 H.J. Lu <hongjiu.lu@intel.com>
PR target/89372
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index 5bca96b..584b9da 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -12588,7 +12588,7 @@
const0_rtx);
emit_insn (gen_rtx_SET (operands[3],
gen_rtx_COMPARE (CCmode, operands[1], const1_rtx)));
- if (gpc_reg_operand (operands[0], <MODE>mode))
+ if (int_reg_operand (operands[0], <MODE>mode))
emit_insn (gen_add<mode>3 (operands[0], operands[1], constm1_rtx));
else
{
@@ -12666,7 +12666,7 @@
(const_int 0)]))
(match_operand 4)
(match_operand 5)))
- (set (match_operand:P 6 "int_reg_operand")
+ (set (match_operand:P 6 "nonimmediate_operand")
(plus:P (match_dup 0)
(const_int -1)))
(clobber (match_scratch:P 7))
@@ -12699,7 +12699,7 @@
else
emit_insn (gen_cceq_ior_compare_complement (operands[9], andexpr, ctrcmpcc,
operands[8], cccmp, ccin));
- if (gpc_reg_operand (operands[0], <MODE>mode))
+ if (int_reg_operand (ctrout, <MODE>mode))
emit_insn (gen_add<mode>3 (ctrout, ctr, constm1_rtx));
else
{