[llvm-bugs] [Bug 40031] New: __builtin_unpredictable is horridly broken--

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Dec 14 14:32:10 PST 2018


            Bug ID: 40031
           Summary: __builtin_unpredictable is horridly broken--
           Product: clang
           Version: 7.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: erich.keane at intel.com
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

Mostly a note for the future, though others are welcome to take this.

__builtin_unpredictable doesn't work for while/dowhile/for because the place it
dealt with isn't called from them.  The function to Emit a Bool Branch should
be used by the other 3 as well.

Additionally, __builtin_unpredictable is implemented IN an emit function,
rather than in its CodeGenFunction emit call.  Likely, it should be changed to
also use the above emit function, then tag the branch after the fact (or bubble
it downward to the branch create spot).

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/20181214/cf7d701b/attachment.html>

More information about the llvm-bugs mailing list