Re: [PATCH] phiopt: Drop SSA_NAME_RANGE_INFO in maybe equal case [PR108166]

2022-12-22 Thread Aldy Hernandez via Gcc-patches
On Thu, Dec 22, 2022, 12:33 Richard Biener wrote: > On Thu, 22 Dec 2022, Jakub Jelinek wrote: > > > Hi! > > > > The following place in value_replacement is after proving that > > x == cst1 ? cst2 : x > > phi result is only used in a comparison with constant which doesn't > > care if it compares c

Re: [PATCH] phiopt: Drop SSA_NAME_RANGE_INFO in maybe equal case [PR108166]

2022-12-22 Thread Richard Biener via Gcc-patches
On Thu, 22 Dec 2022, Jakub Jelinek wrote: > Hi! > > The following place in value_replacement is after proving that > x == cst1 ? cst2 : x > phi result is only used in a comparison with constant which doesn't > care if it compares cst1 or cst2 and replaces it with x. > The testcase is miscompiled

Re: [PATCH] phiopt: Drop SSA_NAME_RANGE_INFO in maybe equal case [PR108166]

2022-12-22 Thread Aldy Hernandez via Gcc-patches
On Thu, Dec 22, 2022 at 11:30 AM Jakub Jelinek wrote: > > Hi! > > The following place in value_replacement is after proving that > x == cst1 ? cst2 : x > phi result is only used in a comparison with constant which doesn't > care if it compares cst1 or cst2 and replaces it with x. > The testcase is

[PATCH] phiopt: Drop SSA_NAME_RANGE_INFO in maybe equal case [PR108166]

2022-12-22 Thread Jakub Jelinek via Gcc-patches
Hi! The following place in value_replacement is after proving that x == cst1 ? cst2 : x phi result is only used in a comparison with constant which doesn't care if it compares cst1 or cst2 and replaces it with x. The testcase is miscompiled because we have after the replacement incorrect range inf