[PATCH] D29489: Optimize SETCC + VSEL of incompatible or illegal types

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 20 01:29:54 PST 2017


jonpa updated this revision to Diff 89088.
jonpa marked 2 inline comments as done.
jonpa added a comment.

In ComputeNumSignBits():
Handle VECTOR_SHUFFLE separately.
Check that input type is an integer vector for BITCAST.

I suppose that this handling of BITCAST could possibly work, although it looks like it probably shouldn't be there. I would therefore suggest that that I go back to Eli's original suggestion of handling this early, by calling WidenVSELECT_SETCC() also in PromoteIntOp_SELECT(). That way, this never gets scalarized, and we then don't need any of the new handlings in ComputeNumSignBits(), even though they may be useful in other contexts.

I first show now what the patch looks like with the latest updates per your review, before I change it back. What do you think?


https://reviews.llvm.org/D29489

Files:
  lib/CodeGen/SelectionDAG/LegalizeTypes.h
  lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
  lib/CodeGen/SelectionDAG/SelectionDAG.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29489.89088.patch
Type: text/x-patch
Size: 6446 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170220/e6847b33/attachment.bin>


More information about the llvm-commits mailing list