aboutsummaryrefslogtreecommitdiff
path: root/gcc/rtl.h
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2018-11-20 08:59:30 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2018-11-20 08:59:30 +0000
commit643427d70f7a547a1db8a8492a6a124ff22c0d3a (patch)
treee254592484859d6e99362a4041f1d06658035748 /gcc/rtl.h
parent07b9f1de1ea532a66d8ac103f3a9827521d780f9 (diff)
downloadgcc-643427d70f7a547a1db8a8492a6a124ff22c0d3a.zip
gcc-643427d70f7a547a1db8a8492a6a124ff22c0d3a.tar.gz
gcc-643427d70f7a547a1db8a8492a6a124ff22c0d3a.tar.bz2
re PR rtl-optimization/85925 (compilation of masking with 257 goes wrong in combine at -02)
PR rtl-optimization/85925 * rtl.h (word_register_operation_p): New predicate. * combine.c (record_dead_and_set_regs_1): Only apply specific handling for WORD_REGISTER_OPERATIONS targets to word_register_operation_p RTX. * rtlanal.c (nonzero_bits1): Likewise. Adjust couple of comments. (num_sign_bit_copies1): Likewise. From-SVN: r266302
Diffstat (limited to 'gcc/rtl.h')
-rw-r--r--gcc/rtl.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/rtl.h b/gcc/rtl.h
index 68d3cea..4114cd0 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -4374,6 +4374,25 @@ strip_offset_and_add (rtx x, poly_int64_pod *offset)
return x;
}
+/* Return true if X is an operation that always operates on the full
+ registers for WORD_REGISTER_OPERATIONS architectures. */
+
+inline bool
+word_register_operation_p (const_rtx x)
+{
+ switch (GET_CODE (x))
+ {
+ case ROTATE:
+ case ROTATERT:
+ case SIGN_EXTRACT:
+ case ZERO_EXTRACT:
+ return false;
+
+ default:
+ return true;
+ }
+}
+
/* gtype-desc.c. */
extern void gt_ggc_mx (rtx &);
extern void gt_pch_nx (rtx &);