On 6/10/20 12:50 PM, Richard Biener wrote:
with -fnon-call-exceptions should trigger it.

Thanks, that works!

We start with:

foo (v2df a, v2df b, v2df c, v2df d)
Eh tree:
   1 try land:{1,<L1>} catch:{}
{
  void * _1;
  v2df _2;
  v2df _8;

  <bb 2> [local count: 1073741824]:
  [LP 1] _8 = VEC_COND_EXPR <a_4(D) < b_5(D), c_6(D), d_7(D)>;

  <bb 3> [local count: 1073741824]:
  # _2 = PHI <{ 0.0, 0.0 }(4), _8(2)>
  return _2;

  <bb 4> [count: 0]:
<L1>: [LP 1]
  _1 = __builtin_eh_pointer (1);
  __cxa_begin_catch (_1);
  __cxa_end_catch ();
  goto <bb 3>; [0.00%]

I tried to use:

          maybe_clean_or_replace_eh_stmt (stmt, assign);

which does:

  <bb 2> [local count: 1073741824]:
  [LP 1] _12 = a_4(D) < b_5(D);

  <bb 3> [local count: 1073741824]:
  _8 = VEC_COND_EXPR <_12, c_6(D), d_7(D)>;

which requires to split the BB. But now I'm missing an edge:

/home/marxin/Programming/testcases/vect-low.c: In function ‘v2df foo(v2df, 
v2df, v2df, v2df)’:
/home/marxin/Programming/testcases/vect-low.c:3:6: error: BB 2 is missing an EH 
edge

Am I doing that correctly? Or do we have a better function for it?
Martin

Reply via email to