From 7363a8bcdd1f4975e8afab29b307d9d2a329c98c Mon Sep 17 00:00:00 2001 From: James Molloy Date: Fri, 15 May 2015 17:41:29 +0000 Subject: [PATCH] [SDAGBuilder] Make the AArch64 builder happier. I intended this loop to only unwrap SplitVector actions, but it was more broad than that, such as unwrapping WidenVector actions, which makes operations seem legal when they're not. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237457 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index 1915a43a002..3c5d32f1749 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -2278,11 +2278,11 @@ void SelectionDAGBuilder::visitSelect(const User &I) { EVT VT = ValueVTs[0]; LLVMContext &Ctx = *DAG.getContext(); - while (DAG.getTargetLoweringInfo().getTypeToTransformTo(Ctx, VT) != VT) - VT = DAG.getTargetLoweringInfo().getTypeToTransformTo(Ctx, VT); + auto &TLI = DAG.getTargetLoweringInfo(); + while (TLI.getTypeAction(Ctx, VT) == TargetLoweringBase::TypeSplitVector) + VT = TLI.getTypeToTransformTo(Ctx, VT); - if (Opc != ISD::DELETED_NODE && - DAG.getTargetLoweringInfo().isOperationLegalOrCustom(Opc, VT)) { + if (Opc != ISD::DELETED_NODE && TLI.isOperationLegalOrCustom(Opc, VT)) { OpCode = Opc; LHSVal = getValue(LHS); RHSVal = getValue(RHS); -- 2.34.1