Optimization opportunity, done by gcc, missed by clang

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Optimization opportunity, done by gcc, missed by clang

Fangrui Song via cfe-dev
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

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev