[Bug tree-optimization/103857] implement ternary without jump (and comparison)

drepper.fsp+rhbz at gmail dot com gcc-bugzilla@gcc.gnu.org
Wed Dec 29 13:24:52 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103857

--- Comment #2 from Ulrich Drepper <drepper.fsp+rhbz at gmail dot com> ---
(In reply to Jakub Jelinek from comment #1)
> I don't think that's equivalent.

You're right, I tried to generalize the code and failed.  I my actual case this
was a single variable the compiler saw the assignments of.  Adding

  if (a[i] != 42 && a[i] != 10)
    __builtin_unreachable();

etc could simulate this.


More information about the Gcc-bugs mailing list