[llvm-bugs] [Bug 41112] missed opt: indeterminate value in lvalue expression does not optimize function call away

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Mar 17 05:21:03 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=41112

Nuno Lopes <nunoplopes at sapo.pt> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #5 from Nuno Lopes <nunoplopes at sapo.pt> ---
(In reply to Gonzalo BG from comment #4)
> > I'm inclined to not "fix" this (i.e., to not optimize this case).
> 
> Can you elaborate about why you think that the more aggressive dead-code
> elimination that would result from this optimization is not worth pursuing?

The burden of proof is the other way around: you need to prove that the benefit
is worth the cost of implementing this feature.
We don't exploit undefined behavior just for the sake of it. We do it where it
brings some benefit (e.g., performance).

The example above doesn't feel like it would give any benefit for real
programs. Hence it's not worth the cost. Please reopen this report if you have
a concrete example from real code where this would help.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190317/e47a66d8/attachment.html>


More information about the llvm-bugs mailing list