forked from OSchip/llvm-project
[AArch64] fjcvtzs,rmif,cfinv,setf* all clobber nzcv
Differential Revision: https://reviews.llvm.org/D83818
This commit is contained in:
parent
4dd5c2bee3
commit
f5e1ec8c58
|
@ -1942,6 +1942,7 @@ class BaseFlagManipulation<bit sf, bit sz, dag iops, string asm, string ops>
|
||||||
: I<(outs), iops, asm, ops, "", []>,
|
: I<(outs), iops, asm, ops, "", []>,
|
||||||
Sched<[WriteI, ReadI, ReadI]> {
|
Sched<[WriteI, ReadI, ReadI]> {
|
||||||
let Uses = [NZCV];
|
let Uses = [NZCV];
|
||||||
|
let Defs = [NZCV];
|
||||||
bits<5> Rn;
|
bits<5> Rn;
|
||||||
let Inst{31} = sf;
|
let Inst{31} = sf;
|
||||||
let Inst{30-15} = 0b0111010000000000;
|
let Inst{30-15} = 0b0111010000000000;
|
||||||
|
|
|
@ -1030,7 +1030,7 @@ let Predicates = [HasPA] in {
|
||||||
}
|
}
|
||||||
|
|
||||||
// v8.3a floating point conversion for javascript
|
// v8.3a floating point conversion for javascript
|
||||||
let Predicates = [HasJS, HasFPARMv8] in
|
let Predicates = [HasJS, HasFPARMv8], Defs = [NZCV] in
|
||||||
def FJCVTZS : BaseFPToIntegerUnscaled<0b01, 0b11, 0b110, FPR64, GPR32,
|
def FJCVTZS : BaseFPToIntegerUnscaled<0b01, 0b11, 0b110, FPR64, GPR32,
|
||||||
"fjcvtzs",
|
"fjcvtzs",
|
||||||
[(set GPR32:$Rd,
|
[(set GPR32:$Rd,
|
||||||
|
@ -1039,7 +1039,7 @@ def FJCVTZS : BaseFPToIntegerUnscaled<0b01, 0b11, 0b110, FPR64, GPR32,
|
||||||
} // HasJS, HasFPARMv8
|
} // HasJS, HasFPARMv8
|
||||||
|
|
||||||
// v8.4 Flag manipulation instructions
|
// v8.4 Flag manipulation instructions
|
||||||
let Predicates = [HasFMI] in {
|
let Predicates = [HasFMI], Defs = [NZCV], Uses = [NZCV] in {
|
||||||
def CFINV : SimpleSystemI<0, (ins), "cfinv", "">, Sched<[WriteSys]> {
|
def CFINV : SimpleSystemI<0, (ins), "cfinv", "">, Sched<[WriteSys]> {
|
||||||
let Inst{20-5} = 0b0000001000000000;
|
let Inst{20-5} = 0b0000001000000000;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
# RUN: not llc -o - %s -mtriple=arm64-eabi -run-pass=legalizer 2>&1 | FileCheck %s
|
||||||
|
|
||||||
|
# CHECK: [[@LINE+11]]:29: missing implicit register operand 'implicit $nzcv'
|
||||||
|
...
|
||||||
|
---
|
||||||
|
name: test_flags
|
||||||
|
liveins:
|
||||||
|
- { reg: '$w0' }
|
||||||
|
- { reg: '$x0' }
|
||||||
|
body: |
|
||||||
|
bb.0:
|
||||||
|
liveins: $w0, $x0
|
||||||
|
|
||||||
|
CFINV implicit-def $nzcv
|
||||||
|
RET undef $lr, implicit killed $w0
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
# RUN: not llc -o - %s -mtriple=arm64-eabi -run-pass=legalizer 2>&1 | FileCheck %s
|
||||||
|
|
||||||
|
# CHECK: [[@LINE+11]]:25: missing implicit register operand 'implicit-def $nzcv'
|
||||||
|
...
|
||||||
|
---
|
||||||
|
name: test_flags
|
||||||
|
liveins:
|
||||||
|
- { reg: '$w0' }
|
||||||
|
- { reg: '$x0' }
|
||||||
|
body: |
|
||||||
|
bb.0:
|
||||||
|
liveins: $w0, $x0
|
||||||
|
|
||||||
|
CFINV implicit $nzcv
|
||||||
|
RET undef $lr, implicit killed $w0
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
# RUN: not llc -o - %s -mtriple=arm64-eabi -mattr=+jsconv -run-pass=legalizer 2>&1 | FileCheck %s
|
||||||
|
|
||||||
|
# CHECK: [[@LINE+11]]:49: missing implicit register operand 'implicit-def $nzcv'
|
||||||
|
|
||||||
|
...
|
||||||
|
---
|
||||||
|
name: test_jcvt
|
||||||
|
liveins:
|
||||||
|
- { reg: '$d0' }
|
||||||
|
body: |
|
||||||
|
bb.0:
|
||||||
|
liveins: $d0
|
||||||
|
|
||||||
|
renamable $w0 = FJCVTZS killed renamable $d0
|
||||||
|
RET undef $lr, implicit killed $w0
|
||||||
|
|
||||||
|
...
|
|
@ -0,0 +1,16 @@
|
||||||
|
# RUN: not llc -o - %s -mtriple=arm64-eabi -run-pass=legalizer 2>&1 | FileCheck %s
|
||||||
|
|
||||||
|
# CHECK: [[@LINE+10]]:49: missing implicit register operand 'implicit $nzcv'
|
||||||
|
...
|
||||||
|
---
|
||||||
|
name: test_flags
|
||||||
|
liveins:
|
||||||
|
- { reg: '$x0' }
|
||||||
|
body: |
|
||||||
|
bb.0:
|
||||||
|
liveins: $x0
|
||||||
|
|
||||||
|
RMIF renamable $x0, 0, 0, implicit-def $nzcv
|
||||||
|
RET undef $lr, implicit killed $w0
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
# RUN: not llc -o - %s -mtriple=arm64-eabi -run-pass=legalizer 2>&1 | FileCheck %s
|
||||||
|
|
||||||
|
# CHECK: [[@LINE+10]]:45: missing implicit register operand 'implicit-def $nzcv'
|
||||||
|
...
|
||||||
|
---
|
||||||
|
name: test_flags
|
||||||
|
liveins:
|
||||||
|
- { reg: '$x0' }
|
||||||
|
body: |
|
||||||
|
bb.0:
|
||||||
|
liveins: $x0
|
||||||
|
|
||||||
|
RMIF renamable $x0, 0, 0, implicit $nzcv
|
||||||
|
RET undef $lr, implicit killed $w0
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
# RUN: not llc -o - %s -mtriple=arm64-eabi -run-pass=legalizer 2>&1 | FileCheck %s
|
||||||
|
|
||||||
|
# CHECK: [[@LINE+10]]:45: missing implicit register operand 'implicit $nzcv'
|
||||||
|
...
|
||||||
|
---
|
||||||
|
name: test_flags
|
||||||
|
liveins:
|
||||||
|
- { reg: '$w0' }
|
||||||
|
body: |
|
||||||
|
bb.0:
|
||||||
|
liveins: $w0
|
||||||
|
|
||||||
|
SETF16 renamable $w0, implicit-def $nzcv
|
||||||
|
RET undef $lr, implicit killed $w0
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
# RUN: not llc -o - %s -mtriple=arm64-eabi -run-pass=legalizer 2>&1 | FileCheck %s
|
||||||
|
|
||||||
|
# CHECK: [[@LINE+10]]:41: missing implicit register operand 'implicit-def $nzcv'
|
||||||
|
...
|
||||||
|
---
|
||||||
|
name: test_flags
|
||||||
|
liveins:
|
||||||
|
- { reg: '$w0' }
|
||||||
|
body: |
|
||||||
|
bb.0:
|
||||||
|
liveins: $w0
|
||||||
|
|
||||||
|
SETF16 renamable $w0, implicit $nzcv
|
||||||
|
RET undef $lr, implicit killed $w0
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
# RUN: not llc -o - %s -mtriple=arm64-eabi -run-pass=legalizer 2>&1 | FileCheck %s
|
||||||
|
|
||||||
|
# CHECK: [[@LINE+10]]:44: missing implicit register operand 'implicit $nzcv'
|
||||||
|
...
|
||||||
|
---
|
||||||
|
name: test_flags
|
||||||
|
liveins:
|
||||||
|
- { reg: '$w0' }
|
||||||
|
body: |
|
||||||
|
bb.0:
|
||||||
|
liveins: $w0
|
||||||
|
|
||||||
|
SETF8 renamable $w0, implicit-def $nzcv
|
||||||
|
RET undef $lr, implicit killed $w0
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
# RUN: not llc -o - %s -mtriple=arm64-eabi -run-pass=legalizer 2>&1 | FileCheck %s
|
||||||
|
|
||||||
|
# CHECK: [[@LINE+10]]:40: missing implicit register operand 'implicit-def $nzcv'
|
||||||
|
...
|
||||||
|
---
|
||||||
|
name: test_flags
|
||||||
|
liveins:
|
||||||
|
- { reg: '$w0' }
|
||||||
|
body: |
|
||||||
|
bb.0:
|
||||||
|
liveins: $w0
|
||||||
|
|
||||||
|
SETF8 renamable $w0, implicit $nzcv
|
||||||
|
RET undef $lr, implicit killed $w0
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue