On 1/17/24 20:53, Greg McGary wrote:
On Tue, Jan 16, 2024 at 11:44 PM Richard Biener <richard.guent...@gmail.com <mailto:richard.guent...@gmail.com>> wrote:

> On Tue, Jan 16, 2024 at 11:20 PM Greg McGary <g...@rivosinc.com <mailto:g...@rivosinc.com>> wrote:

 > >

 > > The sign bit of a sign-extending load cannot be known until runtime,

 > > so don't attempt to simplify it in the combiner.

 >
 > It feels like this papers over an issue downstream?

While the code comment is true, perhaps it obscures the primary intent,
which is recognition that the pattern (SIGN_EXTEND (mem ...) ) is destined
to expand into a single memory-load instruction and no simplification is
possible, so why waste time with further analysis or transformation? There
are plenty of other conditions that also short circuit to "do nothing" and
this seems just as straightforward as those others. Efforts to catch this
further downstream add gratuitous complexity.
Because the real bug is likely still lurking, waiting for something else to trigger it.

An early exit is fine when we're just trying to avoid unnecessary work, but there's something else going on here we need to understand first.

jeff

Reply via email to