https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82120
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Christophe Lyon from comment #7) > I think it returns 0 in the testcase (optimizing for speed). > > I've noticed that arm_cortex_a5_branch_cost() has the same implementation as > arm_cortex_m7_branch_cost(), but according to Thomas, the behaviour is > different, since he sees the test pass for m7. > > Is it possible to write a dynamic gcc query rather than hardcode cpu names > in logical_op_short_circuit ? As: ... || [istarget visium-*-*] || [check_effective_target_arm_cortex_m] } { shows, you can do there anything you want. Ideally it should be cached.