Do not simplify "(and (reg) (const bit)" to if_then_else.
commitc95f3fa2db12f22bbb2158d18c95f6714b4292b8
authorkrebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 2 Dec 2016 08:32:40 +0000 (2 08:32 +0000)
committerkrebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 2 Dec 2016 08:32:40 +0000 (2 08:32 +0000)
treeddc0071ca81fc7ce09f2f6ea86ba05f4df56fc4b
parentb22eef955541a728a906af02f16fc64e9055c3d8
Do not simplify "(and (reg) (const bit)" to if_then_else.

combine_simplify_rtx() tries to replace rtx expressions with just two
possible values with an experession that uses if_then_else:

  (if_then_else (condition) (value1) (value2))

If the original expression is e.g.

  (and (reg) (const_int 2))

where the constant is the mask for a single bit, the replacement results
in a more complex expression than before:

  (if_then_else (ne (zero_extract (reg) (1) (31))) (2) (0))

Similar replacements are done for

  (signextend (and ...))
  (zeroextend (and ...))

Suppress the replacement this special case in if_then_else_cond().

gcc/ChangeLog:

2016-12-02  Dominik Vogt  <vogt@linux.vnet.ibm.com>

* combine.c (combine_simplify_rtx):  Suppress replacement of
"(and (reg) (const_int bit))" with "if_then_else".

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@243162 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/combine.c