[PATCH] make lower-expect understand llvm.expect.i1 for branches

Daniel Micay danielmicay at gmail.com
Sun Feb 2 12:59:25 PST 2014


On Sat, Dec 14, 2013 at 5:14 AM, Daniel Micay <danielmicay at gmail.com> wrote:
> On Sat, Dec 14, 2013 at 4:35 AM, Nick Lewycky <nicholas at mxc.ca> wrote:
>> Daniel Micay wrote:
>>>
>>>
>>>    ping
>>
>>
>> LGTM. Do you have commit access?
>
> Nope, I don't have commit access. Just waiting on someone else to commit it :).
>
>> Also, while the patch is correct and makes the optimizer smarter, what's the
>> motivation here? Does clang emit this? Just curious.
>
> As far as I know, the only way place is used by clang is the
> __builtin_expect intrinsic so it's not going to make a difference for
> it.
>
> I ran into this in another language frontend (Rust) and ended up
> having to figure out why LLVM was just discarding the instruction.
> It's easy enough to output a zext/icmp to match clang, but fixing it
> here will save someone else from running into this little quirk.

Still waiting on someone with commit access to merge this. It's
certainly not of great importance but I do think it's useful...

http://llvm-reviews.chandlerc.com/D2034



More information about the llvm-commits mailing list