[PATCH] D68131: Switch lowering: omit range check for bit tests when default is unreachable (PR43129)

Hans Wennborg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 1 01:27:32 PDT 2019


hans marked 4 inline comments as done.
hans added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:2630-2633
   SDValue RangeCmp = DAG.getSetCC(
       dl, TLI.getSetCCResultType(DAG.getDataLayout(), *DAG.getContext(),
                                  Sub.getValueType()),
       Sub, DAG.getConstant(B.Range, dl, VT), ISD::SETUGT);
----------------
spatel wrote:
> Can we sink RangeCmp into the !OmitRangeCheck block below? As written, we are potentially creating a node with no uses?
It's a bit annoying, because by the time we're down here, the code above has changed the value of Sub which we would use in RangeCmp. But that can be fixed of course.. doing that.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68131/new/

https://reviews.llvm.org/D68131





More information about the llvm-commits mailing list