+ case TRUTH_AND_EXPR:
+ case TRUTH_OR_EXPR:
+ case TRUTH_XOR_EXPR:
+ {
+ tree orig_type = TREE_TYPE (*expr_p);
+ tree new_type, xop0, xop1;
+ *expr_p = gimple_boolify (*expr_p);
+ new_type = TREE_TYPE (*expr_p);
+ if (!useless_type_conversion_p (orig_type, new_type))
+ {
+ *expr_p = fold_convert_loc (input_location, orig_type, *expr_p);
+ ret = GS_OK;
+ break;
+ }
+
+ /* Boolified binary truth expressions are semantically equivalent
+ to bitwise binary expressions. Canonicalize them to the
+ bitwise variant. */
+ switch (TREE_CODE (*expr_p))
+ {
+ case TRUTH_AND_EXPR:
+ TREE_SET_CODE (*expr_p, BIT_AND_EXPR);
+ break;
+ case TRUTH_OR_EXPR:
+ TREE_SET_CODE (*expr_p, BIT_IOR_EXPR);
+ break;
+ case TRUTH_XOR_EXPR:
+ TREE_SET_CODE (*expr_p, BIT_XOR_EXPR);
+ break;
+ default:
+ break;
+ }
+ /* Now make sure that operands have compatible type to
+ expression's new_type. */
+ xop0 = TREE_OPERAND (*expr_p, 0);
+ xop1 = TREE_OPERAND (*expr_p, 1);
+ if (!useless_type_conversion_p (new_type, TREE_TYPE (xop0)))
+ TREE_OPERAND (*expr_p, 0) = fold_convert_loc (input_location,
+ new_type,
+ xop0);
+ if (!useless_type_conversion_p (new_type, TREE_TYPE (xop1)))
+ TREE_OPERAND (*expr_p, 1) = fold_convert_loc (input_location,
+ new_type,
+ xop1);
+ /* Continue classified as tcc_binary. */
+ goto expr_2;
+ }
+
+ case FMA_EXPR:
+ case VEC_PERM_EXPR:
+ /* Classified as tcc_expression. */
+ goto expr_3;
+