[llvm-bugs] [Bug 48529] Reassociate reorders evaluation of short-circuited comparisons
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Feb 19 01:15:08 PST 2021
https://bugs.llvm.org/show_bug.cgi?id=48529
Marius Hillenbrand <mhillen at linux.ibm.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
Status|NEW |RESOLVED
--- Comment #2 from Marius Hillenbrand <mhillen at linux.ibm.com> ---
Per Sanjay Patel's comment on https://reviews.llvm.org/D94089
> I'm sympathetic to the motivation, but that was a hack: one goal of IR is to
> overcome side-channel source-level optimization like this.
> For example, we added several IR transforms to reduce compiled-code differences
> in source-level diffs like "if (bool1 && bool2)" vs. "if (bool1 & bool2)"
> (logical vs. bitwise ops).
> If the expression order matters, then we want the programmer to indicate that
> explicitly with something like "__builtin_expect" or profile metadata.
... closing this bug as no-issue.
--
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/20210219/46042407/attachment-0001.html>
More information about the llvm-bugs
mailing list