[PATCH] D43607: [TargetLowering] Rename isCondCodeLegal to isCondCodeLegalOrCustom. Add real isCondCodeLegal. Update callers to use one or the other.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 21 21:23:12 PST 2018


craig.topper created this revision.
craig.topper added reviewers: spatel, RKSimon.
craig.topper edited the summary of this revision.

[TargetLowering] Rename isCondCodeLegal to isCondCodeLegalOrCustom. Add real isCondCodeLegal. Update callers to use one or the other.

isCondCodeLegal internally checked Legal or Custom which is misleading. Though no targets set any cond code action to Custom today.

So I've renamed isCondCodeLegal to isCondCodeLegalOrCustom and added a real isCondCodeLegal that only checks Legal.

I've changed legalization code to use isCondCodeLegalOrCustom and left things reachable via DAG combine as isCondCodeLegal. I've also changed some places that called getCondCodeAction and compared to Legal to just use isCondCodeLegal.

I'm looking at trying to keep SETCC all the way to isel for the AVX512 integer comparisons and I suspect I'll need to make some condition codes Custom to stop DAG combine from changing things post LegalizeOps. Prior to this only Expand stopped DAG combine, but that causes LegalizeOps to try to swap operands or invert rather than calling our Custom handler.


https://reviews.llvm.org/D43607

Files:
  include/llvm/CodeGen/TargetLowering.h
  lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
  lib/CodeGen/SelectionDAG/TargetLowering.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43607.135357.patch
Type: text/x-patch
Size: 5320 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180222/73fb2ac9/attachment.bin>


More information about the llvm-commits mailing list