[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:11:39 PDT 2023


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb0ea210b351b: [TTI] Evaluate cost of experimental_widenable_condition as zero (authored by mkazantsev).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146027/new/

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.505006.patch
Type: text/x-patch
Size: 1136 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230314/6c3b7845/attachment.bin>


More information about the llvm-commits mailing list