> Am 14.12.2022 um 18:28 schrieb G.T. via Gcc <gcc@gcc.gnu.org>:
> 
> At line 276, lra_assert (spill_class != NO_REGS); would trigger
> whenever execution reached here with spill_class equal to NO_REGS.
> Seems to me that would never happen. Because one of the conditions in
> the if statement right above it (line 265) catches spill_class ==
> NO_REGS and causes the rest of the for loop to be skipped by executing
> continue in the consequent of the if. So lra_assert never sees
> spill_class == NO_REGS. That makes line 276 dead code, right?

Sometimes this serves as documentation to make the code more obvious to read.  
Depends on the distance of the redundant check.

Richard 


> Thanks.
> GT.

Reply via email to