Skip to content

Commit c577ebd

Browse files
committed
Pre-commit test case for instruction cost of cmp instr (nfc)
1 parent 3d6cf53 commit c577ebd

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
2+
; RUN: opt < %s -mtriple=riscv64 -passes="print<cost-model>" -cost-kind=throughput 2>&1 -disable-output | FileCheck %s --check-prefixes=CHECK
3+
4+
define void @cmp-select() {
5+
; CHECK-LABEL: 'cmp-select'
6+
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp1 = icmp slt i64 0, 1
7+
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %select1 = select i1 %cmp1, i32 5, i32 4
8+
; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
9+
;
10+
%cmp1 = icmp slt i64 0, 1
11+
%select1 = select i1 %cmp1, i32 5, i32 4
12+
ret void
13+
}

0 commit comments

Comments
 (0)