[PATCH] make lower-expect understand llvm.expect.i1 for branches
Daniel Micay
danielmicay at gmail.com
Sat Dec 14 02:14:38 PST 2013
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.
More information about the llvm-commits
mailing list