[PATCH] D42737: [LegalizeDAG] Support expanding condition operand of ISD::SELECT
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 31 11:02:19 PST 2018
efriedma added a comment.
It seems a little dubious to create a SELECT where the condition isn't either an i1 or a naturally promoted i1... maybe it would make sense to restrict that instead? (And fix the VSELECT expansion to just truncate the condition instead of trying to get fancy.)
================
Comment at: lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:3118
+ return DAG.getNode(ISD::SELECT, SDLoc(N), N->getValueType(0), InL,
+ N->getOperand(1), N->getOperand(2));
+}
----------------
Probably want to clarify that you're intentionally throwing away the high bits because the operand is required to conform to getBooleanContents.
https://reviews.llvm.org/D42737
More information about the llvm-commits
mailing list