Skip to content

Commit d3153b5

Browse files
committed
[X86] Remove a DCI.isBeforeLegalize() call from combineVSelectWithAllOnesOrZeros.
This was blocking isTypeLegal call so that we could do a particular transform on illegal types before type legalization. But the we create a target specific node using that type. We shouldn't do that if the type isn't legal. So I think we should just always make sure the type is legal. I suspect that in order to get the condition VT to not be a vector of i1 we already completed type legalization anyway so this probably doesn't matter much in practice.
1 parent d4c3f20 commit d3153b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39608,7 +39608,7 @@ combineVSelectWithAllOnesOrZeros(SDNode *N, SelectionDAG &DAG,
3960839608
if (TValIsAllOnes && FValIsAllZeros)
3960939609
return DAG.getBitcast(VT, Cond);
3961039610

39611-
if (!DCI.isBeforeLegalize() && !TLI.isTypeLegal(CondVT))
39611+
if (!TLI.isTypeLegal(CondVT))
3961239612
return SDValue();
3961339613

3961439614
// vselect Cond, 111..., X -> or Cond, X

0 commit comments

Comments
 (0)