aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorSegher Boessenkool <segher@kernel.crashing.org>2020-07-16 23:42:46 +0000
committerSegher Boessenkool <segher@kernel.crashing.org>2020-07-16 23:52:19 +0000
commit84c5396d4bdbf9f1d628c77db4421808f9a9dcb6 (patch)
treed8b90253c8628a4420bc10e45a6e00e4cd99088a /gcc/combine.c
parent39dda0020801045d9a604575b2a2593c05310015 (diff)
downloadgcc-84c5396d4bdbf9f1d628c77db4421808f9a9dcb6.zip
gcc-84c5396d4bdbf9f1d628c77db4421808f9a9dcb6.tar.gz
gcc-84c5396d4bdbf9f1d628c77db4421808f9a9dcb6.tar.bz2
combine: Use single_set for is_just_move
Since we now only call is_just_move on the original instructions, we always have an rtx_insn* (not just a pattern), so we can use single_set on it. This makes no detectable difference at all on all thirty Linux targets I test, but it does help cris, and it is simpler, cleaner code anyway. 2020-07-16 Hans-Peter Nilsson <hp@axis.com> Segher Boessenkool <segher@kernel.crashing.org> PR target/93372 * combine.c (is_just_move): Take an rtx_insn* as argument. Use single_set on it.
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index b044f29..4fee114 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -2624,15 +2624,16 @@ can_split_parallel_of_n_reg_sets (rtx_insn *insn, int n)
return true;
}
-/* Return whether X is just a single set, with the source
+/* Return whether X is just a single_set, with the source
a general_operand. */
static bool
-is_just_move (rtx x)
+is_just_move (rtx_insn *x)
{
- if (INSN_P (x))
- x = PATTERN (x);
+ rtx set = single_set (x);
+ if (!set)
+ return false;
- return (GET_CODE (x) == SET && general_operand (SET_SRC (x), VOIDmode));
+ return general_operand (SET_SRC (set), VOIDmode);
}
/* Callback function to count autoincs. */