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.
icmp
1 parent df229ca commit b7b60b7Copy full SHA for b7b60b7
test/IRGen/integer-comparison.swift
@@ -4,11 +4,11 @@
4
func f(_ x: Int, _ y: UInt32) -> Bool { x < y }
5
// CHECK-LABEL: define {{.*}} @"$s4main1fySbSi_s6UInt32VtF"(i64 %0, i32 %1)
6
// CHECK: %2 = zext i32 %1 to i64
7
-// CHECK-NEXT: %3 = icmp sgt i64 %2, %0
+// CHECK-NEXT: %3 = icmp slt i64 %0, %2
8
// CHECK-NEXT: ret i1 %3
9
10
func g(_ x: UInt32, _ y: Int) -> Bool { x < y }
11
// CHECK-LABEL: define {{.*}} @"$s4main1gySbs6UInt32V_SitF"(i32 %0, i64 %1)
12
// CHECK: %2 = zext i32 %0 to i64
13
-// CHECK-NEXT: %3 = icmp slt i64 %2, %1
+// CHECK-NEXT: %3 = icmp sgt i64 %1, %2
14
0 commit comments