From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9A2023858C2A; Mon, 16 Oct 2023 12:40:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9A2023858C2A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1697460008; bh=ZUF0+xf/4OVsAGtLB7JPs9M402NFX83iCQPjQovDpDE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=QnSHFOWtNAPPd4HbvIGkvAyTdoo6mLb3epJB9VMS5yaSZoOb/sJf3KBrVjcPt4pd8 /gFfhAo8Yc2XCSScARewVDe1Gv8tkDCNKKVcHOqqdZabqqngo56Iu7ay8M5eej/adw yhagAs/fQIzkmaYXQacyrOah4SmaUZ/9FX7Vv/fw= From: "aagarwa at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/36010] Loop interchange not performed Date: Mon, 16 Oct 2023 12:40:07 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 4.4.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: aagarwa at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D36010 Ajit Kumar Agarwal changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aagarwa at gcc dot gnu.org --- Comment #5 from Ajit Kumar Agarwal --- Use the following flags-fassociative-math -fno-signed-zeros -fno-trapping-m= ath to make loop-interchange work. Following code in gcc/gimple-loop-interchange.cc @@ -514,8 +514,8 @@ loop_cand::analyze_iloop_reduction_var (tree var) if (! (associative_tree_code (code) || (code =3D=3D MINUS_EXPR && use_p->use =3D=3D gimple_assign_rhs1_ptr (ass))) || (FLOAT_TYPE_P (TREE_TYPE (var)) && ! flag_associative_math)) return false; } else Because of the flag_associative_math conditions at line no: 514 it returns false and loop interchange doesn't work. Using the above flags make flag_associative_math as true and loop interchange works.=