> To me this looks like mis-applying of match.pd:6083? > > Applying pattern match.pd:6083, gimple-match-1.cc:45749 > gimple_simplified to iftmp.0_62 = iftmp.0_61 | _219; > new phi replacement stmt > iftmp.0_62 = iftmp.0_61 | _219; > > so originally it wasn't > > iftmp.0_61 = .MASK_LOAD (_260, 8B, _259); > iftmp.0_62 = iftmp.0_61 | _219; > > but sth like > > iftmp.0_62 = <mask> ? _219 : iftmp.0_61; > > and iftmp.0_61 is zero-one-valued because it is _Bool. Shouldn't > if-conversion always turn the COND_EXPR into a .COND_IOR here?
Yes, just that the mask is inverted in the original COND_EXPR. Hmm, with COND_IOR we'd explicitly set the else value to the target's preferred else value then I presume. That's probably more elegant than an extra VEC_COND but I could imagine seeing the same problems of redundant VEC_CONDs not being folded. Regards Robin