https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116615
Xi Ruoyao <xry111 at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |xry111 at gcc dot gnu.org --- Comment #3 from Xi Ruoyao <xry111 at gcc dot gnu.org> --- FYI on LoongArch it's claimed LOGICAL_OP_NON_SHORT_CIRCUIT=0 mostly helps FP benchmarks, something like /* { dg-options "-O2 -ffast-math -fdump-tree-gimple" } */ int short_circuit (float *a) { float t1x = a[0]; float t2x = a[1]; float t1y = a[2]; float t2y = a[3]; float t1z = a[4]; float t2z = a[5]; if (t1x > t2y || t2x < t1y || t1x > t2z || t2x < t1z || t1y > t2z || t2y < t1z) return 0; return 1; } See r14-8446. Maybe because FP comparison is more expensive. I'm really not a fan of the change because without -ffast-math (which should really not be used for 99.9% real-life code) the FP comparision isn't allowed to be short-circuited anyway. Generally I'm much frustrated when all the people seem using -ffast-math to bench things and justify changes.