[llvm] r237457 - [SDAGBuilder] Make the AArch64 builder happier.
James Molloy
james.molloy at arm.com
Fri May 15 10:41:29 PDT 2015
Author: jamesm
Date: Fri May 15 12:41:29 2015
New Revision: 237457
URL: http://llvm.org/viewvc/llvm-project?rev=237457&view=rev
Log:
[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.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp?rev=237457&r1=237456&r2=237457&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Fri May 15 12:41:29 2015
@@ -2278,11 +2278,11 @@ void SelectionDAGBuilder::visitSelect(co
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);
More information about the llvm-commits
mailing list