From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2100.outbound.protection.outlook.com [40.107.223.100]) by sourceware.org (Postfix) with ESMTPS id 0C0843857C41 for ; Sat, 5 Sep 2020 23:19:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0C0843857C41 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e8WBe0ET5IHLyZom/jqacWzXrjmtd6GYPnPNUQUeF505pFWmdVlu351y8IVcxGuMx3IajeBqoTXsA8gEh/BsZdiNSap2rDetfZSnJQbeNDa6fTFentp0AyQWwYs5lejtxK34p1YUYTyep5fSzvZM1BXPfFknfwbxQ4RPHONOhpCaaoyoLdhpB9D4NPecb1ZyBdpoWeB+iLWsx1uKNDd+o43BRTVtC8TmfUyCyeSEPCEAX3V9ZILeUpWEMu3k50ANDlAwQaqVQhU8t+hdmHhEEk/GuKmbCGWAB+RdlNARrGy6Hj3fia5vpv5cgsTP4nx003d9mwiAHm1qRcbu1/Cegw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=W4tJOed161FOfrBfUQD5LDoFF8zI51RPeVVrUBPqE0s=; b=EtIWfexYYakJ5aPCOq/q1D8VxQzRYE4IPdgyuNI1Fq/4crOKFLkZYnG/HaPEQ2CtMBQOOloAidSzI0m/wKuBw+XiIk2erRg76ceIMmrpNOz8Vm4S7mECCLXTczaZWBscGxXE5k42ZtDmtI8T8joOE6TVk7FpdUY8m94dRGhREsyximmyXeWoah9OI1jfKT596AqSJqQoOvpI6a+cnDc+i7TsBNSRZGCseBMrySnkMnPc+eMbnBxzGYJtHdbq6JRwIdvAiptlWNXCmIkjzTnpMiZheUSlUKmJLPNm2BIq2djQuLG2ejdEvTSZ+4jLwlRcmyp9aE9SWkb7Wibmnum3hw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amperecomputing.com; dmarc=pass action=none header.from=amperecomputing.com; dkim=pass header.d=amperecomputing.com; arc=none Received: from BYAPR01MB5464.prod.exchangelabs.com (2603:10b6:a03:129::28) by BYAPR01MB4103.prod.exchangelabs.com (2603:10b6:a03:10::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.15; Sat, 5 Sep 2020 23:19:05 +0000 Received: from BYAPR01MB5464.prod.exchangelabs.com ([fe80::44db:c140:1b6d:b023]) by BYAPR01MB5464.prod.exchangelabs.com ([fe80::44db:c140:1b6d:b023%7]) with mapi id 15.20.3348.017; Sat, 5 Sep 2020 23:19:05 +0000 From: Gary Oblock To: "gcc@gcc.gnu.org" Subject: A couple GIMPLE questions Thread-Topic: A couple GIMPLE questions Thread-Index: AQHWg9grzzkuoY26rku2acneeykihQ== Date: Sat, 5 Sep 2020 23:19:05 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [69.181.250.88] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 7b04b20c-7938-470f-bd71-08d851f21548 x-ms-traffictypediagnostic: BYAPR01MB4103: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Z0M+OpWY+c+5HlTfEWWj2py08zw4Tzqdx1NIC7RtTwmHeDRJWGB0BMAdQ23K/N+i/WGLXZo/nyBtSGWXoY4gpcWvgPGACFoWlk8b/KNaPALluDP++uOQjb20WFzjAsKBDLGzsEQr+Y+x9TdOMr3TyEvBUtcrgsigs4kJhw0UY8KSQMEc+jyFnGjCbq+eQGy6RLbTtxEGpwrJfM8RkziDhsJRB+9Ls/jVp6Ph2NK+9UUm+ieUerkjtTUau9M0uC7o52xpNjG2+iqJX20ghLup+hCoAdQ76INVBqTiH41yZEMLBIHL0V0Rpx6gJXePSI8yDmVz+jfNL7mQEt12naBGcw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR01MB5464.prod.exchangelabs.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(346002)(366004)(136003)(39830400003)(396003)(2906002)(55016002)(5660300002)(6506007)(6916009)(52536014)(86362001)(83380400001)(478600001)(66946007)(66476007)(316002)(9686003)(26005)(19627405001)(33656002)(8936002)(76116006)(66556008)(71200400001)(66446008)(3480700007)(64756008)(8676002)(186003)(7696005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: /bi7RBhMWYXcTAu5FGBgxPARyAV5Kp8Z/CaJDlH4xnvFtlpX7Vot3XrN9E0WoWsTQfE+jkjX9ds5gDFrxuXpO5IWp0KlV7/PtfVcCNGQhl27R2b2mliyYiYDbMs/g1Nan33XKtsA0RVVvoxlibQ98NTbNRyD7IPJwgG4UGOx67QkLbxpWIIryAtSmi+8LyvpZ9D3zu0y35ERe+WNIRTiT2ip/+UbvvgpeAjtDzGw7OnrzVVEs6yvSshjYeYF6qHKCAVYlrDjxTckCKeXEfIoBMS068qPskUm2u8VIPtAgvkSfQpKxpOGlA5L71+1nNiPF6mZZxCVrg9+lyMcVNsfRX8QrusbWvWzHqr9junc0lLxWaIT/xmdpfs0u+qY2N2GDjrFZ5v6BwYqqGy5fmN6+Dh7GeQswwgC3e8Gt0DgauUC/4PSOJUZN0Zipot4+vC4d+v93mzwqiq259jlgiNPtq3vLrOoghU4BT6E4PnviZldCyzcStZ6P9+5kJeGE6UoWM5aLvu8BjfEGd+MALUR2zslvnlZpiskjRYZzJJetmoX4wB0ynY5bpQ5n0mV2VXbqVrP7Bx3V/3QCScRhimosnpDGZ++8y2+B4E7XR/rF331kygwz+goJI69CFlrFkzuSasTvx2jgpOrN8Zps71LNg== x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: amperecomputing.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR01MB5464.prod.exchangelabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7b04b20c-7938-470f-bd71-08d851f21548 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Sep 2020 23:19:05.2430 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 6etiBiCfwtda9xS0IFETdtKMtnyjxgMkY6LkoXIVYz6rRZdl1oXtJffGPSKafgZhJy+O2YU8tSJSMvvZkuqRMfmyZvmhn2Peh2nOs01Nx60= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR01MB4103 X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, TXREP, T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Sep 2020 23:19:09 -0000 First off one of the questions just me being curious but second is quite serious. Note, this is GIMPLE coming into my optimization and not something I've modified. Here's the C code: type_t * do_comp( type_t *data, size_t len) { type_t *res; type_t *x =3D min_of_x( data, len); type_t *y =3D max_of_y( data, len); res =3D y; if ( x < y ) res =3D 0; return res; } And here's the resulting GIMPLE: ;; Function do_comp.constprop (do_comp.constprop.0, funcdef_no=3D5, decl_ui= d=3D4392, cgraph_uid=3D3, symbol_order=3D68) (executed once) do_comp.constprop (struct type_t * data) { struct type_t * res; struct type_t * x; struct type_t * y; size_t len; [local count: 1073741824]: [local count: 1073741824]: x_2 =3D min_of_x (data_1(D), 10000); y_3 =3D max_of_y (data_1(D), 10000); if (x_2 < y_3) goto ; [29.00%] else goto ; [71.00%] [local count: 311385128]: [local count: 1073741824]: # res_4 =3D PHI return res_4; } The silly question first. In the "if" stmt how does GCC get those probabilities? Which it shows as 29.00% and 71.00%. I believe they should both be 50.00%. The serious question is what is going on with this phi? res_4 =3D PHI This makes zero sense practicality wise to me and how is it supposed to be recognized and used? Note, I really do need to transform the "0B" into something else for my structure reorganization optimization. Thanks, Gary Oblock CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is = for the sole use of the intended recipient(s) and contains information that= is confidential and proprietary to Ampere Computing or its subsidiaries. I= t is to be used solely for the purpose of furthering the parties' business = relationship. Any unauthorized review, copying, or distribution of this ema= il (or any attachments thereto) is strictly prohibited. If you are not the = intended recipient, please contact the sender immediately and permanently d= elete the original and any copies of this email and any attachments thereto= .