[PATCH] D43282: [LegalizeDAG] Fix legalization of SETCC

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 15 17:40:38 PST 2018


efriedma accepted this revision.
efriedma added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:3769
     int TrueValue;
-    switch (TLI.getBooleanContents(Tmp1->getValueType(0))) {
+    switch (TLI.getBooleanContents(Tmp1.getValueType())) {
     case TargetLowering::ZeroOrOneBooleanContent:
----------------
miyuki wrote:
> efriedma wrote:
> > Shouldn't this be `TLI.getBooleanContents(VT)`? None of the operands of a SETCC are boolean.
> As far as I understand, the parameter of `getBooleanContents` is the type of values being compared rather than the result type. At least, other uses of `getBooleanContents` in https://reviews.llvm.org/rL212697 suggest so.
Oh, you're right; wasn't really thinking about it.


https://reviews.llvm.org/D43282





More information about the llvm-commits mailing list