https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104450
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2022-02-08 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Here is a testcase without -fsanitize=thread: That is you just need -O1 -fnon-call-exceptions -mavx512f: #define vectsize 64 typedef int __attribute__((__vector_size__ (vectsize))) V; typedef float __attribute__((__vector_size__ (vectsize))) F; F f; V v; struct g{~g();}; void foo (void) { g t; v += (V) (0 <= f); } ----- CUT ---- We start out with (the comparison throws): f.0_1 = f; _6 = f.0_1 >= { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; <bb 3> [local count: 1073741824]: _2 = VEC_COND_EXPR <_6, { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }>; v.1_3 = v; And isel converts it into: f.0_1 = f; <bb 3> [local count: 1073741824]: _2 = .VCOND (f.0_1, { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }, { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, 111); But now the comparison and VEC_COND_EXPR is just the builtin .VCOND which is not marked to throw and in bb3 ....