[llvm] [RISCV][TTI] Refine the cost of FCmp (PR #88833)
Shih-Po Hung via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 15 20:11:32 PDT 2024
================
@@ -22,14 +22,14 @@ define void @select() {
; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %15 = select i1 undef, <vscale x 2 x i1> undef, <vscale x 2 x i1> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %16 = select i1 undef, <vscale x 4 x i1> undef, <vscale x 4 x i1> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %17 = select i1 undef, <vscale x 8 x i1> undef, <vscale x 8 x i1> undef
-; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %18 = select i1 undef, <vscale x 16 x i1> undef, <vscale x 16 x i1> undef
-; CHECK-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %19 = select i1 undef, <vscale x 32 x i1> undef, <vscale x 32 x i1> undef
+; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %18 = select i1 undef, <vscale x 16 x i1> undef, <vscale x 16 x i1> undef
+; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %19 = select i1 undef, <vscale x 32 x i1> undef, <vscale x 32 x i1> undef
----------------
arcbbb wrote:
This is affected by the assignment of a cost of 1 to mask operations, because `<vscale x N x i1>` translates directly into `<vscale x N x i8>` in `RISCVTargetLowering::getLMUL(MVT)`
https://github.com/llvm/llvm-project/pull/88833
More information about the llvm-commits
mailing list