Differential Revision: http://reviews.llvm.org/D14499
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252595
91177308-0d34-0410-b5e6-
96231b3b80d8
else if (NumVectorInstructions <= NumInstructions / 2)
Threshold -= (FiftyPercentVectorBonus - TenPercentVectorBonus);
- return Cost < Threshold;
+ return Cost <= std::max(0, Threshold);
}
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
--- /dev/null
+; RUN: opt -inline -S %s | FileCheck %s
+
+define void @f() {
+entry:
+ tail call void @g()
+ unreachable
+
+; CHECK-LABEL: @f
+; CHECK-NOT: call
+; CHECK: unreachable
+}
+
+define void @g() {
+entry:
+ unreachable
+}
+