<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><blockquote type="cite">The problem is essentially the following: there are no vector f32<br>types (yet), so the <v4i1> = setcc <v4f32> node needs to be split<br>and scalarized. The operand splitting seems to start correctly, but<br>because <v4i1> is itself a legal type, after splitting the node into<br><v2i1> = setcc <v2f32>, the process becomes confused. The operands<br>are again split (as they should be), but it tries to widen the<br><v2i1> result back to <v4i1> (thus hitting the operand assertion).<br><br>In some sense, the problem is that DAGTypeLegalizer::run decides what<br>to do solely based on the result of calling getTypeAction(ResultVT),<br>but it seems that in this case the operand types need to be<br>accounted for in this determination. Enhancing the logic there to<br>consider the result types in this case seems like it should be<br>straightforward, but how general a problem is this? [Can this<br>problem only happen with vsetcc nodes?]<br><br><br><br><br>If I understand your description correctly, the type" <v4i1> setcc<br>..." is split into "<v2i1> setcc ..." because of the v4f32 operands,<br>but later on we decide to widen <v2i1> back to <v4i1> because we<br>legalize the result ?<br></blockquote><br>The problem is not the widening itself, but that the widen-result code for setcc assumes that the operands have also just been widened (which here is not true, they've been split instead). FWIW, with the patch I attached, the operands are split, then scalarized, and I'm left with a vector setcc with two build_vector operands.<br><br><blockquote type="cite">Can you declare <v2i1> as a legal type ?<br></blockquote><br>I'd have to write more load/store code, right? Why do you suggest this?<br><br></div></blockquote><div><br></div><div><div>How are you representing the v4i1 type on PPC64 ? Does it have mask registers ? I am surprised that we are not promoting the v4i1 to v4i32 or something similar. On NEON and SSE we promote llvm vector of booleans to the SIMD element and map it to the sign bit.</div><div><br></div></div></div>Thanks,</div><div>Nadav</div></body></html>