[llvm-commits] [llvm] r131534 - in /llvm/trunk: include/llvm/Target/TargetLowering.h lib/CodeGen/SelectionDAG/LegalizeDAG.cpp lib/CodeGen/SelectionDAG/LegalizeTypes.h lib/CodeGen/SelectionDAG/TargetLowering.cpp lib/Transforms/Scalar/CodeGenPrepare.cpp
Duncan Sands
baldrick at free.fr
Wed May 18 05:40:13 PDT 2011
Hi Nadav,
> @@ -1814,6 +1732,73 @@
>
> ValueTypeActionImpl ValueTypeActions;
>
> + typedef std::pair<LegalizeAction, EVT> LegalizeKind;
> +
> + LegalizeKind
> + getTypeConversion(LLVMContext&Context, EVT VT) const {
> + // If this is a simple type, use the ComputeRegisterProp mechanism.
> + if (VT.isSimple()) {
> + assert((unsigned)VT.getSimpleVT().SimpleTy<
> + array_lengthof(TransformToType));
> + EVT NVT = TransformToType[VT.getSimpleVT().SimpleTy];
> + LegalizeAction LA = ValueTypeActions.getTypeAction(VT.getSimpleVT());
> + if (NVT.isSimple()&& LA != Legal)
> + assert(ValueTypeActions.getTypeAction(NVT.getSimpleVT()) != Promote&&
> + "Promote may not follow Expand or Promote");
did you really mean to have the assertion be guarded by that "if" statement?
Better to incorporate the condition into the assert.
Ciao, Duncan.
More information about the llvm-commits
mailing list