We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d6cf53 commit c577ebdCopy full SHA for c577ebd
llvm/test/Analysis/CostModel/RISCV/cmp-select.ll
@@ -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