@@ -5,9 +5,7 @@ declare void @use_ptr(ptr)
5
5
6
6
define i1 @inttoptr (i64 %x , i64 %y ) {
7
7
; CHECK-LABEL: @inttoptr(
8
- ; CHECK-NEXT: [[XPTR:%.*]] = inttoptr i64 [[X:%.*]] to ptr
9
- ; CHECK-NEXT: [[YPTR:%.*]] = inttoptr i64 [[Y:%.*]] to ptr
10
- ; CHECK-NEXT: [[CMP:%.*]] = icmp eq ptr [[XPTR]], [[YPTR]]
8
+ ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i64 [[X:%.*]], [[Y:%.*]]
11
9
; CHECK-NEXT: ret i1 [[CMP]]
12
10
;
13
11
%xptr = inttoptr i64 %x to ptr
@@ -18,8 +16,7 @@ define i1 @inttoptr(i64 %x, i64 %y) {
18
16
19
17
define i1 @inttoptr_constant (i64 %x ) {
20
18
; CHECK-LABEL: @inttoptr_constant(
21
- ; CHECK-NEXT: [[XPTR:%.*]] = inttoptr i64 [[X:%.*]] to ptr
22
- ; CHECK-NEXT: [[CMP:%.*]] = icmp eq ptr [[XPTR]], inttoptr (i64 42 to ptr)
19
+ ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i64 [[X:%.*]], 42
23
20
; CHECK-NEXT: ret i1 [[CMP]]
24
21
;
25
22
%xptr = inttoptr i64 %x to ptr
@@ -29,9 +26,7 @@ define i1 @inttoptr_constant(i64 %x) {
29
26
30
27
define <2 x i1 > @inttoptr_vector (<2 x i64 > %x , <2 x i64 > %y ) {
31
28
; CHECK-LABEL: @inttoptr_vector(
32
- ; CHECK-NEXT: [[XPTR:%.*]] = inttoptr <2 x i64> [[X:%.*]] to <2 x ptr>
33
- ; CHECK-NEXT: [[YPTR:%.*]] = inttoptr <2 x i64> [[Y:%.*]] to <2 x ptr>
34
- ; CHECK-NEXT: [[CMP:%.*]] = icmp eq <2 x ptr> [[XPTR]], [[YPTR]]
29
+ ; CHECK-NEXT: [[CMP:%.*]] = icmp eq <2 x i64> [[X:%.*]], [[Y:%.*]]
35
30
; CHECK-NEXT: ret <2 x i1> [[CMP]]
36
31
;
37
32
%xptr = inttoptr <2 x i64 > %x to <2 x ptr >
@@ -42,8 +37,7 @@ define <2 x i1> @inttoptr_vector(<2 x i64> %x, <2 x i64> %y) {
42
37
43
38
define <2 x i1 > @inttoptr_vector_constant (<2 x i64 > %x ) {
44
39
; CHECK-LABEL: @inttoptr_vector_constant(
45
- ; CHECK-NEXT: [[XPTR:%.*]] = inttoptr <2 x i64> [[X:%.*]] to <2 x ptr>
46
- ; CHECK-NEXT: [[CMP:%.*]] = icmp eq <2 x ptr> [[XPTR]], <ptr inttoptr (i64 42 to ptr), ptr inttoptr (i64 123 to ptr)>
40
+ ; CHECK-NEXT: [[CMP:%.*]] = icmp eq <2 x i64> [[X:%.*]], <i64 42, i64 123>
47
41
; CHECK-NEXT: ret <2 x i1> [[CMP]]
48
42
;
49
43
%xptr = inttoptr <2 x i64 > %x to <2 x ptr >
@@ -54,10 +48,8 @@ define <2 x i1> @inttoptr_vector_constant(<2 x i64> %x) {
54
48
define i1 @inttoptr_size_mismatch (i200 %x , i9 %y ) {
55
49
; CHECK-LABEL: @inttoptr_size_mismatch(
56
50
; CHECK-NEXT: [[TMP1:%.*]] = trunc i200 [[X:%.*]] to i64
57
- ; CHECK-NEXT: [[XPTR:%.*]] = inttoptr i64 [[TMP1]] to ptr
58
51
; CHECK-NEXT: [[TMP2:%.*]] = zext i9 [[Y:%.*]] to i64
59
- ; CHECK-NEXT: [[YPTR:%.*]] = inttoptr i64 [[TMP2]] to ptr
60
- ; CHECK-NEXT: [[CMP:%.*]] = icmp eq ptr [[XPTR]], [[YPTR]]
52
+ ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i64 [[TMP1]], [[TMP2]]
61
53
; CHECK-NEXT: ret i1 [[CMP]]
62
54
;
63
55
%xptr = inttoptr i200 %x to ptr
@@ -69,8 +61,7 @@ define i1 @inttoptr_size_mismatch(i200 %x, i9 %y) {
69
61
define <2 x i1 > @inttoptr_vector_constant_size_mismatch (<2 x i200 > %x ) {
70
62
; CHECK-LABEL: @inttoptr_vector_constant_size_mismatch(
71
63
; CHECK-NEXT: [[TMP1:%.*]] = trunc <2 x i200> [[X:%.*]] to <2 x i64>
72
- ; CHECK-NEXT: [[XPTR:%.*]] = inttoptr <2 x i64> [[TMP1]] to <2 x ptr>
73
- ; CHECK-NEXT: [[CMP:%.*]] = icmp eq <2 x ptr> [[XPTR]], <ptr inttoptr (i9 42 to ptr), ptr inttoptr (i9 123 to ptr)>
64
+ ; CHECK-NEXT: [[CMP:%.*]] = icmp eq <2 x i64> [[TMP1]], <i64 42, i64 123>
74
65
; CHECK-NEXT: ret <2 x i1> [[CMP]]
75
66
;
76
67
%xptr = inttoptr <2 x i200 > %x to <2 x ptr >
@@ -95,7 +86,7 @@ define i1 @inttoptr_used(i64 %x, i64 %y) {
95
86
; CHECK-NEXT: [[YPTR:%.*]] = inttoptr i64 [[Y:%.*]] to ptr
96
87
; CHECK-NEXT: call void @use_ptr(ptr [[XPTR]])
97
88
; CHECK-NEXT: call void @use_ptr(ptr [[YPTR]])
98
- ; CHECK-NEXT: [[CMP:%.*]] = icmp ugt ptr [[XPTR ]], [[YPTR ]]
89
+ ; CHECK-NEXT: [[CMP:%.*]] = icmp ugt i64 [[X ]], [[Y ]]
99
90
; CHECK-NEXT: ret i1 [[CMP]]
100
91
;
101
92
%xptr = inttoptr i64 %x to ptr
0 commit comments