Joe Matarazzo
2013-Mar-16 00:03 UTC
[LLVMdev] Expand action on FSUB with vector types causes both "Vector Unroll" and "Add+Negate"
In my target, I have setOperationAction(ISD::FSUB, MVT::v4f32, Expand); This produces the desired effect in LegalizeDAG, replacing the FSUB with FADD + FNEG. However, when the vector legalizer runs, it thinks the Expand legalize action means to unroll the vector. This isn't necessary and not what I wanted. Is there a way to get one and not the other? I don't want the unroll aspect of the Expand action. I changed to a Custom lowering and duplicated the FADD+FNEG action, but the dag-combine2 stage moved this back to FSUB, which then failed to pattern match in Select. That code checks for !LegalOperations || TLI.isLegalorCustom(FSUB), which of course is true for this case. Suggestions? Thanks, Joe -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130315/51a21a4b/attachment.html>