File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -1550,6 +1550,12 @@ 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);
1556
+ break ;
1557
+ }
1558
+
1553
1559
if ((DstTy.isVector () != SrcTy.isVector ()) ||
1554
1560
(DstTy.isVector () &&
1555
1561
DstTy.getElementCount () != SrcTy.getElementCount ())) {
Original file line number Diff line number Diff line change 1
- # RUN: not --crash llc -verify-machineinstrs -mtriple=arm64 - run-pass none -o /dev/null %s 2>&1 | FileCheck %s
1
+ # RUN: not --crash llc -verify-machineinstrs -run-pass none -mtriple=arm64 -o /dev/null %s 2>&1 | FileCheck %s
2
2
# REQUIRES: aarch64-registered-target
3
3
4
4
---
5
5
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
12
+ %14:_(p0) = G_SCMP %12, %13
13
+
9
14
%3:_(<2 x s32>) = G_IMPLICIT_DEF
10
15
%4:_(<2 x s32>) = G_IMPLICIT_DEF
11
16
; CHECK: Generic vector scmp/ucmp must preserve number of lanes
12
17
%5:_(s1) = G_UCMP %3, %4
13
18
14
- %12 :_(s32) = G_CONSTANT i32 0
15
- %13 :_(s64) = G_CONSTANT i64 2
19
+ %15 :_(s32) = G_CONSTANT i32 0
20
+ %16 :_(s64) = G_CONSTANT i64 2
16
21
; CHECK: Generic scmp/ucmp must have same input types
17
- %14:_(s1) = G_SCMP %12, %13
22
+ %17:_(s1) = G_SCMP %15, %16
23
+
24
+
18
25
19
26
...
You can’t perform that action at this time.
0 commit comments