[25/77] Use is_a <scalar_int_mode> for bitmask optimisations
authorRichard Sandiford <richard.sandiford@linaro.org>
Wed, 30 Aug 2017 11:11:32 +0000 (11:11 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Wed, 30 Aug 2017 11:11:32 +0000 (11:11 +0000)
commit7c61657f68cc45bdbbfcfd762dbfd7021f3acb3f
tree983ecb0098267a20b4cb1756c1fd29aebe17c9bd
parent64ab8765d7e45ed19d4a571b2aaba0abf7f834c3
[25/77] Use is_a <scalar_int_mode> for bitmask optimisations

Explicitly check for scalar_int_mode in code that maps arithmetic
to full-mode bit operations.  These operations wouldn't work correctly
for vector modes, for example.  In many cases this is enforced also by
checking whether an operand is CONST_INT_P, but there were other cases
where the condition is more indirect.

2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
    Alan Hayward  <alan.hayward@arm.com>
    David Sherwood  <david.sherwood@arm.com>

gcc/
* combine.c (combine_simplify_rtx): Add checks for
is_a <scalar_int_mode>.
(simplify_if_then_else): Likewise.
(make_field_assignment): Likewise.
(simplify_comparison): Likewise.
* ifcvt.c (noce_try_bitop): Likewise.
* loop-invariant.c (canonicalize_address_mult): Likewise.
* simplify-rtx.c (simplify_unary_operation_1): Likewise.

Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r251477
gcc/ChangeLog
gcc/combine.c
gcc/ifcvt.c
gcc/loop-invariant.c
gcc/simplify-rtx.c