[llvm] [RISCV][CostModel] Add getCFInstrCost RISC-V implementation (PR #65599)

Michael Maitland via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 7 06:55:09 PDT 2023


================
@@ -10,7 +10,7 @@
 define ptr @zero_indices_i8(ptr %p) {
 ; CHECK-LABEL: 'zero_indices_i8'
 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %x = getelementptr i8, ptr %p, i32 0
-; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret ptr %x
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret ptr %x
----------------
michaelmaitland wrote:

Did you mean to impact the cost of return statements? The PR description only mentions PHI nodes and branches. For cases that do not return void, should the cost be 0?

https://github.com/llvm/llvm-project/pull/65599


More information about the llvm-commits mailing list