https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105480
--- Comment #2 from seberg <sebastian-gcc at sipsolutions dot net> --- I still owed the correct example: https://godbolt.org/z/33Pj6xvPr Now I think the cause is the indeed (somewhat understandandable) desire to optimize away the branching. And not the instruction (I am not sure how the comparison instruction deals with trapping, so it could be both).