File tree Expand file tree Collapse file tree 2 files changed +18
-9
lines changed Expand file tree Collapse file tree 2 files changed +18
-9
lines changed Original file line number Diff line number Diff line change @@ -1550,9 +1550,13 @@ void MachineVerifier::verifyPreISelGenericInstruction(const MachineInstr *MI) {
1550
1550
LLT SrcTy = MRI->getType (MI->getOperand (1 ).getReg ());
1551
1551
LLT SrcTy2 = MRI->getType (MI->getOperand (2 ).getReg ());
1552
1552
1553
- if (DstTy.isPointerOrPointerVector () || SrcTy.isPointerOrPointerVector () ||
1554
- SrcTy2.isPointerOrPointerVector ()) {
1555
- report (" Generic scmp/ucmp does not support pointers" , MI);
1553
+ if (SrcTy.isPointerOrPointerVector () || SrcTy2.isPointerOrPointerVector ()) {
1554
+ report (" Generic scmp/ucmp does not support pointers as operands" , MI);
1555
+ break ;
1556
+ }
1557
+
1558
+ if (DstTy.isPointerOrPointerVector ()) {
1559
+ report (" Generic scmp/ucmp does not support pointers as a result" , MI);
1556
1560
break ;
1557
1561
}
1558
1562
Original file line number Diff line number Diff line change @@ -6,15 +6,20 @@ name: test_uscmp
6
6
body : |
7
7
bb.0:
8
8
9
- %12:_(p0) = G_IMPLICIT_DEF
10
- %13:_(p0) = G_IMPLICIT_DEF
11
- ; CHECK: Generic scmp/ucmp does not support pointers
9
+ %2:_(p0) = G_IMPLICIT_DEF
10
+ %3:_(p0) = G_IMPLICIT_DEF
11
+ ; CHECK: Generic scmp/ucmp does not support pointers as operands
12
+ %4:_(s1) = G_SCMP %2, %3
13
+
14
+ %12:_(s64) = G_IMPLICIT_DEF
15
+ %13:_(s64) = G_IMPLICIT_DEF
16
+ ; CHECK: Generic scmp/ucmp does not support pointers as a result
12
17
%14:_(p0) = G_SCMP %12, %13
13
18
14
- %3 :_(<2 x s32>) = G_IMPLICIT_DEF
15
- %4 :_(<2 x s32>) = G_IMPLICIT_DEF
19
+ %23 :_(<2 x s32>) = G_IMPLICIT_DEF
20
+ %24 :_(<2 x s32>) = G_IMPLICIT_DEF
16
21
; CHECK: Generic vector scmp/ucmp must preserve number of lanes
17
- %5:_(s1) = G_UCMP %3 , %4
22
+ %5:_(s1) = G_UCMP %23 , %24
18
23
19
24
%15:_(s32) = G_CONSTANT i32 0
20
25
%16:_(s64) = G_CONSTANT i64 2
You can’t perform that action at this time.
0 commit comments