[PATCH] D146027: [TTI] Evaluate cost of experimental_widenable_condition as zero
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 14 03:00:24 PDT 2023
mkazantsev created this revision.
mkazantsev added reviewers: sdesmalen, skatkov, anna, ABataev.
Herald added subscribers: StephenFan, zzheng.
Herald added a project: All.
mkazantsev requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This intrinsic is not supposed to live through lowering, eventually it should turn
into `true` constant and be optimized away.
https://reviews.llvm.org/D146027
Files:
llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
llvm/test/Transforms/LoopUnroll/guard-cost-for-unrolling.ll
Index: llvm/test/Transforms/LoopUnroll/guard-cost-for-unrolling.ll
===================================================================
--- llvm/test/Transforms/LoopUnroll/guard-cost-for-unrolling.ll
+++ llvm/test/Transforms/LoopUnroll/guard-cost-for-unrolling.ll
@@ -30,8 +30,8 @@
define void @test_guard_as_branch(ptr %arr, i64 %n, i64 %bound) {
; CHECK-LABEL: Loop Unroll: F[test_guard_as_branch] Loop %loop
-; CHECK-NEXT: Loop Size = 10
-; CHECK-NEXT: runtime unrolling with count: 1
+; CHECK-NEXT: Loop Size = 9
+; CHECK-NEXT: runtime unrolling with count: 2
entry:
br label %loop
Index: llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
===================================================================
--- llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
+++ llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
@@ -681,6 +681,7 @@
case Intrinsic::coro_suspend:
case Intrinsic::coro_subfn_addr:
case Intrinsic::threadlocal_address:
+ case Intrinsic::experimental_widenable_condition:
// These intrinsics don't actually represent code after lowering.
return 0;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146027.505002.patch
Type: text/x-patch
Size: 1136 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230314/6f892da1/attachment.bin>
More information about the llvm-commits
mailing list