[cfe-dev] Optimization opportunity, done by gcc, missed by clang

Roshan via cfe-dev cfe-dev at lists.llvm.org
Thu May 7 00:53:52 PDT 2020


Hey,

Hope this is the correct place to post this. I was doing some bounds
checking for a parsing utility and ran into optimization differences
between gcc and clang.

Link to godbolt - https://godbolt.org/z/Cqj6tc

Essentially, gcc is able to better coalesce conditions. Small disclaimer
that I haven't really checked this behaviour outside of the above godbolt.

-- 
Warm regards
Roshan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20200507/347416e7/attachment.html>


More information about the cfe-dev mailing list