From patchwork Tue Dec 8 06:15:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Law X-Patchwork-Id: 553812 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id B361D140213 for ; Tue, 8 Dec 2015 17:16:13 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=cqMM/czH; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=gXHVpSTdD01cpy91223gHoIAokNt1tHo9ENyPtfiT2MClL+9mj 3RJo3BB5t2zYUAGJFjEfMtv/mIaKdnQFrIvbbYK7vkqEMgj/acMsqJ8Ok0PkRgw2 Gh45sRLhVJ8iiDc9bpHUi8ByG3F94tt0mveEkyrZyweMUYSJLCZqEw4tQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=mNt/OOuP/j5NzU+A6h6e15w8W/0=; b=cqMM/czHtrOoUGDAnbbl O+HzVMMGpiWTh/hEiLvZq+Q892gAFRsa3Ixaj9fprKiQRiahBfic0A5aZJMJ7HJq KMqWkgPwCy0sy0FivPxKSgu4P5LUukFUUemXOj4gJrAzyFwZ1uNE5FNyhuxhi3Hl DJiAvHGwyGqdvI9Nw/IimYA= Received: (qmail 90195 invoked by alias); 8 Dec 2015 06:16:01 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 90083 invoked by uid 89); 8 Dec 2015 06:16:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL, BAYES_20, SPF_HELO_PASS, T_RP_MATCHES_RCVD, UPPERCASE_50_75 autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 08 Dec 2015 06:15:45 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 29DCD219E for ; Tue, 8 Dec 2015 06:15:44 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-32.phx2.redhat.com [10.3.113.32]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tB86FhE0023107 for ; Tue, 8 Dec 2015 01:15:43 -0500 To: gcc-patches From: Jeff Law Subject: [RFA] [PATCH] [PR tree-optimization/68619] Avoid direct cfg cleanups in tree-ssa-dom.c [3/3] Message-ID: <5666758F.80800@redhat.com> Date: Mon, 7 Dec 2015 23:15:43 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 X-IsSubscribed: yes And testcases. One from the BZ. Two ICEs that showed up during development, one case where we optimize better now than before, and one case where we missed an optimization during development that's since been fixed. commit f5b74ee83944177f0a1b98ca577343e45aa35584 Author: Jeff Law Date: Mon Dec 7 22:43:53 2015 -0700 PR tree-optimization/68619 * gcc.dg/tree-ssa/pr68619-1.c: New test. * gcc.dg/tree-ssa/pr68619-2.c: New test. * gcc.dg/tree-ssa/pr68619-3.c: New test. * gcc.dg/tree-ssa/pr68619-4.c: New test. * gcc.dg/tree-ssa/pr68619-5.c: New test. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4b1b1a3..0cb09e1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2015-12-05 Jeff Law + + PR tree-optimization/68619 + * gcc.dg/tree-ssa/pr68619-1.c: New test. + * gcc.dg/tree-ssa/pr68619-2.c: New test. + * gcc.dg/tree-ssa/pr68619-3.c: New test. + * gcc.dg/tree-ssa/pr68619-4.c: New test. + * gcc.dg/tree-ssa/pr68619-5.c: New test. + 2015-12-02 Jeff Law * gcc.dg/tree-ssa/reassoc-43.c: New test. diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr68619-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pr68619-1.c new file mode 100644 index 0000000..3e988de --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr68619-1.c @@ -0,0 +1,20 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -w" } */ + +extern void fn2(int); +int a, b, c; +void fn1() { + int d; + for (; b; b++) { + a = 7; + for (; a;) { + jump: + fn2(d ?: c); + d = 0; + } + d = c; + if (c) + goto jump; + } + goto jump; +} diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr68619-2.c b/gcc/testsuite/gcc.dg/tree-ssa/pr68619-2.c new file mode 100644 index 0000000..cca706e --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr68619-2.c @@ -0,0 +1,92 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-dom2-details -w" } */ + +typedef union tree_node *tree; +struct gcc_options +{ + int x_flag_finite_math_only; +}; +extern struct gcc_options global_options; +enum mode_class +{ MODE_RANDOM, MODE_CC, MODE_INT, MODE_PARTIAL_INT, MODE_FRACT, MODE_UFRACT, + MODE_ACCUM, MODE_UACCUM, MODE_FLOAT, MODE_DECIMAL_FLOAT, MODE_COMPLEX_INT, + MODE_COMPLEX_FLOAT, MODE_VECTOR_INT, MODE_VECTOR_FRACT, + MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM, + MODE_VECTOR_FLOAT, MAX_MODE_CLASS +}; +extern const unsigned char mode_class[27]; +extern const unsigned char mode_inner[27]; +struct real_value +{ +}; +struct real_format +{ + unsigned char has_inf; +}; +extern const struct real_format *real_format_for_mode[5 - + 2 + 1 + 15 - 10 + 1]; +struct tree_type +{ +}; +union tree_node +{ + int code; + int mode; + struct tree_type type; +}; +tree +omp_reduction_init (tree clause, tree type) +{ + if ((((type)->code) == 64)) + { + struct real_value max; + if (((((mode_class[((((type))->code) == + 32 ? + vector_type_mode (type) + : (type)->mode)]) == + MODE_VECTOR_FLOAT) + && + ((real_format_for_mode + [((mode_class[((mode_class[((((type))->code) == + 32 ? + vector_type_mode (type) + : (type)->mode)]) == + 12) ? (((((type))->code) + == + 32 ? + vector_type_mode + (type) + : (type)->mode)) + : (mode_inner[((((type))->code) == + 32 ? + vector_type_mode (type) + : (type)->mode)])]) == + 12) + ? (((((mode_class[((((type))->code) == + 32 ? vector_type_mode (type) + : (type)->mode)]) == + 12) ? (((((type))->code) == + 32 ? + vector_type_mode (type) + : (type)->mode)) : (mode_inner + [((((type))->code) == + 32 ? + vector_type_mode (type) + : (type)->mode)])) - 10) + + (5 - 2 + + 1)) + : ((((mode_class + [((((type))->code) == + 32 ? vector_type_mode (type) : (type)->mode)]) == + 12) ? (((((type))->code) == + 32 ? vector_type_mode (type) : (type)-> + mode)) : (mode_inner[((((type))->code) == + 32 ? vector_type_mode (type) + : (type)->mode)])) - + 2)]))->has_inf) && !global_options.x_flag_finite_math_only)) + real_inf (&max); + } +} + +/* { dg-final { scan-tree-dump "Marking all outgoing edges of unreachable" "dom2"} } */ + diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr68619-3.c b/gcc/testsuite/gcc.dg/tree-ssa/pr68619-3.c new file mode 100644 index 0000000..3548725 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr68619-3.c @@ -0,0 +1,26 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -w" } */ +typedef unsigned int hashval_t; +enum ETYPE +{ + ETYPE_ARRAY, ETYPE_STRUCT, ETYPE_UNION, +}; +struct entry +{ + enum ETYPE etype:8; + unsigned short len; + const char *attrib; +}; +e_hash (const void *a) +{ + const struct entry *e = a; + hashval_t ret = 0; + int i; + if (e[0].etype != ETYPE_STRUCT && e[0].etype != ETYPE_UNION) + abort (); + for (i = 0; i <= e[0].len; ++i) + { + ret = iterative_hash (&e[i], __builtin_offsetof (struct entry, attrib), ret); + } + return ret; +} diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr68619-4.c b/gcc/testsuite/gcc.dg/tree-ssa/pr68619-4.c new file mode 100644 index 0000000..da3cdb9 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr68619-4.c @@ -0,0 +1,94 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-optimized -w" } */ + +typedef struct rtx_def *rtx; +enum rtx_code +{ + UNKNOWN, VALUE, DEBUG_EXPR, EXPR_LIST, INSN_LIST, SEQUENCE, ADDRESS, + DEBUG_INSN, INSN, JUMP_INSN, CALL_INSN, BARRIER, CODE_LABEL, NOTE, + COND_EXEC, PARALLEL, ASM_INPUT, ASM_OPERANDS, UNSPEC, UNSPEC_VOLATILE, + ADDR_VEC, ADDR_DIFF_VEC, PREFETCH, SET, USE, CLOBBER, CALL, RETURN, + EH_RETURN, TRAP_IF, CONST_INT, CONST_FIXED, CONST_DOUBLE, CONST_VECTOR, + CONST_STRING, CONST, PC, REG, SCRATCH, SUBREG, STRICT_LOW_PART, CONCAT, + CONCATN, MEM, LABEL_REF, SYMBOL_REF, CC0, IF_THEN_ELSE, COMPARE, PLUS, + MINUS, NEG, MULT, SS_MULT, US_MULT, DIV, SS_DIV, US_DIV, MOD, UDIV, UMOD, + AND, IOR, XOR, NOT, ASHIFT, ROTATE, ASHIFTRT, LSHIFTRT, ROTATERT, SMIN, + SMAX, UMIN, UMAX, PRE_DEC, PRE_INC, POST_DEC, POST_INC, PRE_MODIFY, + POST_MODIFY, NE, EQ, GE, GT, LE, LT, GEU, GTU, LEU, LTU, UNORDERED, + ORDERED, UNEQ, UNGE, UNGT, UNLE, UNLT, LTGT, SIGN_EXTEND, ZERO_EXTEND, + TRUNCATE, FLOAT_EXTEND, FLOAT_TRUNCATE, FLOAT, FIX, UNSIGNED_FLOAT, + UNSIGNED_FIX, FRACT_CONVERT, UNSIGNED_FRACT_CONVERT, SAT_FRACT, + UNSIGNED_SAT_FRACT, ABS, SQRT, BSWAP, FFS, CLZ, CTZ, POPCOUNT, PARITY, + SIGN_EXTRACT, ZERO_EXTRACT, HIGH, LO_SUM, VEC_MERGE, VEC_SELECT, + VEC_CONCAT, VEC_DUPLICATE, SS_PLUS, US_PLUS, SS_MINUS, SS_NEG, US_NEG, + SS_ABS, SS_ASHIFT, US_ASHIFT, US_MINUS, SS_TRUNCATE, US_TRUNCATE, FMA, + VAR_LOCATION, DEBUG_IMPLICIT_PTR, ENTRY_VALUE, LAST_AND_UNUSED_RTX_CODE +}; +enum rtx_class +{ + RTX_COMPARE, RTX_COMM_COMPARE, RTX_BIN_ARITH, RTX_COMM_ARITH, RTX_UNARY, + RTX_EXTRA, RTX_MATCH, RTX_INSN, RTX_OBJ, RTX_CONST_OBJ, RTX_TERNARY, + RTX_BITFIELD_OPS, RTX_AUTOINC +}; +extern const unsigned char rtx_length[((int) LAST_AND_UNUSED_RTX_CODE)]; +extern const enum rtx_class rtx_class[((int) LAST_AND_UNUSED_RTX_CODE)]; +union rtunion_def +{ + rtx rt_rtx; +}; +typedef union rtunion_def rtunion; +struct rtx_def +{ + enum rtx_code code:16; + union u + { + rtunion fld[1]; + } + u; +}; +struct cse_reg_info +{ + unsigned int timestamp; + int reg_qty; + int reg_tick; + int reg_in_table; + unsigned int subreg_ticked; +}; +static struct cse_reg_info *cse_reg_info_table; +static unsigned int cse_reg_info_timestamp; + +static __inline__ struct cse_reg_info * +get_cse_reg_info (unsigned int regno) +{ + struct cse_reg_info *p = &cse_reg_info_table[regno]; + if (p->timestamp != cse_reg_info_timestamp) + cse_reg_info_table[regno].timestamp = cse_reg_info_timestamp; +} + +int +mention_regs (rtx x) +{ + enum rtx_code code; + int i, j; + const char *fmt; + int changed = 0; + code = ((x)->code); + if (code == SUBREG + && ((((((x)->u.fld[0]).rt_rtx))->code) == REG)) + { + (get_cse_reg_info (i)->reg_in_table) = (get_cse_reg_info (i)->reg_tick); + (get_cse_reg_info (i)->subreg_ticked) = + (rhs_regno ((((x)->u.fld[0]).rt_rtx))); + } + if ((((rtx_class[(int) (((x)->code))]) & (~1)) == (RTX_COMPARE & (~1)))) + { + if (((((((x)->u.fld[0]).rt_rtx))->code) == REG)) + foop (); + } + for (i = (rtx_length[(int) (code)]) - 1; i >= 0; i--) + arf (); +} + +/* Make sure the constant 39 gets propagated into the PHI at the join point. */ +/* { dg-final { scan-tree-dump "PHI <.*, 39" "optimized"} } */ + diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr68619-5.c b/gcc/testsuite/gcc.dg/tree-ssa/pr68619-5.c new file mode 100644 index 0000000..7eee1b8 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr68619-5.c @@ -0,0 +1,172 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -w" } */ +typedef union tree_node *tree; +typedef union gimple_statement_d *gimple; +enum machine_mode +{ VOIDmode, BLKmode, CCmode, CCGCmode, CCGOCmode, CCNOmode, CCAmode, CCCmode, + CCOmode, CCSmode, CCZmode, CCFPmode, CCFPUmode, BImode, QImode, HImode, + SImode, DImode, TImode, OImode, QQmode, HQmode, SQmode, DQmode, TQmode, + UQQmode, UHQmode, USQmode, UDQmode, UTQmode, HAmode, SAmode, DAmode, + TAmode, UHAmode, USAmode, UDAmode, UTAmode, SFmode, DFmode, XFmode, + TFmode, SDmode, DDmode, TDmode, CQImode, CHImode, CSImode, CDImode, + CTImode, COImode, SCmode, DCmode, XCmode, TCmode, V2QImode, V4QImode, + V2HImode, V1SImode, V8QImode, V4HImode, V2SImode, V1DImode, V16QImode, + V8HImode, V4SImode, V2DImode, V1TImode, V32QImode, V16HImode, V8SImode, + V4DImode, V2TImode, V64QImode, V32HImode, V16SImode, V8DImode, V4TImode, + V2SFmode, V4SFmode, V2DFmode, V8SFmode, V4DFmode, V2TFmode, V16SFmode, + V8DFmode, V4TFmode, MAX_MACHINE_MODE, MIN_MODE_RANDOM = + VOIDmode, MAX_MODE_RANDOM = BLKmode, MIN_MODE_CC = CCmode, MAX_MODE_CC = + CCFPUmode, MIN_MODE_INT = QImode, MAX_MODE_INT = + OImode, MIN_MODE_PARTIAL_INT = VOIDmode, MAX_MODE_PARTIAL_INT = + VOIDmode, MIN_MODE_FRACT = QQmode, MAX_MODE_FRACT = + TQmode, MIN_MODE_UFRACT = UQQmode, MAX_MODE_UFRACT = + UTQmode, MIN_MODE_ACCUM = HAmode, MAX_MODE_ACCUM = + TAmode, MIN_MODE_UACCUM = UHAmode, MAX_MODE_UACCUM = + UTAmode, MIN_MODE_FLOAT = SFmode, MAX_MODE_FLOAT = + TFmode, MIN_MODE_DECIMAL_FLOAT = SDmode, MAX_MODE_DECIMAL_FLOAT = + TDmode, MIN_MODE_COMPLEX_INT = CQImode, MAX_MODE_COMPLEX_INT = + COImode, MIN_MODE_COMPLEX_FLOAT = SCmode, MAX_MODE_COMPLEX_FLOAT = + TCmode, MIN_MODE_VECTOR_INT = V2QImode, MAX_MODE_VECTOR_INT = + V4TImode, MIN_MODE_VECTOR_FRACT = VOIDmode, MAX_MODE_VECTOR_FRACT = + VOIDmode, MIN_MODE_VECTOR_UFRACT = VOIDmode, MAX_MODE_VECTOR_UFRACT = + VOIDmode, MIN_MODE_VECTOR_ACCUM = VOIDmode, MAX_MODE_VECTOR_ACCUM = + VOIDmode, MIN_MODE_VECTOR_UACCUM = VOIDmode, MAX_MODE_VECTOR_UACCUM = + VOIDmode, MIN_MODE_VECTOR_FLOAT = V2SFmode, MAX_MODE_VECTOR_FLOAT = + V4TFmode, NUM_MACHINE_MODES = MAX_MACHINE_MODE }; +enum mode_class +{ MODE_RANDOM, MODE_CC, MODE_INT, MODE_PARTIAL_INT, MODE_FRACT, MODE_UFRACT, + MODE_ACCUM, MODE_UACCUM, MODE_FLOAT, MODE_DECIMAL_FLOAT, MODE_COMPLEX_INT, + MODE_COMPLEX_FLOAT, MODE_VECTOR_INT, MODE_VECTOR_FRACT, + MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM, + MODE_VECTOR_FLOAT, MAX_MODE_CLASS }; +extern const unsigned char mode_class[NUM_MACHINE_MODES]; +extern const unsigned char mode_inner[NUM_MACHINE_MODES]; +struct real_format +{ + unsigned char has_nans; +}; +extern const struct real_format *real_format_for_mode[MAX_MODE_FLOAT - + MIN_MODE_FLOAT + 1 + + MAX_MODE_DECIMAL_FLOAT - + MIN_MODE_DECIMAL_FLOAT + + 1]; +enum tree_code +{ ERROR_MARK, IDENTIFIER_NODE, TREE_LIST, TREE_VEC, BLOCK, OFFSET_TYPE, + ENUMERAL_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, REAL_TYPE, POINTER_TYPE, + REFERENCE_TYPE, NULLPTR_TYPE, FIXED_POINT_TYPE, COMPLEX_TYPE, VECTOR_TYPE, + ARRAY_TYPE, RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE, VOID_TYPE, + FUNCTION_TYPE, METHOD_TYPE, LANG_TYPE, INTEGER_CST, REAL_CST, FIXED_CST, + COMPLEX_CST, VECTOR_CST, STRING_CST, FUNCTION_DECL, LABEL_DECL, + FIELD_DECL, VAR_DECL, CONST_DECL, PARM_DECL, TYPE_DECL, RESULT_DECL, + DEBUG_EXPR_DECL, NAMESPACE_DECL, IMPORTED_DECL, TRANSLATION_UNIT_DECL, + COMPONENT_REF, BIT_FIELD_REF, REALPART_EXPR, IMAGPART_EXPR, ARRAY_REF, + ARRAY_RANGE_REF, INDIRECT_REF, OBJ_TYPE_REF, CONSTRUCTOR, COMPOUND_EXPR, + MODIFY_EXPR, INIT_EXPR, TARGET_EXPR, COND_EXPR, VEC_COND_EXPR, BIND_EXPR, + CALL_EXPR, WITH_CLEANUP_EXPR, CLEANUP_POINT_EXPR, PLACEHOLDER_EXPR, + PLUS_EXPR, MINUS_EXPR, MULT_EXPR, POINTER_PLUS_EXPR, TRUNC_DIV_EXPR, + CEIL_DIV_EXPR, FLOOR_DIV_EXPR, ROUND_DIV_EXPR, TRUNC_MOD_EXPR, + CEIL_MOD_EXPR, FLOOR_MOD_EXPR, ROUND_MOD_EXPR, RDIV_EXPR, EXACT_DIV_EXPR, + FIX_TRUNC_EXPR, FLOAT_EXPR, NEGATE_EXPR, MIN_EXPR, MAX_EXPR, ABS_EXPR, + LSHIFT_EXPR, RSHIFT_EXPR, LROTATE_EXPR, RROTATE_EXPR, BIT_IOR_EXPR, + BIT_XOR_EXPR, BIT_AND_EXPR, BIT_NOT_EXPR, TRUTH_ANDIF_EXPR, + TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR, TRUTH_XOR_EXPR, + TRUTH_NOT_EXPR, LT_EXPR, LE_EXPR, GT_EXPR, GE_EXPR, EQ_EXPR, NE_EXPR, + UNORDERED_EXPR, ORDERED_EXPR, UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, + UNEQ_EXPR, LTGT_EXPR, RANGE_EXPR, PAREN_EXPR, CONVERT_EXPR, + ADDR_SPACE_CONVERT_EXPR, FIXED_CONVERT_EXPR, NOP_EXPR, NON_LVALUE_EXPR, + VIEW_CONVERT_EXPR, COMPOUND_LITERAL_EXPR, SAVE_EXPR, ADDR_EXPR, + FDESC_EXPR, COMPLEX_EXPR, CONJ_EXPR, PREDECREMENT_EXPR, PREINCREMENT_EXPR, + POSTDECREMENT_EXPR, POSTINCREMENT_EXPR, VA_ARG_EXPR, TRY_CATCH_EXPR, + TRY_FINALLY_EXPR, DECL_EXPR, LABEL_EXPR, GOTO_EXPR, RETURN_EXPR, + EXIT_EXPR, LOOP_EXPR, SWITCH_EXPR, CASE_LABEL_EXPR, ASM_EXPR, SSA_NAME, + CATCH_EXPR, EH_FILTER_EXPR, SCEV_KNOWN, SCEV_NOT_KNOWN, POLYNOMIAL_CHREC, + STATEMENT_LIST, ASSERT_EXPR, TREE_BINFO, WITH_SIZE_EXPR, + REALIGN_LOAD_EXPR, TARGET_MEM_REF, MEM_REF, OMP_PARALLEL, OMP_TASK, + OMP_FOR, OMP_SECTIONS, OMP_SINGLE, OMP_SECTION, OMP_MASTER, OMP_ORDERED, + OMP_CRITICAL, OMP_ATOMIC, OMP_CLAUSE, REDUC_MAX_EXPR, REDUC_MIN_EXPR, + REDUC_PLUS_EXPR, DOT_PROD_EXPR, WIDEN_SUM_EXPR, WIDEN_MULT_EXPR, + WIDEN_MULT_PLUS_EXPR, WIDEN_MULT_MINUS_EXPR, FMA_EXPR, VEC_LSHIFT_EXPR, + VEC_RSHIFT_EXPR, VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR, + VEC_UNPACK_HI_EXPR, VEC_UNPACK_LO_EXPR, VEC_UNPACK_FLOAT_HI_EXPR, + VEC_UNPACK_FLOAT_LO_EXPR, VEC_PACK_TRUNC_EXPR, VEC_PACK_SAT_EXPR, + VEC_PACK_FIX_TRUNC_EXPR, VEC_EXTRACT_EVEN_EXPR, VEC_EXTRACT_ODD_EXPR, + VEC_INTERLEAVE_HIGH_EXPR, VEC_INTERLEAVE_LOW_EXPR, PREDICT_EXPR, + OPTIMIZATION_NODE, TARGET_OPTION_NODE, LAST_AND_UNUSED_TREE_CODE, + C_MAYBE_CONST_EXPR, EXCESS_PRECISION_EXPR, UNCONSTRAINED_ARRAY_TYPE, + UNCONSTRAINED_ARRAY_REF, NULL_EXPR, PLUS_NOMOD_EXPR, MINUS_NOMOD_EXPR, + ATTR_ADDR_EXPR, STMT_STMT, LOOP_STMT, EXIT_STMT, OFFSET_REF, PTRMEM_CST, + NEW_EXPR, VEC_NEW_EXPR, DELETE_EXPR, VEC_DELETE_EXPR, SCOPE_REF, + MEMBER_REF, TYPE_EXPR, AGGR_INIT_EXPR, VEC_INIT_EXPR, THROW_EXPR, + EMPTY_CLASS_EXPR, BASELINK, TEMPLATE_DECL, TEMPLATE_PARM_INDEX, + TEMPLATE_TEMPLATE_PARM, TEMPLATE_TYPE_PARM, TYPENAME_TYPE, TYPEOF_TYPE, + BOUND_TEMPLATE_TEMPLATE_PARM, UNBOUND_CLASS_TEMPLATE, USING_DECL, + USING_STMT, DEFAULT_ARG, TEMPLATE_ID_EXPR, OVERLOAD, PSEUDO_DTOR_EXPR, + MODOP_EXPR, CAST_EXPR, REINTERPRET_CAST_EXPR, CONST_CAST_EXPR, + STATIC_CAST_EXPR, DYNAMIC_CAST_EXPR, DOTSTAR_EXPR, TYPEID_EXPR, + NOEXCEPT_EXPR, NON_DEPENDENT_EXPR, CTOR_INITIALIZER, TRY_BLOCK, + EH_SPEC_BLOCK, HANDLER, MUST_NOT_THROW_EXPR, CLEANUP_STMT, IF_STMT, + FOR_STMT, RANGE_FOR_STMT, WHILE_STMT, DO_STMT, BREAK_STMT, CONTINUE_STMT, + SWITCH_STMT, EXPR_STMT, TAG_DEFN, OFFSETOF_EXPR, SIZEOF_EXPR, ARROW_EXPR, + ALIGNOF_EXPR, AT_ENCODE_EXPR, STMT_EXPR, UNARY_PLUS_EXPR, STATIC_ASSERT, + TYPE_ARGUMENT_PACK, NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, + EXPR_PACK_EXPANSION, ARGUMENT_PACK_SELECT, TRAIT_EXPR, LAMBDA_EXPR, + DECLTYPE_TYPE, TEMPLATE_INFO, URSHIFT_EXPR, COMPARE_EXPR, COMPARE_L_EXPR, + COMPARE_G_EXPR, CLASS_INTERFACE_TYPE, CLASS_IMPLEMENTATION_TYPE, + CATEGORY_INTERFACE_TYPE, CATEGORY_IMPLEMENTATION_TYPE, + PROTOCOL_INTERFACE_TYPE, KEYWORD_DECL, INSTANCE_METHOD_DECL, + CLASS_METHOD_DECL, PROPERTY_DECL, MESSAGE_SEND_EXPR, CLASS_REFERENCE_EXPR, + PROPERTY_REF, MAX_TREE_CODES }; +struct tree_base +{ + enum tree_code code:16; +}; +struct tree_typed +{ + tree type; +}; +struct tree_type +{ + enum machine_mode mode:8; +}; +union tree_node +{ + struct tree_base base; + struct tree_typed typed; + struct tree_type type; +}; +enum tree_code +parse_predicate (tree cond, tree * op0, tree * op1) +{ + gimple s; + tree op; + tree type = (*(&op->typed.type)); + enum tree_code code; + return invert_tree_comparison (code, + ((((mode_class + [((((type))->base.code) == + VECTOR_TYPE ? vector_type_mode (type) + : (type)->type.mode)]) == + MODE_VECTOR_FLOAT) + && + ((real_format_for_mode + [(((enum mode_class) + mode_class[(((enum mode_class) + mode_class[((((type))-> + base. + code) == + VECTOR_TYPE ? + vector_type_mode + (type) + : (type)-> + type. + mode)]) == + MODE_DECIMAL_FLOAT) + ? (((((type))->base. + code) == + VECTOR_TYPE ? + vector_type_mode (type) + : (type)->type. + mode)) : ((enum + machine_mode) + mode_inner[((((type))->base.code) == VECTOR_TYPE ? vector_type_mode (type) : (type)->type.mode)])]) == MODE_DECIMAL_FLOAT) ? ((((((enum mode_class) mode_class[((((type))->base.code) == VECTOR_TYPE ? vector_type_mode (type) : (type)->type.mode)]) == MODE_DECIMAL_FLOAT) ? (((((type))->base.code) == VECTOR_TYPE ? vector_type_mode (type) : (type)->type.mode)) : ((enum machine_mode) mode_inner[((((type))->base.code) == VECTOR_TYPE ? vector_type_mode (type) : (type)->type.mode)])) - MIN_MODE_DECIMAL_FLOAT) + (MAX_MODE_FLOAT - MIN_MODE_FLOAT + 1)) : (((((enum mode_class) mode_class[((((type))->base.code) == VECTOR_TYPE ? vector_type_mode (type) : (type)->type.mode)]) == MODE_DECIMAL_FLOAT) ? (((((type))->base.code) == VECTOR_TYPE ? vector_type_mode (type) : (type)->type.mode)) : ((enum machine_mode) mode_inner[((((type))->base.code) == VECTOR_TYPE ? vector_type_mode (type) : (type)->type.mode)])) - MIN_MODE_FLOAT)]))->has_nans) )); +}