if (LK.first == TargetLowering::TypeLegal)
return std::make_pair(Cost, Ty.getSimpleVT());
- if (LK.first == TargetLowering::TypeSplitVector)
+ if (LK.first == TargetLowering::TypeSplitVector ||
+ LK.first == TargetLowering::TypeExpandInteger)
Cost *= 2;
// Keep legalizing the type.
unsigned Cost = getCmpSelInstrCost(Opcode, ValTy->getScalarType(),
CondTy);
- // return the cost of multiple scalar invocation plus the cost of inserting
+ // Return the cost of multiple scalar invocation plus the cost of inserting
// and extracting the values.
return getScalarizationOverhead(ValTy, true, false) + Num * Cost;
}
--- /dev/null
+; RUN: opt < %s -cost-model -analyze -mtriple=i386 -mcpu=corei7-avx | FileCheck %s
+
+
+;CHECK: cost of 2 {{.*}} add
+;CHECK: cost of 1 {{.*}} ret
+define i32 @no_info(i32 %arg) {
+ %e = add i64 undef, undef
+ ret i32 undef
+}