summaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2017-08-30 11:14:59 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2017-08-30 11:14:59 +0000
commit54fea56dec23eb917e4b8c9bd1440a56ac9560dd (patch)
treed8955268a1ac99ffbf94233ae93e5a60a4f5595a /gcc/combine.c
parent1572c088a7b153007f76b9626b20a355597b5693 (diff)
downloadgcc-54fea56dec23eb917e4b8c9bd1440a56ac9560dd.tar.gz
[40/77] Use scalar_int_mode for extraction_insn fields
insv, extv and eztzv modify or read a field in a register or memory. The field always has a scalar integer mode, while the register or memory either has a scalar integer mode or BLKmode. The mode of the bit position is also a scalar integer. This patch uses the type system to make that explicit. 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org> Alan Hayward <alan.hayward@arm.com> David Sherwood <david.sherwood@arm.com> gcc/ * optabs-query.h (extraction_insn::struct_mode): Change type to opt_scalar_int_mode and update comment. (extraction_insn::field_mode): Change type to scalar_int_mode. (extraction_insn::pos_mode): Likewise. * combine.c (make_extraction): Update accordingly. * optabs-query.c (get_traditional_extraction_insn): Likewise. (get_optab_extraction_insn): Likewise. * recog.c (simplify_while_replacing): Likewise. * expmed.c (narrow_bit_field_mem): Change the type of the mode parameter to opt_scalar_int_mode. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@251492 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index 930c0e5d277..25e68313167 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -7619,7 +7619,7 @@ make_extraction (machine_mode mode, rtx inner, HOST_WIDE_INT pos,
if (get_best_reg_extraction_insn (&insn, pattern,
GET_MODE_BITSIZE (inner_mode), mode))
{
- wanted_inner_reg_mode = insn.struct_mode;
+ wanted_inner_reg_mode = insn.struct_mode.require ();
pos_mode = insn.pos_mode;
extraction_mode = insn.field_mode;
}